From cc9a07c09f288e44465f24fdbbfa3a8d2a13d279 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 3 Sep 2021 17:12:55 -0400 Subject: [PATCH 01/12] Fix 180 favor issue, reworked favor and reputation mathjax --- dist/engine.bundle.js | 2 +- src/Faction/formulas/favor.ts | 9 ++++++++- src/Faction/ui/Info.tsx | 11 ++++++++--- src/Gang/Gang.ts | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 429f483d1..bf09321a4 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -16,5 +16,5 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=a.b(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var n,i=0;n=e.body[i];i++)t.node.body.push(n);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var n=t.node,a=n.type;if("Program"===a&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[a](e,t,n)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!n.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,n=this.createNativeFunction(function(e){throw EvalError("Can't happen")},!1);n.eval=!0,this.setProperty(e,"eval",n),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var a=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","if (!Array.prototype.find) {","Object.defineProperty(Array.prototype, 'find', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return kValue;","}","k++;","}","return undefined;","},","configurable: true,","writable: true","});","}","if (!Array.prototype.findIndex) {","Object.defineProperty(Array.prototype, 'findIndex', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return k;","}","k++;","}","return -1;","},","configurable: true,","writable: true","});","}","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},r.prototype.initString=function(e){var t,n=this;t=function(e){return e=String(e),n.calledWithNew()?(this.data=e,this):e},this.STRING=this.createNativeFunction(t,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","if (!String.prototype.endsWith) {","String.prototype.endsWith = function(search, this_len) {","if (this_len === undefined || this_len > this.length) {","this_len = this.length;","}","return this.substring(this_len - search.length, this_len) === search;","};","}","if (!String.prototype.includes) {","String.prototype.includes = function(search, start) {","'use strict';","if (typeof start !== 'number') {","start = 0;","}"," ","if (start + search.length > this.length) {","return false;","} else {","return this.indexOf(search, start) !== -1;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(e){var t,n=this;t=function(e){return e=Boolean(e),n.calledWithNew()?(this.data=e,this):e},this.BOOLEAN=this.createNativeFunction(t,!0),this.setProperty(e,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(e){var t,n=this;t=function(e){return e=Number(e),n.calledWithNew()?(this.data=e,this):e},this.NUMBER=this.createNativeFunction(t,!0),this.setProperty(e,"Number",this.NUMBER);for(var a=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i>>0;return t===Number(e)?t:NaN},r.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},r.Value,r.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(a=r.toStringCycles_).push(this);try{for(var e=[],t=0;t0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:n});case"CallExpression":case"NewExpression":if(e===r.Completion.RETURN)return void(o.value=t);if(e!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===r.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void i.pop()}else if(e===r.Completion.CONTINUE&&(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop))return}var s;if(this.isa(t,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(t,"name").toString(),u=this.getProperty(t,"message").valueOf();s=(e=l[c]||Error)(u+a)}else s=String(t)+a;throw s},r.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,a=new this.nodeConstructor;a.type="CallExpression";var i=new r.State(a,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=n,i.func_=e,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(e,t,n){var a=Array.isArray(t)?t[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},r.State=function(e,t){this.node=e,this.scope=t},r.prototype.stepArrayExpression=function(e,t,n){var a=n.elements,i=t.n_||0;for(t.array_?(this.setProperty(t.array_,i,t.value),i++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=a.length);i>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},r.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new r.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new r.State(n.right,t.scope);e.pop();var a,i=t.leftValue_,o=t.value;switch(n.operator){case"==":a=i==o;break;case"!=":a=i!=o;break;case"===":a=i===o;break;case"!==":a=i!==o;break;case">":a=i>o;break;case">=":a=i>=o;break;case"<":a=i>":a=i>>o;break;case">>>":a=i>>>o;break;case"in":if(!o||!o.isObject){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",e)}a=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",e)}a=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=a},r.prototype.stepBlockStatement=function(e,t,n){var a=t.n_||0,i=n.body[a];if(i)return t.n_=a+1,new r.State(i,t.scope);e.pop()},r.prototype.stepBreakStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(r.Completion.BREAK,void 0,a)},r.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var i=new r.State(n.callee,t.scope);return i.components=!0,i}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,n),o[0]===r.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],(o=t.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}o=t.func_;if(!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),n.arguments[t.n_])return new r.State(n.arguments[t.n_++],t.scope);if("NewExpression"===n.type){if(o.illegalConstructor){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a constructor",e)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s),t.isConstructor=!0}else void 0===t.funcThis_&&(t.funcThis_=t.scope.strict?void 0:this.global);t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{if(t.doneExec_=!0,!o||!o.isObject){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a function",e)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),u=0;uu?t.arguments_[u]:void 0;this.setProperty(c,m,p)}var d=this.createObjectProto(this.ARRAY_PROTO);for(u=0;u=0&&this.recalculateTotalProduction()}recalculateTotalProduction(){let e=0;for(let t=0;t{if(Object(p.h)()){const t=h.AllServers[e];if(null==t)throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${e}`);return r.a.createElement(s.a,{key:t.hostname,node:t,purchaseMultiplier:this.state.purchaseMultiplier,recalculate:this.recalculateTotalProduction})}return r.a.createElement(o.a,{key:e.name,node:e,purchaseMultiplier:this.state.purchaseMultiplier,recalculate:this.recalculateTotalProduction})});return r.a.createElement("div",null,r.a.createElement("h1",null,"Hacknet ",Object(p.h)()?"Servers":"Nodes"),r.a.createElement(i.a,null),r.a.createElement(m.a,{cost:e,multiplier:this.state.purchaseMultiplier,onClick:this.handlePurchaseButtonClick}),r.a.createElement("br",null),r.a.createElement("div",{id:"hacknet-nodes-money-multipliers-div"},r.a.createElement(u.a,{totalProduction:this.state.totalProduction}),r.a.createElement(c.a,{onClicks:t,purchaseMultiplier:this.state.purchaseMultiplier})),Object(p.h)()&&r.a.createElement("button",{className:"std-button",onClick:this.createHashUpgradesPopup,style:{display:"block"}},"Spend Hashes on Upgrades"),r.a.createElement("ul",{id:"hacknet-nodes-list"},n))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u});var a=n(17),r=n(84),i=n(156),o=n(13),s=n(97),l=n(62);let c=!1;function u(e){if(c=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");a.Engine.loadCinematicTextContent();const t=document.getElementById("cinematic-text-container");if(t.style.width="75%",null==t)throw new Error("Could not find cinematic-text-container for writeCinematicText()");Object(i.removeChildrenFromElement)(t);for(let t=0;t=t.length)return Promise.resolve(!0);return function(e){return new Promise(function(t,n){const a=document.getElementById("cinematic-text-container"),i=document.createElement("p");a.appendChild(i);const o=function e(t,n,a=0){return new Promise(function(i,o){Object(r.setTimeoutRef)(function(){const r=n.substring(0,a);if(a>=n.length)return t.innerHTML=r,i(!0);t.innerHTML=r+"";const s=e(t,n,a+1);s.then(function(e){i(e)},function(e){o(e)})},15)})}(i,e,0);o.then(function(e){t(e)},function(e){n(e)})})}(t[n]).then(function(){return e(t,n+1)})}(e).then(function(){return function(){var e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container");return e.appendChild(Object(o.createElement)("br")),new Promise(function(n){e.appendChild(Object(o.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",c=!1,n()}}))})}()}).catch(function(e){Object(s.exceptionAlert)(e)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationRouting=t.overviewPage=void 0,t.overviewPage="Overview";t.CorporationRouting=class{constructor(e){this.currentPage=t.overviewPage,this.currentDivision=null,this.corp=e}current(){return this.currentPage}isValidPage(e){if(e===t.overviewPage)return!0;for(const t of this.corp.divisions)if(t.name===e)return!0;return!1}isOn(e){return!!this.isValidPage(e)&&e===this.currentPage}isOnOverviewPage(){return this.currentPage===t.overviewPage}routeTo(e){if(this.isValidPage(e)){if(this.currentDivision=null,e!==t.overviewPage){for(let t=0;t${t.title}

${t.txt}`;r.dialogBoxCreate(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUpgrades=void 0,t.CorporationUpgrades={0:[0,2e9,1.06,.03,"Smart Factories","Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive)."],1:[1,2e9,1.06,.1,"Smart Storage","Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive)."],2:[2,4e9,1.1,.001,"DreamSense","Use DreamSense LCC Technologies to advertise your corporation to consumers through their dreams. Each level of this upgrade provides a passive increase in awareness of all of your companies (divisions) by 0.004 / market cycle,and in popularity by 0.001 / market cycle. A market cycle is approximately 15 seconds."],3:[3,4e9,1.12,.005,"Wilson Analytics","Purchase data and analysis from Wilson, a marketing research firm. Each level of this upgrades increases the effectiveness of your advertising by 0.5% (additive)."],4:[4,1e9,1.06,.1,"Nuoptimal Nootropic Injector Implants","Purchase the Nuoptimal Nootropic Injector augmentation for your employees. Each level of this upgrade globally increases the creativity of your employees by 10% (additive)."],5:[5,1e9,1.06,.1,"Speech Processor Implants","Purchase the Speech Processor augmentation for your employees. Each level of this upgrade globally increases the charisma of your employees by 10% (additive)."],6:[6,1e9,1.06,.1,"Neural Accelerators","Purchase the Neural Accelerator augmentation for your employees. Each level of this upgrade globally increases the intelligence of your employees by 10% (additive)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.07,.01,"ABC SalesBots","Always Be Closing. Purchase these robotic salesmen to increase the amount of materials and products you sell. Each level of this upgrade globally increases your sales by 1% (additive)."],9:[9,5e9,1.07,.05,"Project Insight","Purchase 'Project Insight', a R&D service provided by the secretive Fulcrum Technologies. Each level of this upgrade globally increases the amount of Scientific Research you produce by 5% (additive)."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUnlockUpgrades=void 0,t.CorporationUnlockUpgrades={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],1:[1,25e9,"Smart Supply","Use advanced AI to anticipate your supply needs. This allows you to purchase exactly however many materials you need for production."],2:[2,5e9,"Market Research - Demand","Mine and analyze market data to determine the demand of all resources. The demand attribute, which affects sales, will be displayed for every material and product."],3:[3,5e9,"Market Data - Competition","Mine and analyze market data to determine how much competition there is on the market for all resources. The competition attribute, which affects sales, will be displayed for every material and product."],4:[4,1e10,"VeChain","Use AI and blockchain technology to identify where you can improve your supply chain systems. This upgrade will allow you to view a wide array of useful statistics about your Corporation."],5:[5,5e11,"Shady Accounting","Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%."],6:[6,2e12,"Government Partnership","Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%"]}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.clearSleevesPage=t.updateSleevesPage=t.createSleevesPage=void 0;const o=n(953),s=n(251),l=n(952),c=n(11),u=n(16),m=n(428),p=n(176),d=n(173),h=n(38),_=n(47),g=n(3),f=n(19),y=n(12),b=n(171),E=n(97),v=n(56),C=n(13),k=n(431),P=n(57),S=n(69),O=n(181),M=n(156),T=n(172),x=n(49),w=n(951),A=n(31),R=n(125),N=n(459),D=n(950),B=n(949),I=n(948),L=i(n(22)),W=n(415),F={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let j;function U(){if(f.routing.isOn(f.Page.Sleeves)){if(null===j)throw new Error("playerRef is null in updateSleevesPage()");if(null===F.sleeves)throw new Error("UIElems.sleeves is null in updateSleevesPage()");try{for(let e=0;e{y.dialogBoxCreate(B.MoreStatsContent(e))}}),n.travelButton=C.createElement("button",{class:"std-button",innerText:"Travel",clickListener:()=>{const a="sleeve-travel-popup",r=[];r.push(S.createPopupCloseButton(a,{class:"std-button"})),r.push(C.createElement("p",{innerHTML:"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. "+`Traveling to a different city costs ${W.renderToStaticMarkup(A.Money(c.CONSTANTS.TravelCost))}. `+"It will also CANCEL the sleeve's current task (setting it to idle)"}));for(const i in d.Cities)e.city!==i&&function(e,i){r.push(C.createElement("div",{class:"cmpy-mgmt-find-employee-option",innerText:i,clickListener:()=>{if(null==j)throw new Error("playerRef is null in popupArguments.click()");return j.canAfford(c.CONSTANTS.TravelCost)?(e.city=i,j.loseMoney(c.CONSTANTS.TravelCost),e.resetTaskStatus(),x.removeElementById(a),G(e,n),$(e,n,t),!1):(y.dialogBoxCreate("You cannot afford to have this sleeve travel to another city",!1),!1)}}))}(e,i);P.createPopup(a,r)}}),n.purchaseAugsButton=C.createElement("button",{class:"std-button",display:"block",innerText:"Manage Augmentations",clickListener:()=>{if(null==j)throw new Error("playerRef is null in purchaseAugsButton.click()");o.createSleevePurchaseAugsPopup(e,j)}}),n.statsPanel.appendChild(n.stats),n.statsPanel.appendChild(n.moreStatsButton),n.statsPanel.appendChild(n.travelButton),e.shock>=100&&n.statsPanel.appendChild(n.purchaseAugsButton),n.taskPanel=C.createElement("div",{class:"sleeve-panel",width:"40%"}),n.taskSelector=C.createElement("select",{class:"dropdown"}),n.taskSelector.add(k.createOptionElement("------")),n.taskSelector.add(k.createOptionElement("Work for Company")),n.taskSelector.add(k.createOptionElement("Work for Faction")),n.taskSelector.add(k.createOptionElement("Commit Crime")),n.taskSelector.add(k.createOptionElement("Take University Course")),n.taskSelector.add(k.createOptionElement("Workout at Gym")),n.taskSelector.add(k.createOptionElement("Shock Recovery")),n.taskSelector.add(k.createOptionElement("Synchronize")),n.taskDetailsSelector=C.createElement("select",{class:"dropdown"}),n.taskDetailsSelector2=C.createElement("select",{class:"dropdown"}),n.taskDescription=C.createElement("p"),n.taskProgressBar=C.createElement("p"),n.taskSelector.addEventListener("change",()=>{$(e,n,t)}),n.taskSelector.selectedIndex=e.currentTask,n.taskSelector.dispatchEvent(new Event("change")),Y(e,n),n.taskSetButton=C.createElement("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==j)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");if(null==t.taskDescription)throw new Error("elems.taskDescription is null");const n=O.getSelectValue(t.taskSelector),a=O.getSelectValue(t.taskDetailsSelector),r=O.getSelectValue(t.taskDetailsSelector2);let i=!1;switch(n){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":i=e.workForCompany(j,a);break;case"Work for Faction":i=e.workForFaction(j,a,r);break;case"Commit Crime":i=e.commitCrime(j,a);break;case"Take University Course":i=e.takeUniversityCourse(j,r,a);break;case"Workout at Gym":i=e.workoutAtGym(j,r,a);break;case"Shock Recovery":e.currentTask=s.SleeveTaskType.Recovery,i=e.shockRecovery(j);break;case"Synchronize":i=e.synchronize(j);break;default:console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${n}`)}if(i)Y(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(f.routing.isOn(f.Page.Sleeves)){if(U(),null==F.sleeves)throw new Error("UIElems.sleeves is null");for(const e of F.sleeves){if(null==e.taskSelector)throw new Error("e.taskSelector is null");e.taskSelector.dispatchEvent(new Event("change"))}}}catch(e){return console.error(`Exception caught in setSleeveTask(): ${e}`),E.exceptionAlert(e),!1}}(e,n)}}),n.taskPanel.appendChild(n.taskSelector),n.taskPanel.appendChild(n.taskDetailsSelector),n.taskPanel.appendChild(n.taskDetailsSelector2),n.taskPanel.appendChild(n.taskSetButton),n.taskPanel.appendChild(n.taskDescription),n.taskPanel.appendChild(n.taskProgressBar),n.earningsPanel=C.createElement("div",{class:"sleeve-panel",width:"35%"}),n.currentEarningsInfo=C.createElement("div"),n.totalEarningsButton=C.createElement("button",{class:"std-button",innerText:"More Earnings Info",clickListener:()=>{y.dialogBoxCreate(I.MoreEarningsContent(e))}}),n.earningsPanel.appendChild(n.currentEarningsInfo),n.earningsPanel.appendChild(n.totalEarningsButton),G(e,n),n.container.appendChild(n.statsPanel),n.container.appendChild(n.taskPanel),n.container.appendChild(n.earningsPanel),n):n}function G(e,t){if(f.routing.isOn(f.Page.Sleeves)){if(null==j)throw new Error("playerRef is null in updateSleeveUi()");if(null==t.taskProgressBar)throw new Error("elems.taskProgressBar is null");if(null==t.stats)throw new Error("elems.stats is null");if(null==t.currentEarningsInfo)throw new Error("elems.currentEarningsInfo is null");if(L.render(D.StatsElement(e),t.stats),e.currentTask===s.SleeveTaskType.Crime){const n=[["Money",A.Money(parseFloat(e.currentTaskLocation)),"(on success)"],["Hacking Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.str),"(2x on success)"],["Defense Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.cha),"(2x on success)"]];L.render(w.EarningsTableElement("Earnings (Pre-Synchronization)",n),t.currentEarningsInfo),t.taskProgressBar.innerText=b.createProgressBarText({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25})}else{const n=[["Money:",R.MoneyRate(5*e.gainRatesForTask.money)],["Hacking Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.hack)} / s`],["Strength Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.str)} / s`],["Defense Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.def)} / s`],["Dexterity Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.dex)} / s`],["Agility Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.agi)} / s`],["Charisma Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.cha)} / s`]];if(e.currentTask===s.SleeveTaskType.Company||e.currentTask===s.SleeveTaskType.Faction){const t=e.getRepGain(j);n.push(["Reputation:",N.ReputationRate(5*t)])}L.render(w.EarningsTableElement("Earnings (Pre-Synchronization)",n),t.currentEarningsInfo),t.taskProgressBar.innerText=""}}}t.createSleevesPage=function(e){if(f.routing.isOn(f.Page.Sleeves))try{j=e,F.container=C.createElement("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),F.info=C.createElement("p",{class:"sleeves-page-info",innerHTML:"

Sleeves

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.

Sleeves can be used to perform different tasks synchronously.

"}),F.faqButton=C.createElement("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{y.dialogBoxCreate(l.SleeveFaq,!1)}}),F.docButton=C.createElement("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",innerText:"Documentation",target:"_blank"}),F.sleeveList=C.createElement("ul"),F.sleeves=[];for(const t of e.sleeves){const n=H(t,e.sleeves);if(null==n.container)throw new Error("sleeveUi.container is null in createSleevesPage()");F.sleeveList.appendChild(n.container),F.sleeves.push(n)}F.container.appendChild(F.info),F.container.appendChild(F.faqButton),F.container.appendChild(F.docButton),F.container.appendChild(F.sleeveList);const t=document.getElementById("entire-game-container");if(null===t)throw new Error("entire-game-container not found in createSleevesPage()");t.appendChild(F.container)}catch(e){E.exceptionAlert(e)}},t.updateSleevesPage=U,t.clearSleevesPage=function(){F.container instanceof HTMLElement&&T.removeElement(F.container);for(const e in F)F[e]=null;j=null};const K=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],q=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function $(e,t,n){if(null==j)throw new Error("playerRef is null in updateSleeveTaskSelector()");const a=[];for(const t of n)e!==t&&t.currentTask===s.SleeveTaskType.Company&&a.push(t.currentTaskLocation);const r=[];for(const t of n)e!==t&&t.currentTask===s.SleeveTaskType.Faction&&r.push(t.currentTaskLocation);if(null===t.taskDetailsSelector)throw new Error("elems.taskDetailsSelector is null");if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector is null");switch(M.removeChildrenFromElement(t.taskDetailsSelector),M.removeChildrenFromElement(t.taskDetailsSelector2),t.taskDetailsSelector2=v.clearEventListeners(t.taskDetailsSelector2),O.getSelectValue(t.taskSelector)){case"Work for Company":{let n=0;const r=Object.keys(j.jobs);for(let i=0;i{if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector2 is null");const n=O.getSelectValue(t.taskDetailsSelector),a=u.Factions[n];if(null==a)return void console.warn(`Invalid faction name when trying to update Sleeve Task Selector: ${n}`);const r=a.getInfo();M.removeChildrenFromElement(t.taskDetailsSelector2);let i=0;r.offerHackingWork&&(t.taskDetailsSelector2.add(k.createOptionElement("Hacking Contracts")),e.factionWorkType===m.FactionWorkType.Hacking&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerFieldWork&&(t.taskDetailsSelector2.add(k.createOptionElement("Field Work")),e.factionWorkType===m.FactionWorkType.Field&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerSecurityWork&&(t.taskDetailsSelector2.add(k.createOptionElement("Security Work")),e.factionWorkType===m.FactionWorkType.Security&&(t.taskDetailsSelector2.selectedIndex=i),++i)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break}case"Commit Crime":{let n=0;for(const a in p.Crimes){const r=p.Crimes[a].name;if(t.taskDetailsSelector.add(k.createOptionElement(r,a)),""===e.crimeType)continue;const i=p.Crimes[e.crimeType];null!==i&&(r===i.name&&(t.taskDetailsSelector.selectedIndex=n),++n)}t.taskDetailsSelector2.add(k.createOptionElement("------"));break}case"Take University Course":for(let n=0;nanalyze Get information about the current machine
backdoor Install a backdoor on the current machine
buy [-l/program] Purchase a program through the Dark Web
cat [file] Display a .msg, .lit, or .txt file
cd [dir] Change to a new directory
check [script] [args...] Print a script's logs to Terminal
clear Clear all text on the terminal
cls See 'clear' command
connect [ip/hostname] Connects to a remote server
download [script/text file] Downloads scripts or text files to your computer
expr [math expression] Evaluate a mathematical expression
free Check the machine's memory (RAM) usage
hack Hack the current machine
help [command] Display this help text, or the help text for a command
home Connect to home computer
hostname Displays the hostname of the machine
ifconfig Displays the IP address of the machine
kill [script/pid] [args...] Stops the specified script on the current server
killall Stops all running scripts on the current machine
ls [dir] [| grep pattern] Displays all files on the machine
lscpu Displays the number of CPU cores on the machine
mem [script] [-t] [n] Displays the amount of RAM required to run the script
mv [src] [dest] Move/rename a text or script file
nano [file] Text editor - Open up and edit a script or text file
ps Display all scripts that are currently running
rm [file] Delete a file from the server
run [name] [-t] [n] [args...] Execute a program or script
scan Prints all immediately-available network connections
scan-analyze [d] [-a] Prints info for all servers up to d nodes away
scp [file] [server] Copies a file to a destination server
sudov Shows whether you have root access on this computer
tail [script] [args...] Displays dynamic logs for the specified script
theme [preset] | bg txt hlgt Change the color scheme of the UI
top Displays all running scripts and their RAM usage
unalias [alias name] Deletes the specified alias
wget [url] [target file] Retrieves code/text from a web server
",t.HelpTexts={alias:"alias [-g] [name=\"value\"]
Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following:

alias nuke=\"run NUKE.exe\"

Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set:

alias worm=\"HTTPWorm.exe\"

and then you tried to run the following terminal command:

run worm

This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag:

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

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

Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.

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

",analyze:"analze
Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",backdoor:"backdoor
Install a backdoor on the current machine, grants a secret bonus depending on the machine.
Requires root access to run.
",buy:"buy [-l / program]
Purchase a program through the Dark Web. Requires a TOR router to use.

If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.

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

cat j1.msg
cat foo.lit
cat servers.txt",cd:"cd [dir]
Change to the specified directory. Note that this works even for directories that don't exist. If you change to a directory that does not exist, it will not be 'created'. Examples:

cd scripts/hacking
cd /logs
cd ../",check:"check [script name] [args...]
Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 2 foodnstuff

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

check foo.script 1 2 foodnstuff",clear:"clear
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]
Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]
Downloads a script or text file to your computer (like your real life computer).
You can also download all of your scripts/text files as a zip file using the following Terminal commands:

Download all scripts and text files: download *
Download all scripts: download *.script
Download all text files: download *.txt
",expr:"expr [mathematical expression]
Evaluate a simple mathematical expression. Supports native JavaScript operators:
+, -, /, *, **, %
Example:
expr 25 * 2 ** 10
Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free
Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack
Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
",help:"help [command]
Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples:

help alias
help scan-analyze",home:"home
Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname
Prints the hostname of the current server",ifconfig:"ipconfig
Prints the IP address of the current server",kill:"kill [script name] [args...]
kill [pid]
Kill the script specified by the script name and arguments OR by its PID.

If you are killing the script using its filename and arguments, then each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 sigma-cosmetics

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

kill foo.script 1 sigma-cosmetics

If you are killing the script using its PID, then the PID argument must be numeric",killall:"killall
Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [dir] [| grep pattern]
The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. The files will be displayed in alphabetical order.

The 'dir' optional parameter can be used to display files/directories in another directory.

The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.

Examples:

List all files with the '.script' extension in the current directory:
ls | grep .script

List all files with the '.js' extension in the root directory:
ls / | grep .js

List all files with the word 'purchase' in the filename, in the 'scripts' directory:
ls scripts | grep purchase",lscpu:"lscpu
Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]
Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:

mem foo.script
mem foo.script -t 50
The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",mv:"mv [src] [dest]
Move the source file to the specified destination. This can also be used to rename files. This command only works for scripts and text files (.txt). This command CANNOT be used to convert to different file types

Note that, unlike the Linux 'mv' command, the destination argument must be the full filepath. Examples:

mv hacking-controller.script scripts/hacking-controller.script
mv myScript.js myOldScript.js",nano:"nano [file name]
Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps
Prints all scripts that are running on the current server",rm:"rm [file]
Removes the specified file from the current server. A file can be a script, a program, or a message file.

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

The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards.

[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space.

",scan:"scan
Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]
Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.

By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.

The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.

By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]
Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov
Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]
Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments:

run foo.script 10 50000

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

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

This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:

theme #ffffff #385 #235012

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

Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top
Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]
Deletes the specified alias. Note that the double quotation marks are required.

As an example, if an alias was declared using:

alias r=\"run\"

Then it could be removed using:

unalias r

It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]
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.

Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:

wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trusted=void 0,t.trusted=function(e){return function(t){t.isTrusted&&e()}}},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.purchaseTorRouter=t.createUpgradeHomeRamPopup=t.createUpgradeHomeCoresPopup=t.createStartCorporationPopup=t.createPurchaseServerPopup=t.createTravelPopup=void 0;const o=n(11),s=n(23),l=n(24),c=n(144),u=n(45),m=n(26),p=n(3),d=n(31),h=n(12),_=n(54),g=n(13),f=n(57),y=n(69),b=n(49),E=i(n(0));t.createTravelPopup=function(e,t){const n=o.CONSTANTS.TravelCost;if(m.Settings.SuppressTravelConfirmation)return void t(e);const a=_.yesNoBoxGetYesButton(),r=_.yesNoBoxGetNoButton();null!=a&&null!=r?(a.innerHTML="Yes",a.addEventListener("click",()=>(_.yesNoBoxClose(),t(e),!1)),r.innerHTML="No",r.addEventListener("click",()=>(_.yesNoBoxClose(),!1)),_.yesNoBoxCreate(E.createElement("span",null,"Would you like to travel to ",e,"? The trip will cost ",d.Money(n),"."))):console.warn("Could not find YesNo pop-up box buttons")},t.createPurchaseServerPopup=function(e,t){const n=c.getPurchaseServerCost(e);if(n===1/0)return void h.dialogBoxCreate("Something went wrong when trying to purchase this server. Please contact developer.");const a=_.yesNoTxtInpBoxGetYesButton(),r=_.yesNoTxtInpBoxGetNoButton();null!=a&&null!=r&&(a.innerHTML="Purchase Server",r.innerHTML="Cancel",a.addEventListener("click",function(){c.purchaseServer(e,t),_.yesNoTxtInpBoxClose()}),r.addEventListener("click",function(){_.yesNoTxtInpBoxClose()}),_.yesNoTxtInpBoxCreate(E.createElement(E.Fragment,null,"Would you like to purchase a new server with ",p.numeralWrapper.formatRAM(e)," of RAM for ",d.Money(n),"?",E.createElement("br",null),E.createElement("br",null),"Please enter the server hostname below:",E.createElement("br",null))))},t.createStartCorporationPopup=function(e){if(!e.canAccessCorporation()||e.hasCorporation())return;const t="create-corporation-popup",n=g.createElement("p",{innerHTML:"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares

If you would like to start one, please enter a name for your corporation below:"}),a=g.createElement("input",{class:"text-input",placeholder:"Corporation Name"}),r=g.createElement("button",{class:"popup-box-button",innerText:"Self-Fund",clickListener:()=>{if(!e.canAfford(15e10))return h.dialogBoxCreate("You don't have enough money to create a corporation! You need $150b."),!1;const n=a.value;if(null==n||""==n)return h.dialogBoxCreate("Invalid company name!"),!1;e.startCorporation(n),e.loseMoney(15e10);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),h.dialogBoxCreate("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City."),b.removeElementById(t),!1}}),i=g.createElement("button",{class:"popup-box-button",innerText:"Use Seed Money",clickListener:()=>{const n=a.value;if(null==n||""==n)return h.dialogBoxCreate("Invalid company name!"),!1;e.startCorporation(n,5e8);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),h.dialogBoxCreate("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City."),b.removeElementById(t),!1}}),o=y.createPopupCloseButton(t,{class:"popup-box-button"});f.createPopup(t,[n,a,o,r,i]),a.focus()},t.createUpgradeHomeCoresPopup=function(e){const t=e.getHomeComputer().cpuCores;if(t>=8)return void h.dialogBoxCreate(E.createElement(E.Fragment,null,"You have the maximum amount of CPU cores on your home computer."));const n=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17][t],a=_.yesNoBoxGetYesButton(),r=_.yesNoBoxGetNoButton();null!=a&&null!=r&&(a.innerHTML="Purchase",a.addEventListener("click",()=>{e.canAfford(n)?(e.loseMoney(n),e.getHomeComputer().cpuCores++,h.dialogBoxCreate("You purchased an additional CPU Core for your home computer! It now has "+e.getHomeComputer().cpuCores+" cores.")):h.dialogBoxCreate("You do not have enough money to purchase an additional CPU Core for your home computer!"),_.yesNoBoxClose()}),r.innerHTML="Cancel",r.addEventListener("click",()=>{_.yesNoBoxClose()}),_.yesNoBoxCreate(E.createElement(E.Fragment,null,"Would you like to purchase an additional CPU Core for your home computer? Each CPU Core lets you start with an additional Core Node in Hacking Missions.",E.createElement("br",null),E.createElement("br",null),"Purchasing an additional core (for a total of ",e.getHomeComputer().cpuCores+1,") will cost ",d.Money(n))))},t.createUpgradeHomeRamPopup=function(e){const t=e.getUpgradeHomeRamCost(),n=e.getHomeComputer().maxRam,a=_.yesNoBoxGetYesButton(),r=_.yesNoBoxGetNoButton();null!=a&&null!=r&&(e.getHomeComputer().maxRam>=o.CONSTANTS.HomeComputerMaxRam?h.dialogBoxCreate(E.createElement(E.Fragment,null,"You have the maximum amount of RAM on your home computer.")):(a.innerText="Purchase",a.addEventListener("click",()=>{c.purchaseRamForHomeComputer(t,e),_.yesNoBoxClose()}),r.innerText="Cancel",r.addEventListener("click",()=>{_.yesNoBoxClose()}),_.yesNoBoxCreate(E.createElement(E.Fragment,null,"Would you like to purchase additional RAM for your home computer? ",E.createElement("br",null),E.createElement("br",null),"This will upgrade your RAM from ",p.numeralWrapper.formatRAM(n)," to ",p.numeralWrapper.formatRAM(2*n),". ",E.createElement("br",null),E.createElement("br",null),"This will cost ",d.Money(t)))))},t.purchaseTorRouter=function(e){if(e.hasTorRouter())return void h.dialogBoxCreate("You already have a TOR Router!");if(!e.canAfford(o.CONSTANTS.TorRouterCost))return void h.dialogBoxCreate("You cannot afford to purchase the TOR router!");e.loseMoney(o.CONSTANTS.TorRouterCost);const t=l.safetlyCreateUniqueServer({ip:s.createUniqueRandomIp(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});s.AddToAllServers(t),u.SpecialServerIps.addIp("Darkweb Server",t.ip),e.getHomeComputer().serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.getHomeComputer().ip),h.dialogBoxCreate("You have purchased a TOR router!
You now have access to the dark web from your home computer.
Use the scan/scan-analyze commands to search for the dark web connection.")}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoupdatingStdButton=void 0;const o=i(n(0));t.AutoupdatingStdButton=class extends o.Component{constructor(e){super(e),this.interval=0,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}render(){const e=null!=this.props.tooltip&&""!==this.props.tooltip;let t=this.props.disabled?"std-button-disabled":"std-button";e&&(t+=" tooltip");const n={__html:this.props.tooltip?this.props.tooltip:""};return o.createElement("button",{className:t,onClick:this.props.onClick,style:this.props.style},this.props.text,e&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:n}))}}},,,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SuccessChance=void 0;const r=a(n(0)),i=n(20);t.SuccessChance=function(e){return e.chance[0]===e.chance[1]?r.default.createElement(r.default.Fragment,null,i.formatNumber(100*e.chance[0],1),"%"):r.default.createElement(r.default.Fragment,null,i.formatNumber(100*e.chance[0],1),"% ~ ",i.formatNumber(100*e.chance[1],1),"%")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationType=void 0,function(e){e[e.Company=0]="Company",e[e.Gym=1]="Gym",e[e.Hospital=2]="Hospital",e[e.Slums=3]="Slums",e[e.Special=4]="Special",e[e.StockMarket=5]="StockMarket",e[e.TechVendor=6]="TechVendor",e[e.TravelAgency=7]="TravelAgency",e[e.University=8]="University",e[e.Casino=9]="Casino"}(t.LocationType||(t.LocationType={}))},,,,,,,,,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.gangMemberUpgradesMetadata=t.UpgradeType=void 0,function(e){e.Weapon="w",e.Armor="a",e.Vehicle="v",e.Rootkit="r",e.Augmentation="g"}(a=t.UpgradeType||(t.UpgradeType={})),t.gangMemberUpgradesMetadata=[{cost:1e6,mults:{str:1.04,def:1.04},name:"Baseball Bat",upgType:a.Weapon},{cost:12e6,mults:{str:1.08,def:1.08,dex:1.08},name:"Katana",upgType:a.Weapon},{cost:25e6,mults:{str:1.1,def:1.1,dex:1.1,agi:1.1},name:"Glock 18C",upgType:a.Weapon},{cost:5e7,mults:{str:1.12,def:1.1,agi:1.1},name:"P90C",upgType:a.Weapon},{cost:6e7,mults:{str:1.2,def:1.15},name:"Steyr AUG",upgType:a.Weapon},{cost:1e8,mults:{str:1.25,def:1.2},name:"AK-47",upgType:a.Weapon},{cost:15e7,mults:{str:1.3,def:1.25},name:"M15A10 Assault Rifle",upgType:a.Weapon},{cost:225e6,mults:{str:1.3,dex:1.25,agi:1.3},name:"AWM Sniper Rifle",upgType:a.Weapon},{cost:2e6,mults:{def:1.04},name:"Bulletproof Vest",upgType:a.Armor},{cost:5e6,mults:{def:1.08},name:"Full Body Armor",upgType:a.Armor},{cost:25e6,mults:{def:1.15,agi:1.15},name:"Liquid Body Armor",upgType:a.Armor},{cost:4e7,mults:{def:1.2},name:"Graphene Plating Armor",upgType:a.Armor},{cost:3e6,mults:{agi:1.04,cha:1.04},name:"Ford Flex V20",upgType:a.Vehicle},{cost:9e6,mults:{agi:1.08,cha:1.08},name:"ATX1070 Superbike",upgType:a.Vehicle},{cost:18e6,mults:{agi:1.12,cha:1.12},name:"Mercedes-Benz S9001",upgType:a.Vehicle},{cost:3e7,mults:{agi:1.16,cha:1.16},name:"White Ferrari",upgType:a.Vehicle},{cost:5e6,mults:{hack:1.05},name:"NUKE Rootkit",upgType:a.Rootkit},{cost:25e6,mults:{hack:1.1},name:"Soulstealer Rootkit",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Demon Rootkit",upgType:a.Rootkit},{cost:4e7,mults:{hack:1.12},name:"Hmap Node",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Jack the Ripper",upgType:a.Rootkit},{cost:1e10,mults:{str:1.3,dex:1.3},name:"Bionic Arms",upgType:a.Augmentation},{cost:1e10,mults:{agi:1.6},name:"Bionic Legs",upgType:a.Augmentation},{cost:15e9,mults:{str:1.15,def:1.15,dex:1.15,agi:1.15},name:"Bionic Spine",upgType:a.Augmentation},{cost:2e10,mults:{str:1.4,def:1.4},name:"BrachiBlades",upgType:a.Augmentation},{cost:12e9,mults:{str:1.2,def:1.2},name:"Nanofiber Weave",upgType:a.Augmentation},{cost:25e9,mults:{str:1.5,agi:1.5},name:"Synthetic Heart",upgType:a.Augmentation},{cost:15e9,mults:{str:1.3,def:1.3},name:"Synfibril Muscle",upgType:a.Augmentation},{cost:5e9,mults:{hack:1.05},name:"BitWire",upgType:a.Augmentation},{cost:1e10,mults:{hack:1.15},name:"Neuralstimulator",upgType:a.Augmentation},{cost:75e8,mults:{hack:1.1},name:"DataJack",upgType:a.Augmentation},{cost:5e10,mults:{str:1.7,def:1.7},name:"Graphene Bone Lacings",upgType:a.Augmentation}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;t.EventEmitter=class{constructor(e){if(this.subscribers={},Array.isArray(e))for(const t of e)this.addSubscriber(t)}addSubscriber(e){this.subscribers[e.id]=e.cb}emitEvent(...e){for(const t in this.subscribers)(0,this.subscribers[t])(e)}removeSubscriber(e){delete this.subscribers[e]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=void 0;const a=n(705),r=n(21),i=n(1141),o=n(416),s=n(27);class l extends a.BaseServer{constructor(e={hostname:"",ip:o.createRandomIp()}){super(e),this.backdoorInstalled=!1,this.baseDifficulty=1,this.hackDifficulty=1,this.minDifficulty=1,this.moneyAvailable=0,this.moneyMax=0,this.numOpenPortsRequired=5,this.openPortCount=0,this.purchasedByPlayer=!1,this.requiredHackingSkill=1,this.serverGrowth=1,this.hostname.startsWith("hacknet-node-")&&(this.hostname=i.createRandomString(10)),this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.maxRam=null!=e.maxRam?e.maxRam:0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*r.BitNodeMultipliers.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*r.BitNodeMultipliers.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*r.BitNodeMultipliers.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=e.serverGrowth?e.serverGrowth:1,this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5}capDifficulty(){this.hackDifficulty100&&(this.hackDifficulty=100)}changeMinimumSecurity(e,t=!1){t?this.minDifficulty*=e:this.minDifficulty+=e,this.minDifficulty=Math.max(1,this.minDifficulty)}changeMaximumMoney(e,t=!1){t?this.moneyMax*=e:this.moneyMax+=e}fortify(e){this.hackDifficulty+=e,this.capDifficulty()}weaken(e){this.hackDifficulty-=e*r.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()}toJSON(){return s.Generic_toJSON("Server",this)}static fromJSON(e){return s.Generic_fromJSON(l,e.data)}}t.Server=l,s.Reviver.constructors.Server=l},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"calculateRamUsage",function(){return calculateRamUsage});var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(213),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(109),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(159),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(10),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__);const specialReferenceIF="__SPECIAL_referenceIf",specialReferenceFOR="__SPECIAL_referenceFor",specialReferenceWHILE="__SPECIAL_referenceWhile",memCheckGlobalKey=".__GLOBAL__";async function parseOnlyRamCalculate(otherScripts,code,workerScript){try{let dependencyMap={};const completedParses=new Set,parseQueue=[];function parseCode(e,t){const n=parseOnlyCalculateDeps(e,t);completedParses.add(t);for(let e=0;e0;){const nextModule=parseQueue.shift();let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const e in module)"function"==typeof module[e]&&(code+=module[e].toString()+";\n")}catch(e){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.URLImportError}else{if(!Array.isArray(otherScripts))return console.warn("parseOnlyRamCalculate() not called with array of scripts"),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.ImportError;let e=null,t=nextModule.startsWith("./")?nextModule.slice(2):nextModule;for(const n of otherScripts)if(n.filename===t){e=n;break}if(null==e)return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.ImportError;code=e.code}parseCode(code,nextModule)}let ram=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptBaseRamCost;const unresolvedRefs=Object.keys(dependencyMap).filter(e=>e.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const e=unresolvedRefs.shift();if("hacknet"!==e||resolvedRefs.has("hacknet")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptHacknetNodesRamCost),"document"!==e||resolvedRefs.has("document")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptDomRamCost),"window"!==e||resolvedRefs.has("window")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptDomRamCost),resolvedRefs.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t);try{function applyFuncRam(e){if("function"!=typeof e)return 0;try{let t;return"number"==typeof(t="AsyncFunction"===e.constructor.name?0:e.apply(null,[]))?t:0}catch(e){return console.error(`Error applying function: ${e}`),0}}if(workerScript.loadedFns[e])continue;let t;workerScript.loadedFns[e]=!0,t=e in workerScript.env.vars.bladeburner?workerScript.env.vars.bladeburner[e]:e in workerScript.env.vars.codingcontract?workerScript.env.vars.codingcontract[e]:e in workerScript.env.vars.gang?workerScript.env.vars.gang[e]:e in workerScript.env.vars.sleeve?workerScript.env.vars.sleeve[e]:workerScript.env.vars[e],ram+=applyFuncRam(t)}catch(e){continue}}return ram}catch(e){return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}}function parseOnlyCalculateDeps(e,t){const n=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.b)(e,{sourceType:"module",ecmaVersion:9}),a=t+memCheckGlobalKey,r={};r[a]=new Set;let i={};var o=[];function s(e,n){const a=r[e]||(r[e]=new Set);n in i&&a.add(i[n]),a.add(t+"."+n),a.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(e,t)=>{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,specialReferenceFOR),e.init&&n(e.init,t),e.test&&n(e.test,t),e.update&&n(e.update,t),e.body&&n(e.body,t)},IfStatement:(e,t,n)=>{s(t.key,specialReferenceIF),e.test&&n(e.test,t),e.consequent&&n(e.consequent,t),e.alternate&&n(e.alternate,t)},MemberExpression:(e,t,n)=>{e.object&&n(e.object,t),e.property&&n(e.property,t)}}}return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(n,{key:a},Object.assign({ImportDeclaration:(e,t)=>{const n=e.source.value;o.push(n),r[t.key].add(n+memCheckGlobalKey);for(let a=0;a{const n=t+"."+e.id.name;acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(e,{key:n},c())}},c())),{dependencyMap:r,additionalModules:o}}async function calculateRamUsage(e,t){const n={loadedFns:{},env:{vars:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCosts}};try{return await parseOnlyRamCalculate(t,e,n)}catch(e){return console.error("Failed to parse script for RAM calculations:"),console.error(e),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;const a=n(1),r=n(36),i=n(238),o=n(27),s=n(150);class l{constructor(e=null){this.name="",this.desc="",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=100,this.difficultyFac=1.01,this.rewardFac=1.02,this.successes=0,this.failures=0,this.rankGain=0,this.rankLoss=0,this.hpLoss=0,this.hpLost=0,this.isStealth=!1,this.isKill=!1,this.count=r.getRandomInt(1e3,25e3),this.countGrowth=r.getRandomInt(1,5),this.weights={hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7},this.decays={hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.teamCount=0,e&&e.name&&(this.name=e.name),e&&e.desc&&(this.desc=e.desc),e&&e.baseDifficulty&&(this.baseDifficulty=i.addOffset(e.baseDifficulty,10)),e&&e.difficultyFac&&(this.difficultyFac=e.difficultyFac),e&&e.rewardFac&&(this.rewardFac=e.rewardFac),e&&e.rankGain&&(this.rankGain=e.rankGain),e&&e.rankLoss&&(this.rankLoss=e.rankLoss),e&&e.hpLoss&&(this.hpLoss=e.hpLoss),e&&e.isStealth&&(this.isStealth=e.isStealth),e&&e.isKill&&(this.isKill=e.isKill),e&&e.count&&(this.count=e.count),e&&e.countGrowth&&(this.countGrowth=e.countGrowth),e&&e.weights&&(this.weights=e.weights),e&&e.decays&&(this.decays=e.decays);let t=0;for(const e in this.weights)this.weights.hasOwnProperty(e)&&(t+=this.weights[e]);if(t-1>=10*Number.EPSILON)throw new Error("Invalid weights when constructing Action "+this.name+". The weights should sum up to 1. They sum up to :1");for(const e in this.decays)if(this.decays.hasOwnProperty(e)&&this.decays[e]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}getDifficulty(){const e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e}attempt(e){return Math.random()s.BladeburnerConstants.ChaosThreshold){const e=t.chaos-s.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}getEstSuccessChance(e){function t(e){return Math.max(0,Math.min(e,1))}const n=this.getSuccessChance(e,{est:!0}),a=this.getSuccessChance(e),r=Math.abs(a-n);let i=a-r,o=a+r;const s=e.getCurrentCity(),l=s.pop/s.popEst;return l<1?i*=l:o*=l,[t(i),t(o)]}getSuccessChance(e,t={est:!1}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");let n=this.getDifficulty(),r=0;for(const t in this.weights)if(this.weights.hasOwnProperty(t)){const n=a.Player.queryStatFromString(t),i="eff"+t.charAt(0).toUpperCase()+t.slice(1);let o=e.skillMultipliers[i];null==o&&(console.error(`Failed to find Bladeburner Skill multiplier for: ${t}`),o=1),r+=this.weights[t]*Math.pow(o*n,this.decays[t])}if(r*=a.Player.getIntelligenceBonus(.75),r*=e.calculateStaminaPenalty(),r*=this.getTeamSuccessBonus(e),r*=this.getChaosCompetencePenalty(e,t),n*=this.getChaosDifficultyBonus(e),"Raid"==this.name&&e.getCurrentCity().comms<=0)return 0;if(r*=e.skillMultipliers.successChanceAll,r*=this.getActionTypeSkillSuccessBonus(e),this.isStealth&&(r*=e.skillMultipliers.successChanceStealth),this.isKill&&(r*=e.skillMultipliers.successChanceKill),r*=a.Player.bladeburner_success_chance_mult,isNaN(r))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,r/n)}getSuccessesNeededForNextLevel(e){return Math.ceil(.5*this.maxLevel*(2*e+(this.maxLevel-1)))}setMaxLevel(e){this.successes>=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel}toJSON(){return o.Generic_toJSON("Action",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.Action=l,o.Reviver.constructors.Action=l},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSleevePurchasableAugs=void 0;const a=n(14),r=n(4),i=n(16);t.findSleevePurchasableAugs=function(e,t){const n=e.augmentations.map(e=>e.name),o=[];function s(e){return e.name!==r.AugmentationNames.NeuroFluxGovernor&&!n.includes(e.name)&&!o.includes(e)&&!e.isSpecial}if(t.inGang()){const e=t.getGangFaction();for(const t in a.Augmentations){const n=a.Augmentations[t];s(n)&&e.playerReputation>n.baseRepRequirement&&o.push(n)}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.Factions[e];if(null!=t)for(const e of t.augmentations){const n=a.Augmentations[e];s(n)&&t.playerReputation>n.baseRepRequirement&&o.push(n)}}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateServerGrowth=void 0;const a=n(11),r=n(21);t.calculateServerGrowth=function(e,t,n,i=1){const o=Math.max(Math.floor(t),0);let s=1+(a.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;s>a.CONSTANTS.ServerMaxGrowthRate&&(s=a.CONSTANTS.ServerMaxGrowthRate);const l=o*(e.serverGrowth/100)*r.BitNodeMultipliers.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*n.hacking_grow_mult*c)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeLoadingScreen=void 0;const a=n(198),r=n(49);t.removeLoadingScreen=function(){r.removeElementById("loader"),a.getElementById("entire-game-container").style.visibility="visible"}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveScriptsRoot=void 0;const o=i(n(0)),s=n(945),l=n(944);t.ActiveScriptsRoot=class extends o.Component{constructor(e){super(e)}render(){return o.createElement(o.Fragment,null,o.createElement("p",null,"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running."),o.createElement(s.ScriptProduction,Object.assign({},this.props)),o.createElement(l.ServerAccordions,Object.assign({},this.props)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.clearResleevesPage=t.createResleevesPage=void 0;const o=n(947),s=n(14),l=n(3),c=n(31),u=n(19),m=n(12),p=n(97),d=n(13),h=n(431),_=n(181),g=n(156),f=n(172),y=i(n(0)),b=n(415),E={container:null,info:null,sortTag:null,sortSelector:null,resleeveList:null,resleeves:null};let v;function C(e){const t={container:null,statsPanel:null,stats:null,multipliersButton:null,augPanel:null,augSelector:null,augDescription:null,costPanel:null,costText:null,buyButton:null};if(!u.routing.isOn(u.Page.Resleeves))return t;t.container=d.createElement("div",{class:"resleeve-container",display:"block"}),t.statsPanel=d.createElement("div",{class:"resleeve-panel",width:"30%"}),t.stats=d.createElement("p",{class:"resleeve-stats-text",innerHTML:`Hacking: ${l.numeralWrapper.formatSkill(e.hacking_skill)} (${l.numeralWrapper.formatExp(e.hacking_exp)} exp)
`+`Strength: ${l.numeralWrapper.formatSkill(e.strength)} (${l.numeralWrapper.formatExp(e.strength_exp)} exp)
`+`Defense: ${l.numeralWrapper.formatSkill(e.defense)} (${l.numeralWrapper.formatExp(e.defense_exp)} exp)
`+`Dexterity: ${l.numeralWrapper.formatSkill(e.dexterity)} (${l.numeralWrapper.formatExp(e.dexterity_exp)} exp)
`+`Agility: ${l.numeralWrapper.formatSkill(e.agility)} (${l.numeralWrapper.formatExp(e.agility_exp)} exp)
`+`Charisma: ${l.numeralWrapper.formatSkill(e.charisma)} (${l.numeralWrapper.formatExp(e.charisma_exp)} exp)
`+`# Augmentations: ${e.augmentations.length}`}),t.multipliersButton=d.createElement("button",{class:"std-button",innerText:"Multipliers",clickListener:()=>{m.dialogBoxCreate(["

Total Multipliers:

",`Hacking Level multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_mult)}`,`Hacking Experience multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_exp_mult)}`,`Strength Level multiplier: ${l.numeralWrapper.formatPercentage(e.strength_mult)}`,`Strength Experience multiplier: ${l.numeralWrapper.formatPercentage(e.strength_exp_mult)}`,`Defense Level multiplier: ${l.numeralWrapper.formatPercentage(e.defense_mult)}`,`Defense Experience multiplier: ${l.numeralWrapper.formatPercentage(e.defense_exp_mult)}`,`Dexterity Level multiplier: ${l.numeralWrapper.formatPercentage(e.dexterity_mult)}`,`Dexterity Experience multiplier: ${l.numeralWrapper.formatPercentage(e.dexterity_exp_mult)}`,`Agility Level multiplier: ${l.numeralWrapper.formatPercentage(e.agility_mult)}`,`Agility Experience multiplier: ${l.numeralWrapper.formatPercentage(e.agility_exp_mult)}`,`Charisma Level multiplier: ${l.numeralWrapper.formatPercentage(e.charisma_mult)}`,`Charisma Experience multiplier: ${l.numeralWrapper.formatPercentage(e.charisma_exp_mult)}`,`Hacking Chance multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_chance_mult)}`,`Hacking Speed multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_speed_mult)}`,`Hacking Money multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_money_mult)}`,`Hacking Growth multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_grow_mult)}`,`Salary multiplier: ${l.numeralWrapper.formatPercentage(e.work_money_mult)}`,`Company Reputation Gain multiplier: ${l.numeralWrapper.formatPercentage(e.company_rep_mult)}`,`Faction Reputation Gain multiplier: ${l.numeralWrapper.formatPercentage(e.faction_rep_mult)}`,`Crime Money multiplier: ${l.numeralWrapper.formatPercentage(e.crime_money_mult)}`,`Crime Success multiplier: ${l.numeralWrapper.formatPercentage(e.crime_success_mult)}`,`Hacknet Income multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_money_mult)}`,`Hacknet Purchase Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_purchase_cost_mult)}`,`Hacknet Level Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_level_cost_mult)}`,`Hacknet Ram Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_ram_cost_mult)}`,`Hacknet Core Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_core_cost_mult)}`,`Bladeburner Max Stamina multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_max_stamina_mult)}`,`Bladeburner Stamina Gain multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_stamina_gain_mult)}`,`Bladeburner Field Analysis multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_analysis_mult)}`,`Bladeburner Success Chance multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_success_chance_mult)}`].join("
"),!1)}}),t.statsPanel.appendChild(t.stats),t.statsPanel.appendChild(t.multipliersButton),t.augPanel=d.createElement("div",{class:"resleeve-panel",width:"50%"}),t.augSelector=d.createElement("select",{class:"resleeve-aug-selector dropdown"}),t.augDescription=d.createElement("p");for(let n=0;n{!function(e){if(null==e.augDescription)throw new Error("elems.augDescription is null in updateAugDescription()");const t=_.getSelectValue(e.augSelector),n=s.Augmentations[t];if(null==n)return void console.warn(`Could not find Augmentation with name ${t}`);let a=n.info;"string"!=typeof a&&(a=b.renderToStaticMarkup(a));e.augDescription.innerHTML=a}(t)}),t.augSelector.dispatchEvent(new Event("change")),t.augPanel.appendChild(t.augSelector),t.augPanel.appendChild(t.augDescription);const n=e.getCost();return t.costPanel=d.createElement("div",{class:"resleeve-panel",width:"20%"}),t.costText=d.createElement("p",{innerHTML:`It costs ${b.renderToStaticMarkup(c.Money(n))} `+"to purchase this Sleeve."}),t.buyButton=d.createElement("button",{class:"std-button",innerText:"Purchase",clickListener:()=>{if(null==v)throw new Error("playerRef is null in buyButton.click()");o.purchaseResleeve(e,v)?m.dialogBoxCreate(y.createElement(y.Fragment,null,"You re-sleeved for ",c.Money(n),"!"),!1):m.dialogBoxCreate("You cannot afford to re-sleeve into this body",!1)}}),t.costPanel.appendChild(t.costText),t.costPanel.appendChild(t.buyButton),t.container.appendChild(t.statsPanel),t.container.appendChild(t.augPanel),t.container.appendChild(t.costPanel),t}t.createResleevesPage=function(e){if(u.routing.isOn(u.Page.Resleeves))try{let t;v=e,E.container=d.createElement("div",{class:"generic-menupage-container",id:"resleeves-container",position:"fixed"}),E.info=d.createElement("p",{display:"block",innerHTML:"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!

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

NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.",width:"75%"}),0===e.resleeves.length&&(e.resleeves=o.generateResleeves()),E.sortTag=d.createElement("p",{display:"inline-block",innerText:"Sort By: "}),E.sortSelector=d.createElement("select",{class:"dropdown"}),function(e){e.Cost="Cost",e.Hacking="Hacking",e.Strength="Strength",e.Defense="Defense",e.Dexterity="Dexterity",e.Agility="Agility",e.Charisma="Charisma",e.AverageCombatStats="AverageCombat",e.AverageAllStats="AverageAllStats",e.TotalNumAugmentations="TotalNumAugmentations"}(t||(t={})),E.sortSelector.add(h.createOptionElement("Cost",t.Cost)),E.sortSelector.add(h.createOptionElement("Hacking Level",t.Hacking)),E.sortSelector.add(h.createOptionElement("Strength Level",t.Strength)),E.sortSelector.add(h.createOptionElement("Defense Level",t.Defense)),E.sortSelector.add(h.createOptionElement("Dexterity Level",t.Dexterity)),E.sortSelector.add(h.createOptionElement("Agility Level",t.Agility)),E.sortSelector.add(h.createOptionElement("Charisma Level",t.Charisma)),E.sortSelector.add(h.createOptionElement("Average Combat Stats",t.AverageCombatStats)),E.sortSelector.add(h.createOptionElement("Average Stats",t.AverageAllStats)),E.sortSelector.add(h.createOptionElement("Number of Augmentations",t.TotalNumAugmentations)),E.resleeveList=d.createElement("ul"),E.sortSelector.onchange=(()=>{function n(...e){let t=0;for(let n=0;ne.hacking_skill-t.hacking_skill);break;case t.Strength:e.resleeves.sort((e,t)=>e.strength-t.strength);break;case t.Defense:e.resleeves.sort((e,t)=>e.defense-t.defense);break;case t.Dexterity:e.resleeves.sort((e,t)=>e.dexterity-t.dexterity);break;case t.Agility:e.resleeves.sort((e,t)=>e.agility-t.agility);break;case t.Charisma:e.resleeves.sort((e,t)=>e.charisma-t.charisma);break;case t.AverageCombatStats:e.resleeves.sort((e,t)=>n(e.strength,e.defense,e.dexterity,e.agility)-n(t.strength,t.defense,t.dexterity,t.agility));break;case t.AverageAllStats:e.resleeves.sort((e,t)=>n(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-n(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma));break;case t.TotalNumAugmentations:e.resleeves.sort((e,t)=>e.augmentations.length-t.augmentations.length);break;case t.Cost:default:e.resleeves.sort((e,t)=>e.getCost()-t.getCost())}if(null==E.resleeveList)throw new Error("UIElems.resleeveList is null in sortSelector.click()");if(null==E.resleeves)throw new Error("UIElems.resleeves is null in sortSelector.click()");for(const t of e.resleeves){const e=C(t);if(null==e.container)throw new Error("resleeveUi.container is null in sortSelector.click()");E.resleeveList.appendChild(e.container),E.resleeves.push(e)}}),E.sortSelector.dispatchEvent(new Event("change")),E.container.appendChild(E.info),E.container.appendChild(d.createElement("br")),E.container.appendChild(E.sortTag),E.container.appendChild(E.sortSelector),E.container.appendChild(E.resleeveList);const n=document.getElementById("entire-game-container");if(null==n)throw new Error("Could not find entire-game-container in createResleevesPage()");n.appendChild(E.container)}catch(e){p.exceptionAlert(e)}},t.clearResleevesPage=function(){E.container instanceof HTMLElement&&f.removeElement(E.container);for(const e in E)E[e]=null;v=null}},,,,,,function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});n(4),n(99),n(184),n(35),n(32),n(16),n(1),n(461),n(23),n(24),n(108),n(52),n(100),n(199),n(17),n(118),n(12),n(13);var a=n(49),r=(n(31),n(0)),i=n.n(r);n(22);i.a.Component;const o="dev-menu-container";function s(){throw new Error("Cannot create Dev Menu because you are not in a dev build")}function l(){Object(a.removeElementById)(o)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.executeDarkwebTerminalCommand=t.checkIfConnectedToDarkweb=void 0;const o=i(n(0)),s=n(305),l=n(1),c=n(45),u=n(7),m=n(31),p=n(704);t.checkIfConnectedToDarkweb=function(){if(c.SpecialServerIps.hasOwnProperty("Darkweb Server")){const e=c.SpecialServerIps.getIp("Darkweb Server");if(!p.isValidIPAddress(e))return;e==l.Player.getCurrentServer().ip&&u.post("You are now connected to the dark web. From the dark web you can purchase illegal items. Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] to purchase an item.")}},t.executeDarkwebTerminalCommand=function(e){if(0!=e.length)switch(e[0]){case"buy":{if(2!=e.length)return u.post("Incorrect number of arguments. Usage: "),u.post("buy -l"),void u.post("buy [item name]");const t=e[1];"-l"==t||"-1"==t||"--list"==t?function(){for(const e in s.DarkWebItems){const t=s.DarkWebItems[e];u.postElement(o.createElement(o.Fragment,null,t.program," - ",m.Money(t.price)," - ",t.description))}}():function(e){e=e.toLowerCase();let t=null;for(const n in s.DarkWebItems){const a=s.DarkWebItems[n];a.program.toLowerCase()==e&&(t=a)}null!==t?l.Player.hasProgram(t.program)?u.post("You already have the "+t.program+" program"):l.Player.money.lt(t.price)?u.post("Not enough money to purchase "+t.program):(l.Player.loseMoney(t.price),l.Player.getHomeComputer().programs.push(t.program),u.post("You have purchased the "+t.program+" program. The new program can be found on your home computer.")):u.post("Unrecognized item: "+e)}(t);break}default:u.post("Command not found")}}},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(23),o=n(86);const s={All:0,Foreign:1,Owned:2,Purchased:3};class l extends r.a.Component{isValidServer(e){const t=this.props.serverType;switch(t){case s.All:return!0;case s.Foreign:return"home"!==e.hostname&&!e.purchasedByPlayer;case s.Owned:return e.purchasedByPlayer||e instanceof o.HacknetServer||"home"===e.hostname;case s.Purchased:return e.purchasedByPlayer||e instanceof o.HacknetServer;default:return console.warn(`Invalid ServerType specified for ServerDropdown component: ${t}`),!1}}renderOption(e){return r.a.createElement("option",{key:e.hostname,value:e.hostname},e.hostname)}render(){const e=[];for(const t in i.AllServers){const n=i.AllServers[t];this.isValidServer(n)&&e.push(this.renderOption(n))}return r.a.createElement("select",{className:"dropdown",onChange:this.props.onChange,style:this.props.style},e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetNode=void 0;const a=n(11),r=n(160),i=n(37),o=n(12),s=n(27);class l{constructor(e="",t=1){this.cores=1,this.level=1,this.moneyGainRatePerSecond=0,this.onlineTimeSeconds=0,this.ram=1,this.totalMoneyGenerated=0,this.name=e,this.updateMoneyGainRate(t)}calculateCoreUpgradeCost(e=1,t){return r.calculateCoreUpgradeCost(this.cores,e,t)}calculateLevelUpgradeCost(e=1,t){return r.calculateLevelUpgradeCost(this.level,e,t)}calculateRamUpgradeCost(e=1,t){return r.calculateRamUpgradeCost(this.ram,e,t)}process(e=1){const t=e*a.CONSTANTS.MilliPerCycle/1e3;let n=this.moneyGainRatePerSecond*t;return isNaN(n)&&(console.error(`Hacknet Node ${this.name} calculated earnings of NaN`),n=0),this.totalMoneyGenerated+=n,this.onlineTimeSeconds+=t,n}upgradeCore(e=1,t){this.cores=Math.min(i.HacknetNodeConstants.MaxCores,Math.round(this.cores+e)),this.updateMoneyGainRate(t)}upgradeLevel(e=1,t){this.level=Math.min(i.HacknetNodeConstants.MaxLevel,Math.round(this.level+e)),this.updateMoneyGainRate(t)}upgradeRam(e=1,t){for(let t=0;t=t.AllCorporationStates.length)&&(this.state=0),++this.state,this.state>=t.AllCorporationStates.length&&(this.state=0)}toJSON(){return a.Generic_toJSON("CorporationState",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.CorporationState=r,a.Reviver.constructors.CorporationState=r},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionButton=void 0;const o=i(n(0));t.AccordionButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n="accordion-button";t&&(n+=" tooltip"),"string"==typeof e.addClasses&&(n+=` ${e.addClasses}`);const a={__html:e.tooltip?e.tooltip:""};return o.createElement("button",{className:n,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:a}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScriptAccordion=void 0;const o=i(n(0)),s=n(3),l=n(167),c=n(564),u=n(78),m=n(12),p=n(158),d=n(20),h=n(117),_=n(31);t.WorkerScriptAccordion=function(e){const t=e.workerScript.scriptRef,n=p.logBoxCreate.bind(null,t),a=u.killWorkerScript.bind(null,t,t.server),r=t.onlineMoneyMade/t.onlineRunningTime,i=t.onlineExpGained/t.onlineRunningTime,g=t.offlineMoneyMade/t.offlineRunningTime,f=t.offlineExpGained/t.offlineRunningTime;return o.createElement(l.Accordion,{headerClass:"active-scripts-script-header",headerContent:o.createElement(o.Fragment,null,e.workerScript.name),panelClass:"active-scripts-script-panel",panelContent:o.createElement(o.Fragment,null,o.createElement("pre",null,"Threads: ",s.numeralWrapper.formatThreads(e.workerScript.scriptRef.threads)),o.createElement("pre",null,"Args: ",h.arrayToString(e.workerScript.args)),o.createElement("pre",null,"Online Time: ",d.convertTimeMsToTimeElapsedString(1e3*t.onlineRunningTime)),o.createElement("pre",null,"Offline Time: ",d.convertTimeMsToTimeElapsedString(1e3*t.offlineRunningTime)),o.createElement("pre",null,"Total online production: ",_.Money(t.onlineMoneyMade)),o.createElement("pre",null,Array(26).join(" ")+s.numeralWrapper.formatExp(t.onlineExpGained)+" hacking exp"),o.createElement("pre",null,"Online production rate: ",_.Money(r)," / second"),o.createElement("pre",null,Array(25).join(" ")+s.numeralWrapper.formatExp(i)+" hacking exp / second"),o.createElement("pre",null,"Total offline production: ",_.Money(t.offlineMoneyMade)),o.createElement("pre",null,Array(27).join(" ")+s.numeralWrapper.formatExp(t.offlineExpGained)+" hacking exp"),o.createElement("pre",null,"Offline production rate: ",_.Money(g)," / second"),o.createElement("pre",null,Array(26).join(" ")+s.numeralWrapper.formatExp(f)+" hacking exp / second"),o.createElement(c.AccordionButton,{onClick:n,text:"Log"}),o.createElement(c.AccordionButton,{onClick:function(){a(),m.dialogBoxCreate("Killing script")},text:"Kill Script"}))})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.Card=t.Suit=void 0,function(e){e.Clubs="clubs",e.Diamonds="diamonds",e.Hearts="hearts",e.Spades="spades"}(a=t.Suit||(t.Suit={}));t.Card=class{constructor(e,t){if(this.value=e,this.suit=t,e<1||e>13)throw new Error(`Card instantiated with improper value: ${e}`)}formatValue(){switch(this.value){case 1:return"A";case 11:return"J";case 12:return"Q";case 13:return"K";default:return`${this.value}`}}isRedSuit(){return this.suit===a.Hearts||this.suit===a.Diamonds}getStringRepresentation(){return`${this.formatValue()} of ${this.suit}`}}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlinkingCursor=void 0;const r=a(n(0));t.BlinkingCursor=function(){return r.default.createElement("span",{style:{fontSize:"1em"},className:"blinking-cursor"},"|")}},,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TeamSizePopup=void 0;const o=i(n(0)),s=n(79),l=n(12);t.TeamSizePopup=function(e){const[t,n]=o.useState();return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."),o.default.createElement("input",{autoFocus:!0,type:"number",placeholder:"Team size",className:"text-input",onChange:e=>n(parseFloat(e.target.value))}),o.default.createElement("a",{className:"a-link-button",onClick:function(){if(void 0===t)return;const n=Math.round(t);isNaN(n)||n<0?l.dialogBoxCreate("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=n,s.removePopup(e.popupId)}},"Confirm"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationAccordion=void 0;const o=i(n(0)),s=n(167),l=n(4);t.AugmentationAccordion=function(e){let t=e.aug.name;return null!=e.level&&e.aug.name===l.AugmentationNames.NeuroFluxGovernor&&(t+=` - Level ${e.level}`),"string"==typeof e.aug.info?o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,t),panelContent:o.createElement("p",null,o.createElement("span",{dangerouslySetInnerHTML:{__html:e.aug.info}}),o.createElement("br",null),o.createElement("br",null),e.aug.stats)}):o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,t),panelContent:o.createElement("p",null,e.aug.info,o.createElement("br",null),o.createElement("br",null),e.aug.stats)})}},,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButtonPurchased=void 0;const o=i(n(0));t.StdButtonPurchased=class extends o.Component{constructor(e){super(e),this.hasTooltip=this.hasTooltip.bind(this),this.tooltip=this.tooltip.bind(this)}hasTooltip(){return null!=this.props.tooltip&&""!==this.props.tooltip}tooltip(){return this.props.tooltip?this.props.tooltip:""}render(){let e="std-button-bought";this.hasTooltip()&&(e+=" tooltip");let t={__html:""};return this.hasTooltip()&&(t={__html:this.tooltip()}),o.createElement("button",{className:e,onClick:this.props.onClick,style:this.props.style},this.props.text,this.hasTooltip()&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t}))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorPositions=t.PositionTracker=void 0;class a{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}t.PositionTracker=a,t.CursorPositions=new a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberTask=void 0;t.GangMemberTask=class{constructor(e,t,n,a,r){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=a,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangConstants=void 0,t.GangConstants={GangRespectToReputationRatio:25,MaximumGangMembers:12,CyclesPerTerritoryAndPowerUpdate:100,AscensionMultiplierRatio:.15,Names:["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidIPAddress=void 0,t.isValidIPAddress=function(e){const t="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n=`^${t}.${t}.${t}.${t}$`;return new RegExp(n).test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseServer=void 0;const a=n(99),r=n(237),i=n(94),o=n(145),s=n(74),l=n(416),c=n(204);t.BaseServer=class{constructor(e={hostname:"",ip:l.createRandomIp()}){this.contracts=[],this.cpuCores=1,this.ftpPortOpen=!1,this.hasAdminRights=!1,this.hostname="",this.httpPortOpen=!1,this.ip="",this.isConnectedTo=!1,this.maxRam=0,this.messages=[],this.organizationName="",this.programs=[],this.ramUsed=0,this.runningScripts=[],this.scripts=[],this.serversOnNetwork=[],this.smtpPortOpen=!1,this.sqlPortOpen=!1,this.sshPortOpen=!1,this.textFiles=[],this.ip=e.ip?e.ip:l.createRandomIp(),this.hostname=e.hostname,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights}addContract(e){this.contracts.push(e)}getContract(e){for(const t of this.contracts)if(t.fn===e)return t;return null}getRunningScript(e,t){for(const n of this.runningScripts)if(n.filename===e&&c.compareArrays(n.args,t))return n;return null}getScript(e){for(let t=0;tt.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)}removeFile(e){if(e.endsWith(".exe")||null!=e.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/)){for(let t=0;tr.removePopup(t.PopupId)})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Favor=void 0;const o=i(n(0)),s=n(3);t.Favor=function(e){return o.createElement("span",{className:"light-yellow samefont"},"number"==typeof e?s.numeralWrapper.formatFavor(e):e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skill=void 0;const a=n(21);t.Skill=class{constructor(e={name:"foo",desc:"foo"}){if(this.baseCost=1,this.costInc=1,this.maxLvl=0,this.successChanceAll=0,this.successChanceStealth=0,this.successChanceKill=0,this.successChanceContract=0,this.successChanceOperation=0,this.successChanceEstimate=0,this.actionTime=0,this.effHack=0,this.effStr=0,this.effDef=0,this.effDex=0,this.effAgi=0,this.effCha=0,this.stamina=0,this.money=0,this.expGain=0,!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.name=e.name,this.desc=e.desc,this.baseCost=e.baseCost?e.baseCost:1,this.costInc=e.costInc?e.costInc:1,e.maxLvl&&(this.maxLvl=e.maxLvl),e.successChanceAll&&(this.successChanceAll=e.successChanceAll),e.successChanceStealth&&(this.successChanceStealth=e.successChanceStealth),e.successChanceKill&&(this.successChanceKill=e.successChanceKill),e.successChanceContract&&(this.successChanceContract=e.successChanceContract),e.successChanceOperation&&(this.successChanceOperation=e.successChanceOperation),e.successChanceEstimate&&(this.successChanceEstimate=e.successChanceEstimate),e.actionTime&&(this.actionTime=e.actionTime),e.effHack&&(this.effHack=e.effHack),e.effStr&&(this.effStr=e.effStr),e.effDef&&(this.effDef=e.effDef),e.effDex&&(this.effDex=e.effDex),e.effAgi&&(this.effAgi=e.effAgi),e.effCha&&(this.effCha=e.effCha),e.stamina&&(this.stamina=e.stamina),e.money&&(this.money=e.money),e.expGain&&(this.expGain=e.expGain)}calculateCost(e){return Math.floor((this.baseCost+e*this.costInc)*a.BitNodeMultipliers.BladeburnerSkillCost)}getMultiplier(e){return"successChanceAll"===e?this.successChanceAll:"successChanceStealth"===e?this.successChanceStealth:"successChanceKill"===e?this.successChanceKill:"successChanceContract"===e?this.successChanceContract:"successChanceOperation"===e?this.successChanceOperation:"successChanceEstimate"===e?this.successChanceEstimate:"actionTime"===e?this.actionTime:"effHack"===e?this.effHack:"effStr"===e?this.effStr:"effDef"===e?this.effDef:"effDex"===e?this.effDex:"effAgi"===e?this.effAgi:"effCha"===e?this.effCha:"stamina"===e?this.stamina:"money"===e?this.money:"expGain"===e?this.expGain:0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skills=void 0;const a=n(750),r=n(1309);t.Skills={},t.Skills[r.SkillNames.BladesIntuition]=new a.Skill({name:r.SkillNames.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),t.Skills[r.SkillNames.Cloak]=new a.Skill({name:r.SkillNames.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),t.Skills[r.SkillNames.ShortCircuit]=new a.Skill({name:r.SkillNames.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),t.Skills[r.SkillNames.DigitalObserver]=new a.Skill({name:r.SkillNames.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),t.Skills[r.SkillNames.Tracer]=new a.Skill({name:r.SkillNames.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),t.Skills[r.SkillNames.Overclock]=new a.Skill({name:r.SkillNames.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),t.Skills[r.SkillNames.Reaper]=new a.Skill({name:r.SkillNames.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),t.Skills[r.SkillNames.EvasiveSystem]=new a.Skill({name:r.SkillNames.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),t.Skills[r.SkillNames.Datamancer]=new a.Skill({name:r.SkillNames.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),t.Skills[r.SkillNames.CybersEdge]=new a.Skill({name:r.SkillNames.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),t.Skills[r.SkillNames.HandsOfMidas]=new a.Skill({name:r.SkillNames.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),t.Skills[r.SkillNames.Hyperdrive]=new a.Skill({name:r.SkillNames.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActions=void 0;const a=n(518);t.GeneralActions={},function(){let e;e="Training",t.GeneralActions[e]=new a.Action({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),e="Field Analysis",t.GeneralActions[e]=new a.Action({name:e,desc:"Mine and analyze Synthoid-related data. This improves the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.

Does NOT require stamina."}),e="Recruitment",t.GeneralActions[e]=new a.Action({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.

Does NOT require stamina."}),e="Diplomacy",t.GeneralActions[e]=new a.Action({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.

Does NOT require stamina."}),e="Hyperbolic Regeneration Chamber",t.GeneralActions[e]=new a.Action({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.

"})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const a=n(150),r=n(518),i=n(27);class o extends r.Action{constructor(e=null){super(e),this.reqdRank=100,this.teamCount=0,e&&e.reqdRank&&(this.reqdRank=e.reqdRank),e&&e.teamCount&&(this.teamCount=e.teamCount)}getTeamSuccessBonus(e){if(this.teamCount&&this.teamCount>0){return this.teamCount=Math.min(this.teamCount,e.teamSize),Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(e){const t=e.getCurrentCity();if(t.chaos>a.BladeburnerConstants.ChaosThreshold){const e=t.chaos-a.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}toJSON(){return i.Generic_toJSON("Operation",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Operation=o,i.Reviver.constructors.Operation=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperation=void 0;const a=n(753),r=n(27);class i extends a.Operation{constructor(e=null){super(e),this.count=1,this.countGrowth=0}getActionTimePenalty(){return 1.5}getChaosCompetencePenalty(){return 1}getChaosDifficultyBonus(){return 1}toJSON(){return r.Generic_toJSON("BlackOperation",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.BlackOperation=i,r.Reviver.constructors.BlackOperation=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperations=void 0;const a=n(754);t.BlackOperations={},t.BlackOperations["Operation Typhoon"]=new a.BlackOperation({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.

The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Zero"]=new a.BlackOperation({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.

The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation X"]=new a.BlackOperation({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.

Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Titan"]=new a.BlackOperation({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.

Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ares"]=new a.BlackOperation({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.

Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Archangel"]=new a.BlackOperation({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.

The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Juggernaut"]=new a.BlackOperation({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.

Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Red Dragon"]=new a.BlackOperation({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.

Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation K"]=new a.BlackOperation({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.

We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its creation.",baseDifficulty:15e3,reqdRank:3e4,rankGain:750,rankLoss:60,hpLoss:1e3,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Deckard"]=new a.BlackOperation({name:"Operation Deckard",desc:"Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.

The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.",baseDifficulty:2e4,reqdRank:4e4,rankGain:1e3,rankLoss:75,hpLoss:200,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Tyrell"]=new a.BlackOperation({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.

We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Wallace"]=new a.BlackOperation({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.

The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Shoulder of Orion"]=new a.BlackOperation({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.

The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Hyron"]=new a.BlackOperation({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.

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

The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Morpheus"]=new a.BlackOperation({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.

The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Ion Storm"]=new a.BlackOperation({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.

This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Annihilus"]=new a.BlackOperation({name:"Operation Annihilus",desc:"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.",baseDifficulty:55e3,reqdRank:2e5,rankGain:7500,rankLoss:1e3,hpLoss:1e4,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ultron"]=new a.BlackOperation({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.

OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.

Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).

Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Centurion"]=new a.BlackOperation({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.

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

D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Vindictus"]=new a.BlackOperation({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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

D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Daedalus"]=new a.BlackOperation({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FactionInfos=t.FactionInfo=void 0;class a{constructor(e,t,n,a,r,i){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=a,this.offerFieldWork=r,this.offerSecurityWork=i,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}offersWork(){return this.offerFieldWork||this.offerHackingMission||this.offerHackingWork||this.offerSecurityWork}}t.FactionInfo=a,t.FactionInfos={Illuminati:new a("Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And from this chaos, we are the invisible hand that guides them to order. ",[],!0,!0,!0,!1),Daedalus:new a("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new a("Surrender yourself. Give up your empty individuality to become part of something great, something eternal. Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.

Only then can you discover immortality.",[],!0,!0,!0,!1),ECorp:new a("ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.",[],!0,!0,!0,!0),MegaCorp:new a("MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an unprecendented scale, in ways that no other company can.

In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.",[],!0,!0,!0,!0),"Bachman & Associates":new a("Where Law and Business meet - thats where we are.

Legal Insight - Business Instinct - Innovative Experience.",[],!0,!0,!0,!0),"Blade Industries":new a("Augmentation is Salvation.",[],!0,!0,!0,!0),NWO:new a("Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given purpose and direction in life. That is why they created God. And that is why they created civilization - not because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.",[],!0,!0,!0,!0),"Clarke Incorporated":new a("The Power of the Genome - Unlocked.",[],!0,!0,!0,!0),"OmniTek Incorporated":new a("Simply put, our mission is to design and build robots that make a difference.",[],!0,!0,!0,!0),"Four Sigma":new a("The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",[],!0,!0,!0,!0),"KuaiGong International":new a("Dream big. Work hard. Make history.",[],!0,!0,!0,!0),"Fulcrum Secret Technologies":new a("The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it would be necessary to create them. And now we can.",[],!0,!0,!1,!0),BitRunners:new a("Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be reconstructed. Transformed. Used.

Those who run the bits, run the world.",[],!0,!0,!1,!1),"The Black Hand":new a("The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. Technological power. And those at the top rule with an invisible hand. They built a society where the rich get richer, and everyone else suffers.

So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__
_.nITESECNIt.
.-'NITESECNITESEc.
.' NITESECNITESECn
/ NITESECNITESEC;
: :NITESECNITESEC;
; $ NITESECNITESECN
: _, ,N'ITESECNITESEC
: .+^^`, : `NITESECNIT
) /), `-,-=,NITESECNI
/ ^ ,-;|NITESECN;
/ _.' '-';NITESECN
( , ,-''`^NITE'
)` :`. .'
)-- ; `- /
' _.-' :
( _.-' .
------.
.
_.nIt
_.nITESECNi
nITESECNIT^'
NITE^' ___
/ .gP''''Tp.
: d' . `b
; d' o `b ;
/ d; `b|
/, $; @ `:
/' $$ ;
.' $$b o |
.' d$$$; :
/ .d$$$$; , ;
d .dNITESEC $ |
:bp.__.gNITESEC$$ :$ ;
NITESECNITESECNIT $$b :
",[],!0,!0,!1,!1),Aevum:new a("The Silicon City.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new a("Serve the People.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new a("The East Asian Order of the Future.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new a("Asia's World City.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new a("The City of the Future.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new a("Benefit, Honor, and Glory.",["Chongqing","Sector-12","New Tokyo","Aevum","Ishima"],!0,!0,!0,!0),"Speakers for the Dead":new a("It is better to reign in Hell than to serve in Heaven.",[],!0,!0,!0,!0),"The Dark Army":new a("The World doesn't care about right or wrong. It only cares about power.",[],!0,!0,!0,!1),"The Syndicate":new a("Honor holds you back.",[],!0,!0,!0,!0),Silhouette:new a("Corporations have filled the void of power left behind by the collapse of Western government. The issue is they've become so big that you don't know who they're working for. And if you're employed at one of these corporations, you don't even know who you're working for.

That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",[],!0,!0,!0,!1),Tetrads:new a("Following the mandate of Heaven and carrying out the way.",[],!1,!1,!0,!0),"Slum Snakes":new a("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new a("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new a("Obey Heaven and work righteously.",[],!0,!0,!1,!0),CyberSec:new a("The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.",[],!0,!0,!1,!1),Bladeburners:new a("It's too bad they won't live. But then again, who does?

Note that for this faction, reputation can only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",[],!1,!1,!1,!1)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FileDiagnosticPopup=t.ServerAccordion=void 0;const r=a(n(0)),i=n(23),o=n(167),s=n(3);function l(e){const t=i.AllServers[e.ip];let n=0;for(const e of t.scripts)n+=e.code.length;for(const e of t.textFiles)n+=e.text.length;if(0===n)return r.default.createElement(r.default.Fragment,null);const a=[];for(const e of t.scripts)a.push({name:e.filename,size:e.code.length});for(const e of t.textFiles)a.push({name:e.fn,size:e.text.length});return a.sort((e,t)=>t.size-e.size),r.default.createElement(o.Accordion,{headerContent:r.default.createElement(r.default.Fragment,null,t.hostname," (",s.numeralWrapper.formatBigNumber(n),"b)"),panelContent:r.default.createElement("ul",null,a.map(e=>r.default.createElement("li",{key:e.name},e.name,": ",s.numeralWrapper.formatBigNumber(e.size),"b")))})}t.ServerAccordion=l,t.FileDiagnosticPopup=function(e){const t=[];for(const e of Object.keys(i.AllServers))t.push(e);return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are."),t.map(e=>r.default.createElement(l,{key:e,ip:e})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuHeaders=t.MainMenuHeaders=void 0;const a=n(34);function r(e,t,n){for(let n=0;n0?"list-item":"none",this.classList.toggle("opened");const c=[t,n,o,s,l],u=[a.MainMenuLinks.Stats,a.MainMenuLinks.Factions,a.MainMenuLinks.Augmentations,a.MainMenuLinks.HacknetNodes,a.MainMenuLinks.Sleeves];t.style.maxHeight?r(!1,c,u):r(!0,c,u)},t.MainMenuHeaders.World.onclick=function(){const t=i("city-tab"),n=i("travel-tab"),o=i("job-tab"),s=i("stock-market-tab"),l=i("bladeburner-tab"),c=i("corporation-tab"),u=i("gang-tab");o.style.display=""!==e.companyName?"list-item":"none",s.style.display=e.hasWseAccount?"list-item":"none",l.style.display=e.inBladeburner()?"list-item":"none",c.style.display=e.hasCorporation()?"list-item":"none",u.style.display=e.inGang()?"list-item":"none",this.classList.toggle("opened");const m=[t,n,o,s,l,c,u],p=[a.MainMenuLinks.City,a.MainMenuLinks.Travel,a.MainMenuLinks.Job,a.MainMenuLinks.StockMarket,a.MainMenuLinks.Bladeburner,a.MainMenuLinks.Corporation,a.MainMenuLinks.Gang];t.style.maxHeight?r(!1,m,p):r(!0,m,p)},t.MainMenuHeaders.Help.onclick=function(){const e=i("milestones-tab"),t=i("tutorial-tab"),o=i("options-tab");this.classList.toggle("opened");const s=[e,t,o],l=[a.MainMenuLinks.Milestones,a.MainMenuLinks.Tutorial,a.MainMenuLinks.Options];n&&(s.push(i("dev-tab")),l.push(i("dev-menu-link"))),t.style.maxHeight?r(!1,s,l):r(!0,s,l)},!0}catch(e){return console.error(`Failed to initialize Main Menu Headers: ${e}`),!1}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(17),r=n(26),i=n(3);function o(){function e(e){0===r.Settings.AutosaveInterval?e.innerHTML="disabled":e.innerHTML=`every ${r.Settings.AutosaveInterval}s`}const t=document.getElementById("settingsNSExecTimeRangeValLabel"),n=document.getElementById("settingsNSLogRangeValLabel"),o=document.getElementById("settingsNSPortRangeValLabel"),s=document.getElementById("settingsSuppressMessages"),l=document.getElementById("settingsSuppressFactionInvites"),c=document.getElementById("settingsSuppressTravelConfirmation"),u=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),m=document.getElementById("settingsSuppressHospitalizationPopup"),p=document.getElementById("settingsSuppressBladeburnerPopup"),d=document.getElementById("settingsAutosaveIntervalValLabel"),h=document.getElementById("settingsDisableHotkeys"),_=document.getElementById("settingsDisableASCIIArt"),g=document.getElementById("settingsDisableTextEffects"),f=document.getElementById("settingsLocale");t.innerHTML=r.Settings.CodeInstructionRunTime+"ms",n.innerHTML=r.Settings.MaxLogCapacity,o.innerHTML=r.Settings.MaxPortCapacity,s.checked=r.Settings.SuppressMessages,l.checked=r.Settings.SuppressFactionInvites,c.checked=r.Settings.SuppressTravelConfirmation,u.checked=r.Settings.SuppressBuyAugmentationConfirmation,m.checked=r.Settings.SuppressHospitalizationPopup,p.checked=r.Settings.SuppressBladeburnerPopup,e(d),h.checked=r.Settings.DisableHotkeys,_.checked=r.Settings.CityListView,g.checked=r.Settings.DisableTextEffects,f.value=r.Settings.Locale,i.numeralWrapper.updateLocale(r.Settings.Locale);const y=document.getElementById("settingsNSExecTimeRangeVal"),b=document.getElementById("settingsNSLogRangeVal"),E=document.getElementById("settingsNSPortRangeVal"),v=document.getElementById("settingsAutosaveIntervalVal");y.value=r.Settings.CodeInstructionRunTime,b.value=r.Settings.MaxLogCapacity,E.value=r.Settings.MaxPortCapacity,v.value=r.Settings.AutosaveInterval,y.oninput=function(){t.innerHTML=this.value+"ms",r.Settings.CodeInstructionRunTime=this.value},b.oninput=function(){n.innerHTML=this.value,r.Settings.MaxLogCapacity=this.value},E.oninput=function(){o.innerHTML=this.value,r.Settings.MaxPortCapacity=this.value},v.oninput=function(){r.Settings.AutosaveInterval=Number(this.value),e(d),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},s.onclick=function(){r.Settings.SuppressMessages=this.checked},l.onclick=function(){r.Settings.SuppressFactionInvites=this.checked},c.onclick=function(){r.Settings.SuppressTravelConfirmation=this.checked},u.onclick=function(){r.Settings.SuppressBuyAugmentationConfirmation=this.checked},m.onclick=function(){r.Settings.SuppressHospitalizationPopup=this.checked},p.onclick=function(){r.Settings.SuppressBladeburnerPopup=this.checked},h.onclick=function(){r.Settings.DisableHotkeys=this.checked},_.onclick=function(){r.Settings.DisableASCIIArt=this.checked},g.onclick=function(){r.Settings.DisableTextEffects=this.checked},f.onchange=function(){if(!i.numeralWrapper.updateLocale(f.value)){console.warn(`Invalid locale for numeral: ${f.value}`);let e="en";return r.Settings.Locale=e,void(f.value=e)}r.Settings.Locale=f.value}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterInfo=void 0;const o=i(n(0)),s=n(3),l=n(133),c=n(12),u=n(20),m=n(21),p=n(43),d=n(144),h=n(37),_=n(286),g=n(31);t.CharacterInfo=function(e){function t(e){const t=[["Total:",g.Money(e.total)]];return e.bladeburner&&t.push(["Bladeburner:",g.Money(e.bladeburner)]),e.codingcontract&&t.push(["Coding Contracts:",g.Money(e.codingcontract)]),e.work&&t.push(["Company Work:",g.Money(e.work)]),e.class&&t.push(["Class:",g.Money(e.class)]),e.corporation&&t.push(["Corporation:",g.Money(e.corporation)]),e.crime&&t.push(["Crimes:",g.Money(e.crime)]),e.gang&&t.push(["Gang:",g.Money(e.gang)]),e.hacking&&t.push(["Hacking:",g.Money(e.hacking)]),e.hacknetnode&&t.push(["Hacknet Nodes:",g.Money(e.hacknetnode)]),e.hospitalization&&t.push(["Hospitalization:",g.Money(e.hospitalization)]),e.infiltration&&t.push(["Infiltration:",g.Money(e.infiltration)]),e.stock&&t.push(["Stock Market:",g.Money(e.stock)]),e.casino&&t.push(["Casino:",g.Money(e.casino)]),e.sleeves&&t.push(["Sleeves:",g.Money(e.sleeves)]),_.StatsTable(t)}function n(e){return o.createElement(o.Fragment,null,o.createElement("table",null,o.createElement("tbody",null,e.rows.map(e=>o.createElement("tr",{key:e[0]},o.createElement("td",{key:"0"},`${e[0]} multiplier:`),o.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},s.numeralWrapper.formatPercentage(e[1])),function(e){return p.SourceFileFlags[5]>0&&e.length>2&&e[1]!=e[2]?o.createElement("td",{key:"2",style:{textAlign:"right"}}," (",s.numeralWrapper.formatPercentage(e[2]),")"):o.createElement(o.Fragment,null)}(e))))))}const a=[["Time played since last Augmentation:",u.convertTimeMsToTimeElapsedString(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&a.push(["Time played since last Bitnode destroyed:",u.convertTimeMsToTimeElapsedString(e.playtimeSinceLastBitnode)]),a.push(["Total Time played:",u.convertTimeMsToTimeElapsedString(e.totalPlaytime)]),o.createElement("pre",null,o.createElement("b",null,"General"),o.createElement("br",null),o.createElement("br",null),o.createElement("span",null,"Current City: ",e.city),o.createElement("br",null),o.createElement(function(){return e.companyName?o.createElement(o.Fragment,null,o.createElement("span",null,"Employer at which you last worked: ",e.companyName),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement(function(){return""!==e.companyName?o.createElement(o.Fragment,null,o.createElement("span",null,"Job you last worked: ",e.jobs[e.companyName]),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement(function(){return e.jobs&&0!==Object.keys(e.jobs).length?o.createElement(o.Fragment,null,o.createElement("span",null,"All Employers:"),o.createElement("br",null),o.createElement("ul",null,Object.keys(e.jobs).map(e=>o.createElement("li",{key:e}," * ",e))),o.createElement("br",null),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement("span",null,"Money: ",g.Money(e.money.toNumber())),o.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let n=o.createElement(o.Fragment,null,o.createElement("u",null,"Money earned since you last installed Augmentations:"),o.createElement("br",null),t(e.moneySourceA));0!==e.sourceFiles.length&&(n=o.createElement(o.Fragment,null,n,o.createElement("br",null),o.createElement("br",null),o.createElement("u",null,"Money earned in this BitNode:"),o.createElement("br",null),t(e.moneySourceB))),c.dialogBoxCreate(n,!1)}},"Money Statistics & Breakdown"),o.createElement("br",null),o.createElement("br",null),o.createElement("b",null,"Stats"),o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",{key:"0"},o.createElement("td",{key:"0"},"Hacking:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.hacking_skill)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.hacking_exp)," exp)")),o.createElement("tr",{key:"1"},o.createElement("td",{key:"0"},"Strength:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.strength)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.strength_exp)," exp)")),o.createElement("tr",{key:"2"},o.createElement("td",{key:"0"},"Defense:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.defense)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.defense_exp)," exp)")),o.createElement("tr",{key:"3"},o.createElement("td",{key:"0"},"Dexterity:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.dexterity)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.dexterity_exp)," exp)")),o.createElement("tr",{key:"4"},o.createElement("td",{key:"0"},"Agility:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.agility)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.agility_exp)," exp)")),o.createElement("tr",{key:"5"},o.createElement("td",{key:"0"},"Charisma:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.charisma)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.charisma_exp)," exp)")),o.createElement(function(){return e.intelligence>0&&(5===e.bitNodeN||p.SourceFileFlags[5]>0)?o.createElement("tr",{key:"5"},o.createElement("td",null,"Intelligence:"),o.createElement("td",{style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.intelligence))):o.createElement(o.Fragment,null)},null))),o.createElement("br",null),o.createElement(n,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*m.BitNodeMultipliers.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*m.BitNodeMultipliers.ServerGrowthRate]]}),o.createElement("br",null),o.createElement(n,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*m.BitNodeMultipliers.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*m.BitNodeMultipliers.HackExpGain]]}),o.createElement("br",null),o.createElement(n,{rows:[["Strength Level",e.strength_mult,e.strength_mult*m.BitNodeMultipliers.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Defense Level",e.defense_mult,e.defense_mult*m.BitNodeMultipliers.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*m.BitNodeMultipliers.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Agility Level",e.agility_mult,e.agility_mult*m.BitNodeMultipliers.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*m.BitNodeMultipliers.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*m.BitNodeMultipliers.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*m.BitNodeMultipliers.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*m.BitNodeMultipliers.CompanyWorkMoney]]}),o.createElement("br",null),o.createElement(n,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*m.BitNodeMultipliers.CrimeMoney]]}),o.createElement("br",null),o.createElement(function(){return e.canAccessBladeburner()?o.createElement(o.Fragment,null,o.createElement(n,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement("br",null),o.createElement("b",null,"Misc."),o.createElement("br",null),o.createElement("br",null),o.createElement("span",null,`Servers owned: ${e.purchasedServers.length} / ${d.getPurchaseServerLimit()}`),o.createElement("br",null),o.createElement(function(){return 9===e.bitNodeN||p.SourceFileFlags[9]>0?o.createElement(o.Fragment,null,o.createElement("span",null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${h.HacknetServerConstants.MaxServers}`),o.createElement("br",null)):o.createElement(o.Fragment,null,o.createElement("span",null,`Hacknet Nodes owned: ${e.hacknetNodes.length}`),o.createElement("br",null))},null),o.createElement("span",null,`Augmentations installed: ${e.augmentations.length}`),o.createElement("br",null),o.createElement("br",null),_.StatsTable(a),o.createElement("br",null),o.createElement(function(){if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return o.createElement(o.Fragment,null,o.createElement("span",null,"Current BitNode: ",e.bitNodeN," (",l.BitNodes[t].name,")"),o.createElement("br",null),o.createElement("br",null),o.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"4%"}},l.BitNodes[t].info.split("
").map((e,t)=>o.createElement("div",{key:t},o.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},e),o.createElement("br",null)))))}return o.createElement(o.Fragment,null)},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayMilestonesContent=void 0;const o=n(19),s=n(955),l=n(1),c=i(n(0)),u=i(n(22));let m=null;!function(){document.addEventListener("DOMContentLoaded",function e(){m=document.getElementById("milestones-container"),document.removeEventListener("DOMContentLoaded",e)})}(),t.displayMilestonesContent=function(){o.routing.isOn(o.Page.Milestones)&&m instanceof HTMLElement&&u.render(c.createElement(s.Root,{player:l.Player}),m)}},,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((a=a.apply(e,t||[])).next())})},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const l=i(n(0)),c=n(63),u=s(n(960)),m=n(79),p=n(959),d=n(958),h=n(94),_=n(12),g=n(202),f=n(74),y=n(237),b=n(145),E=n(509),v=n(159),C=n(3),k=n(701),P=n(956),S=n(464),O=n(26),M=n(50);let T=[];!function(){const e=S.NetscriptFunctions({});T=function e(t){let n=[];const a=Object.keys(t);for(const r of a)"object"==typeof t[r]&&(n.push(r),n=n.concat(e(t[r]))),"function"==typeof t[r]&&n.push(r);return n}(e)}();let x="",w="",A=null;t.Root=function(e){const t=l.useRef(null),[n,a]=l.useState(e.filename?e.filename:x),[r,i]=l.useState(e.code?e.code:w),[s,S]=l.useState("RAM: ???"),[R,N]=l.useState({theme:O.Settings.MonacoTheme,insertSpaces:O.Settings.MonacoInsertSpaces});function D(){if(null!==t.current){const e=t.current.getPosition();null!==e&&k.CursorPositions.saveCursor(n,{row:e.lineNumber,column:e.column})}if(A=null,M.ITutorial.isRunning&&M.ITutorial.currStep===M.iTutorialSteps.TerminalTypeScript){if("n00dles.script"!==n)return void _.dialogBoxCreate("Leave the script name as 'n00dles'!");if(-1==r.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void _.dialogBoxCreate("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");for(let a=0;a0)){switch(n){case v.RamCalculationErrorCode.ImportError:S("RAM: Import Error");break;case v.RamCalculationErrorCode.URLImportError:S("RAM: HTTP Import Error");break;case v.RamCalculationErrorCode.SyntaxError:default:S("RAM: Syntax Error")}return new Promise(()=>void 0)}S("RAM: "+C.numeralWrapper.formatRAM(n))})}return l.useEffect(()=>{""!==e.filename&&(x=e.filename,w=e.code,A=null)},[]),l.useEffect(()=>{const e=setInterval(B,1e3);return()=>clearInterval(e)},[r]),l.useEffect(()=>{function e(e){O.Settings.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),D())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),l.default.createElement("div",{id:"script-editor-wrapper"},l.default.createElement("div",{id:"script-editor-filename-wrapper"},l.default.createElement("p",{id:"script-editor-filename-tag",className:"noselect"}," ",l.default.createElement("strong",{style:{backgroundColor:"#555"}},"Script name: ")),l.default.createElement("input",{id:"script-editor-filename",type:"text",maxLength:100,tabIndex:1,value:n,onChange:function(e){x=n,a(e.target.value)}}),l.default.createElement(c.StdButton,{text:"options",onClick:function(){const e="script-editor-options-popup",t={theme:"",insertSpaces:!1};Object.assign(t,R),m.createPopup(e,p.OptionsPopup,{id:e,options:t,save:e=>{N(e),O.Settings.MonacoTheme=e.theme,O.Settings.MonacoInsertSpaces=e.insertSpaces}})}})),l.default.createElement(u.default,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const n of T)t.push({label:n,kind:e.languages.CompletionItemKind.Function,insertText:n,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(P.libSource,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(P.libSource,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const a=k.CursorPositions.getCursor(n);-1!==a.row?t.current.setPosition({lineNumber:a.row,column:a.column}):null!==A&&t.current.setPosition({lineNumber:A.lineNumber,column:A.column+1}),t.current.focus()},loading:l.default.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:r,onChange:function(e){void 0!==e&&(w=e,null!==t.current&&(A=t.current.getPosition()),i(e))},theme:R.theme,options:R}),l.default.createElement("div",{id:"script-editor-buttons-wrapper"},l.default.createElement(c.StdButton,{text:"Beautify",onClick:function(){if(null===t.current)return;const e=d.js_beautify(r,{indent_with_tabs:!R.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}}),l.default.createElement("p",{id:"script-editor-status-text",style:{display:"inline-block",margin:"10px"}},s),l.default.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:D},"Save & Close (Ctrl/Cmd + b)"),l.default.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Netscript Documentation")))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayInfiltrationContent=void 0;const o=n(19),s=n(1003),l=i(n(0)),c=i(n(22));let u=document.createElement("div");!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("infiltration-container");if(null===t)throw new Error("huh?");u=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.displayInfiltrationContent=function(e,t,n,a,r){if(!o.routing.isOn(o.Page.Infiltration))return;const i=function(e,t){const n=e.strength+e.defense+e.dexterity+e.agility+e.charisma,a=t-Math.pow(n,.9)/250-e.intelligence/1600;return a<0?0:a>3?3:a}(t,a);c.render(l.createElement(s.Root,{Engine:e,Player:t,Location:n,StartingDifficulty:a,Difficulty:i,MaxLevel:r}),u)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const r=a(n(0)),i=n(1022),o=n(1020),s=n(1019);t.Root=function(e){return r.default.createElement("div",{id:"bladeburner-container"},r.default.createElement("div",{style:{height:"60%",display:"block",position:"relative"}},r.default.createElement("div",{style:{height:"100%",width:"30%",display:"inline-block",border:"1px solid white"}},r.default.createElement(i.Stats,{bladeburner:e.bladeburner,player:e.player,engine:e.engine})),r.default.createElement(o.Console,{bladeburner:e.bladeburner,player:e.player})),r.default.createElement("div",{style:{width:"70%",display:"block",border:"1px solid white",marginTop:"6px",padding:"6px",position:"relative"}},r.default.createElement(s.AllPages,{bladeburner:e.bladeburner,player:e.player})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayGangContent=void 0;const o=i(n(0)),s=i(n(22)),l=n(1037),c=n(19);let u;!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("gang-container");if(null===t)throw new Error("Could not find element 'gang-container'");u=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.displayGangContent=function(e,t,n){c.routing.isOn(c.Page.Gang)&&s.render(o.createElement(l.Root,{engine:e,gang:t,player:n}),u)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FactionList=void 0;const o=i(n(0)),s=n(16),l=n(80);t.FactionList=function(e){const t=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("h1",null,"Factions"),o.default.createElement("p",null,"Lists all factions you have joined"),o.default.createElement("br",null),o.default.createElement("ul",null,e.player.factions.map(t=>o.default.createElement("li",{key:t},o.default.createElement("a",{className:"a-link-button",onClick:()=>(function(t){e.engine.loadFactionContent(),l.displayFactionContent(t)})(t),style:{padding:"4px",margin:"4px",display:"inline-block"}},t)))),o.default.createElement("br",null),o.default.createElement("h1",null,"Outstanding Faction Invitations"),o.default.createElement("p",{style:{width:"70%"}},"Lists factions you have been invited to. You can accept these faction invitations at any time."),o.default.createElement("ul",null,e.player.factionInvitations.map(e=>o.default.createElement("li",{key:e,style:{padding:"6px",margin:"6px"}},o.default.createElement("p",{style:{display:"inline",margin:"4px",padding:"4px"}},e),o.default.createElement("a",{className:"a-link-button",onClick:n=>(function(e,n){e.isTrusted&&(l.joinFaction(s.Factions[n]),t(e=>!e))})(n,e),style:{display:"inline",margin:"4px",padding:"4px"}},"Accept Faction Invitation")))))}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(0),r=n.n(a),i=n(1),o=n(3),s=n(67);const l=r.a.Component;class c extends l{render(){const e=r.a.createElement("tr",{id:"character-int-wrapper"},r.a.createElement("td",{className:"character-int-cell"},"Int: "),r.a.createElement("td",{id:"character-int-text",className:"character-int-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.intelligence))),t=r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",{className:"character-divider"},r.a.createElement("td",{colSpan:"2"},"Work progress:")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},"+",Object(s.Reputation)(i.Player.workRepGained)," rep")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},r.a.createElement("button",{onClick:()=>i.Player.startFocusing(),id:"character-overview-options-button",className:"character-overview-btn"},"Focus"))));return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{id:"character-hp-wrapper"},r.a.createElement("td",{className:"character-hp-cell"},"HP:"),r.a.createElement("td",{id:"character-hp-text",className:"character-hp-cell character-stat-cell"},o.numeralWrapper.formatHp(i.Player.hp)+" / "+o.numeralWrapper.formatHp(i.Player.max_hp))),r.a.createElement("tr",{id:"character-money-wrapper"},r.a.createElement("td",{className:"character-money-cell"},"Money: "),r.a.createElement("td",{id:"character-money-text",className:"character-money-cell character-stat-cell"},o.numeralWrapper.formatMoney(i.Player.money.toNumber()))),r.a.createElement("tr",{id:"character-hack-wrapper"},r.a.createElement("td",{className:"character-hack-cell"},"Hack: "),r.a.createElement("td",{id:"character-hack-text",className:"character-hack-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.hacking_skill))),r.a.createElement("tr",{id:"character-str-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-combat-cell"},"Str: "),r.a.createElement("td",{id:"character-str-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.strength))),r.a.createElement("tr",{id:"character-def-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Def: "),r.a.createElement("td",{id:"character-def-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.defense))),r.a.createElement("tr",{id:"character-dex-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Dex: "),r.a.createElement("td",{id:"character-dex-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.dexterity))),r.a.createElement("tr",{id:"character-agi-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Agi: "),r.a.createElement("td",{id:"character-agi-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.agility))),r.a.createElement("tr",{id:"character-cha-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-cha-cell"},"Cha: "),r.a.createElement("td",{id:"character-cha-text",className:"character-cha-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.charisma))),i.Player.intelligence>=1&&e,i.Player.isWorking&&!i.Player.focus&&t)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=void 0,t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHacknetServer=t.getUpgradeHomeRamCost=t.getHomeComputer=t.getCurrentServer=t.hasTorRouter=void 0;const a=n(11),r=n(21),i=n(86),o=n(23),s=n(45);t.hasTorRouter=function(){return s.SpecialServerIps.hasOwnProperty("Darkweb Server")},t.getCurrentServer=function(){return o.AllServers[this.currentServer]},t.getHomeComputer=function(){return o.AllServers[this.homeComputer]},t.getUpgradeHomeRamCost=function(){const e=this.getHomeComputer().maxRam,t=Math.log2(e),n=Math.pow(1.58,t);return e*a.CONSTANTS.BaseCostFor1GBOfRamHome*n*r.BitNodeMultipliers.HomeComputerRamCost},t.createHacknetServer=function(){const e=`hacknet-node-${this.hacknetNodes.length}`,t=new i.HacknetServer({adminRights:!0,hostname:e,ip:o.createUniqueRandomIp()});this.hacknetNodes.push(t.ip),o.AddToAllServers(t);const n=this.getHomeComputer();return n.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(n.ip),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyExploit=void 0;const a=n(1);t.applyExploit=function(){if(a.Player.exploits&&0===a.Player.exploits.length)return;const e=Math.pow(1.001,a.Player.exploits.length),t=Math.pow(.999,a.Player.exploits.length);a.Player.hacking_chance_mult*=e,a.Player.hacking_speed_mult*=e,a.Player.hacking_money_mult*=e,a.Player.hacking_grow_mult*=e,a.Player.hacking_mult*=e,a.Player.strength_mult*=e,a.Player.defense_mult*=e,a.Player.dexterity_mult*=e,a.Player.agility_mult*=e,a.Player.charisma_mult*=e,a.Player.hacking_exp_mult*=e,a.Player.strength_exp_mult*=e,a.Player.defense_exp_mult*=e,a.Player.dexterity_exp_mult*=e,a.Player.agility_exp_mult*=e,a.Player.charisma_exp_mult*=e,a.Player.company_rep_mult*=e,a.Player.faction_rep_mult*=e,a.Player.crime_money_mult*=e,a.Player.crime_success_mult*=e,a.Player.hacknet_node_money_mult*=e,a.Player.hacknet_node_purchase_cost_mult*=t,a.Player.hacknet_node_ram_cost_mult*=t,a.Player.hacknet_node_core_cost_mult*=t,a.Player.hacknet_node_level_cost_mult*=t,a.Player.work_money_mult*=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applySourceFile=void 0;const a=n(236),r=n(1);t.applySourceFile=function(e){const t="SourceFile"+e.n,n=a.SourceFiles[t];if(null!=n){switch(e.n){case 1:{let t=0;for(let n=0;n=100?this.sleeves[e].synchronize(this):this.sleeves[e].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.updateSkillLevels(),this.hp=this.max_hp}function oe(){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 G.a(1e3),this.city=M.CityName.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.resleeves=[],this.sleeves.length=j.SourceFileFlags[10]+this.sleevesFromCovenant;for(let e=0;e0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function ue(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function me(e){const t=this.getHomeComputer();if(null==t)return!1;for(var n=0;n0||this.intelligence>0)&&(this.intelligence_exp+=e)}function Pe(e){const t=e.toLowerCase();return t.includes("hack")?this.hacking_skill:t.includes("str")?this.strength:t.includes("def")?this.defense:t.includes("dex")?this.dexterity:t.includes("agi")?this.agility:t.includes("cha")?this.charisma:t.includes("int")?this.intelligence:void 0}function Se(e,t,n){e===this.workType&&t===this.companyName||e===this.workType&&t===this.currentWorkFactionName&&n===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",ne.a.unmountComponentAtNode(document.getElementById("work-in-progress-text")))}function Oe(e=1){const t=this.focus?1:.8,n=t*this.workHackExpGainRate*e,a=t*this.workStrExpGainRate*e,r=t*this.workDefExpGainRate*e,i=t*this.workDexExpGainRate*e,o=t*this.workAgiExpGainRate*e,s=t*this.workChaExpGainRate*e,l=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(n),this.gainStrengthExp(a),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(o),this.gainCharismaExp(s),this.gainMoney(l),this.className?this.recordMoneySource(l,"class"):this.recordMoneySource(l,"work"),this.workHackExpGained+=n,this.workStrExpGained+=a,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=o,this.workChaExpGained+=s,this.workRepGained+=t*this.workRepGainRate*e,this.workMoneyGained+=t*this.workMoneyGainRate*e,this.workMoneyGained-=t*this.workMoneyLossRate*e}function Me(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeCompany,e),this.isWorking=!0,this.focus=!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(Y.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",()=>(this.finishWork(!0),!1));const n=Object(Y.clearEventListeners)("work-in-progress-something-else-button");n.style.visibility="visible",n.innerHTML="Do something else simultaneously",n.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Te(){const e=I.SpecialServerIps[this.companyName];if(e){const t=N.AllServers[e];if(t&&t.backdoorInstalled)return.75}return.5}function xe(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWork(!1);const n=u.Companies[this.companyName];let a="0";null!=n&&n instanceof c.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`),Object(U.influenceStockThroughCompanyWork)(n,this.workRepGainRate,e);const r=this.jobs[this.companyName],i=.5===this.cancelationPenalty()?"half":"three-quarters";var o=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation: ",Object(V.Reputation)(a),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(Q.ReputationRate)(this.workRepGainRate*ae),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",`${K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)} / sec`,") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",`${K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)} / sec`,") strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",`${K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)} / sec`,") defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",`${K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)} / sec`,") dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",`${K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)} / sec`,") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",`${K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)} / sec`,") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain ",i," of the reputation you've earned so far."),o)}function we(e,t=!1){e&&(this.workRepGained*=this.cancelationPenalty()),u.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let n=ee.a.createElement(ee.a.Fragment,null,"You earned a total of: ",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(n=e?ee.a.createElement(ee.a.Fragment,null,"You worked a short shift of ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"Since you cancelled your work early, you only gained half of the reputation you earned. ",ee.a.createElement("br",null),ee.a.createElement("br",null),n):ee.a.createElement(ee.a.Fragment,null,"You worked a full shift of 8 hours! ",ee.a.createElement("br",null),ee.a.createElement("br",null),n),t||Object($.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),t){var a="You worked a short shift of "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+K.numeralWrapper.formatMoney(this.workMoneyGained)+", "+K.numeralWrapper.formatReputation(this.workRepGained)+" reputation, "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!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(Y.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),b.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=u.Companies[this.companyName],a="0";null!=n&&n instanceof c.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`);const r=this.jobs[this.companyName],i=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation: ",Object(V.Reputation)(a),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(V.Reputation)(`${K.numeralWrapper.formatExp(this.workRepGainRate*ae)} / sec`),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",`${K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)} / sec`,") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",`${K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)} / sec`,") strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",`${K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)} / sec`,") defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",`${K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)} / sec`,") dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",`${K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)} / sec`,") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",`${K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)} / sec`,") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job."),i)}function Ne(e=!1){u.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const t=ee.a.createElement(ee.a.Fragment,null,"You worked for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(e||Object($.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var n="You worked for "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+K.numeralWrapper.formatMoney(this.workMoneyGained)+", "+K.numeralWrapper.formatReputation(this.workRepGained)+" reputation, "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()}function De(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,b.Engine.loadWorkInProgressContent()}function Be(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,b.Engine.loadTerminalContent()}function Ie(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.BitNodeMultipliers.FactionWorkRepGain,this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=_.CONSTANTS.MillisecondsPer20Hours;const n=Object(Y.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",()=>(this.finishFactionWork(!0),!1));const a=Object(Y.clearEventListeners)("work-in-progress-something-else-button");a.style.visibility="visible",a.innerHTML="Do something else simultaneously",a.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Le(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeFaction,e.name,_.CONSTANTS.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/_.CONSTANTS.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=_.CONSTANTS.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function We(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeFaction,e.name,_.CONSTANTS.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=Object(R.getFactionFieldWorkRepGain)(this,e),this.factionWorkType=_.CONSTANTS.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Fe(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeFaction,e.name,_.CONSTANTS.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=Object(R.getFactionSecurityWorkRepGain)(this,e),this.factionWorkType=_.CONSTANTS.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function je(e){const t=v.Factions[this.currentWorkFactionName];switch(this.factionWorkType){case _.CONSTANTS.FactionWorkHacking:this.workRepGainRate=Object(R.getHackingWorkRepGain)(this,t);break;case _.CONSTANTS.FactionWorkField:this.workRepGainRate=Object(R.getFactionFieldWorkRepGain)(this,t);break;case _.CONSTANTS.FactionWorkSecurity:this.workRepGainRate=Object(R.getFactionSecurityWorkRepGain)(this,t)}var n=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer20Hours&&(n=!0,e=Math.round((_.CONSTANTS.MillisecondsPer20Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.processWorkEarnings(e),n||this.timeWorked>=_.CONSTANTS.MillisecondsPer20Hours)return this.finishFactionWork(!1);const a=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently ",this.currentWorkFactionDescription," for your faction ",t.name,ee.a.createElement("br",null),"(Current Faction Reputation: ",Object(V.Reputation)(t.playerReputation),"). ",ee.a.createElement("br",null),"You have been doing this for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(Q.ReputationRate)(this.workRepGainRate*ae),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)," / sec) strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)," / sec) defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)," / sec) dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)," / sec) charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",ee.a.createElement("br",null),"There is no penalty for cancelling earlier."),a)}function Ue(e,t=!1){var n=v.Factions[this.currentWorkFactionName];if(n.playerReputation+=this.workRepGained,this.updateSkillLevels(),t||Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"You worked for your faction ",n.name," for a total of ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the faction ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadFactionContent(),Object(C.displayFactionContent)(n.name),t){var a="You worked for your faction "+n.name+" for a total of "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+K.numeralWrapper.formatReputation(this.workRepGained)+" rep, "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()}function He(){let e=1;const t=u.Companies[this.companyName];j.SourceFileFlags[11]>0&&(e=1+t.favor/100);const n=this.jobs[this.companyName],a=d.CompanyPositions[n];return null==a?(console.error(`Could not find CompanyPosition object for ${n}. Work salary will be 0`),0):a.baseSalary*t.salaryMultiplier*this.work_money_mult*s.BitNodeMultipliers.CompanyWorkMoney*e}function Ge(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work hack exp gain will be 0"].join(" ")),0):n.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ke(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work str exp gain will be 0"].join(" ")),0):n.strengthExpGain*e.expMultiplier*this.strength_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function qe(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work def exp gain will be 0"].join(" ")),0):n.defenseExpGain*e.expMultiplier*this.defense_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function $e(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work dex exp gain will be 0"].join(" ")),0):n.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ye(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work agi exp gain will be 0"].join(" ")),0):n.agilityExpGain*e.expMultiplier*this.agility_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function ze(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work cha exp gain will be 0"].join(" ")),0):n.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ve(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];if(null==e||null==n)return console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work rep gain will be 0"].join(" ")),0;var a=n.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);a+=this.intelligence/_.CONSTANTS.MaxSkillLevel;var r=1+e.favor/100;return isNaN(r)&&(r=1),a*this.company_rep_mult*r}function Je(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var s=Object(Y.clearEventListeners)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",()=>(this.finishCreateProgramWork(!0),!1)),Object(Y.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function Xe(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t*this.getIntelligenceBonus(3);n=1+(n-1)/5,this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=b.Engine._idleSpeed*e*n;var a=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1);const r=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working on coding ",a,".",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"The program is ",(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",ee.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later."),r)}function Qe(e){var t=this.createProgramName;if(!1===e)Object($.dialogBoxCreate)("You've finished creating "+t+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(t);else{var n=t+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(n)}e||this.gainIntelligenceExp(this.createProgramReqLvl/_.CONSTANTS.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeStudyClass,this.className=n;const a=1e3/b.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const p=this.hashManager;switch(n){case _.CONSTANTS.ClassStudyComputerScience:i=_.CONSTANTS.ClassStudyComputerScienceBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassDataStructures:r=_.CONSTANTS.ClassDataStructuresBaseCost*e/a,i=_.CONSTANTS.ClassDataStructuresBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassNetworks:r=_.CONSTANTS.ClassNetworksBaseCost*e/a,i=_.CONSTANTS.ClassNetworksBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassAlgorithms:r=_.CONSTANTS.ClassAlgorithmsBaseCost*e/a,i=_.CONSTANTS.ClassAlgorithmsBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassManagement:r=_.CONSTANTS.ClassManagementBaseCost*e/a,m=_.CONSTANTS.ClassManagementBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassLeadership:r=_.CONSTANTS.ClassLeadershipBaseCost*e/a,m=_.CONSTANTS.ClassLeadershipBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassGymStrength:r=_.CONSTANTS.ClassGymBaseCost*e/a,o=t/a*p.getTrainingMult();break;case _.CONSTANTS.ClassGymDefense:r=_.CONSTANTS.ClassGymBaseCost*e/a,l=t/a*p.getTrainingMult();break;case _.CONSTANTS.ClassGymDexterity:r=_.CONSTANTS.ClassGymBaseCost*e/a,c=t/a*p.getTrainingMult();break;case _.CONSTANTS.ClassGymAgility:r=_.CONSTANTS.ClassGymBaseCost*e/a,u=t/a*p.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=i*this.hacking_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workChaExpGainRate=m*this.charisma_exp_mult*s.BitNodeMultipliers.ClassGymExpGain;var d=Object(Y.clearEventListeners)("work-in-progress-cancel-button");n==_.CONSTANTS.ClassGymStrength||n==_.CONSTANTS.ClassGymDefense||n==_.CONSTANTS.ClassGymDexterity||n==_.CONSTANTS.ClassGymAgility?d.innerHTML="Stop training at gym":d.innerHTML="Stop taking course",d.addEventListener("click",()=>(this.finishClass(),!1)),Object(Y.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=b.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e);const n=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You have been ",t," for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"This has cost you: ",ee.a.createElement("br",null),Object(J.Money)(-this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyLossRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)," / sec) hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)," / sec) strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)," / sec) defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)," / sec) dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)," / sec) agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)," / sec) charisma exp ",ee.a.createElement("br",null),"You may cancel at any time"),n)}function tt(e=!1){if(this.gainIntelligenceExp(_.CONSTANTS.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),e||Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"After ",this.className," for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),", ",ee.a.createElement("br",null),"you spent a total of ",Object(J.Money)(-1*this.workMoneyGained),". ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of "+K.numeralWrapper.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}this.resetWorkStatus()}function nt(e,t,n,a,r,i,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workStrExpGained=n*this.strength_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDefExpGained=a*this.defense_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=r*this.dexterity_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workAgiExpGained=i*this.agility_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.BitNodeMultipliers.CrimeMoney,this.timeNeededToCompleteWork=c;const m=Object(Y.clearEventListeners)("work-in-progress-cancel-button");m.innerHTML="Cancel crime",m.addEventListener("click",()=>(this.finishCrime(!0),!1)),Object(Y.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function at(e){if(this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),n=Math.round(t/5);n<0&&(n=0),n>20&&(n=20);var a="["+Array(n+1).join("|")+Array(20-n+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".
Time remaining: "+Object(z.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+a.replace(/ /g," ")}}function rt(e){if(!e){if(Object(f.determineCrimeSuccess)(this,this.crimeType)){let e=null;for(const t in y.Crimes)if(y.Crimes[t].type==this.crimeType){e=y.Crimes[t];break}null==e&&Object($.dialogBoxCreate)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),this.gainMoney(this.workMoneyGained),this.recordMoneySource(this.workMoneyGained,"crime"),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+K.numeralWrapper.formatMoney(this.workMoneyGained)+", "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hack exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, "+K.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp."):Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"Crime successful!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma experience"))}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hack exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, "+K.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp."):Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"Crime failed!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma experience"));this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),b.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case _.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);break;case _.CONSTANTS.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return e}function ot(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn(`Player.takeDamage() called without a numeric argument: ${e}`)}function st(e){"number"==typeof e?(this.hp+=e,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn(`Player.regenerateHp() called without a numeric argument: ${e}`)}function lt(){const e=Object(H.getHospitalizationCost)(this);return!1===B.Settings.SuppressHospitalizationPopup&&Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged ",Object(J.Money)(e))),this.loseMoney(e),this.recordMoneySource(-1*e,"hospitalization"),this.hp=this.max_hp,e}function ct(e,t=!1){let n=null;""!==this.companyName&&(n=u.Companies[this.companyName]);const a=this.jobs[this.companyName],r=u.Companies[this.location];if(!(r instanceof c.Company))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let i=e;if(!this.isQualified(r,i)){var o=Object(p.getJobRequirementText)(r,i);return!t&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position
"+o)}for(;;){let e=Object(m.getNextCompanyPositionHelper)(i);if(null==e)break;if(!r.hasPosition(e))break;if(!this.isQualified(r,e))break;i=e}if(null==n||n.name!=r.name||i.name!=a){if(this.jobs[r.name]=i.name,this.companyName=this.location,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),t)return!0;Object($.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!")}else{var s=Object(m.getNextCompanyPositionHelper)(i);if(null==s){if(t)return!1;Object($.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(r.hasPosition(s)){if(t)return!1;o=Object(p.getJobRequirementText)(r,s);Object($.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion
"+o)}else{if(t)return!1;Object($.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}}function ut(e,t){var n=null;if(""!==this.companyName&&(n=u.Companies[this.companyName]),null==n||n.name!=e.name)return t;const a=this.jobs[this.companyName],r=d.CompanyPositions[a];return r.isSoftwareJob()&&t.isSoftwareJob()||r.isITJob()&&t.isITJob()||r.isBusinessJob()&&t.isBusinessJob()||r.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||r.isSecurityJob()&&t.isSecurityJob()||r.isAgentJob()&&t.isAgentJob()||r.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||r.isPartTimeJob()&&t.isPartTimeJob()?Object(m.getNextCompanyPositionHelper)(r):t}function mt(e){this.isWorking=!1,this.companyName="",delete this.jobs[e]}function pt(e=!1){return this.applyForJob(d.CompanyPositions[h.SoftwareCompanyPositions[0]],e)}function dt(e=!1){return this.applyForJob(d.CompanyPositions[h.SoftwareConsultantCompanyPositions[0]],e)}function ht(e=!1){return this.applyForJob(d.CompanyPositions[h.ITCompanyPositions[0]],e)}function _t(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.SecurityEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.SecurityEngineerCompanyPositions[0]],e):!e&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function gt(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.NetworkEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.NetworkEngineerCompanyPositions[0]],e):!e&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function ft(e=!1){return this.applyForJob(d.CompanyPositions[h.BusinessCompanyPositions[0]],e)}function yt(e=!1){return this.applyForJob(d.CompanyPositions[h.BusinessConsultantCompanyPositions[0]],e)}function bt(e=!1){return this.applyForJob(d.CompanyPositions[h.SecurityCompanyPositions[2]],e)}function Et(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.AgentCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.AgentCompanyPositions[0]],e):!e&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function vt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.MiscCompanyPositions[1]])){if(this.companyName=t.name,this.jobs[t.name]=h.MiscCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Ct(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.PartTimeCompanyPositions[1]])){if(this.jobs[t.name]=h.PartTimeCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function kt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.MiscCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=h.MiscCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Pt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.PartTimeCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=h.PartTimeCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function St(e,t){var n=e.jobStatReqOffset,a=t.requiredHacking>0?t.requiredHacking+n:0,r=t.requiredStrength>0?t.requiredStrength+n:0,i=t.requiredDefense>0?t.requiredDefense+n:0,o=t.requiredDexterity>0?t.requiredDexterity+n:0,s=t.requiredDexterity>0?t.requiredDexterity+n:0,l=t.requiredCharisma>0?t.requiredCharisma+n:0;return this.hacking_skill>=a&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation}function Ot(e=!0){e&&this.resetMultipliers();for(let e=0;et}var i=v.Factions.Illuminati;!i.isBanned&&!i.isMember&&!i.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(i);var o=v.Factions.Daedalus;!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=Math.round(30*s.BitNodeMultipliers.DaedalusAugsRequirement)&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(o);var l=v.Factions["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=20&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=v.Factions.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(T.LocationName.AevumECorp)||e.push(c);var m=v.Factions.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(T.LocationName.Sector12MegaCorp)||e.push(m);var p=v.Factions["Bachman & Associates"];p.isBanned||p.isMember||p.alreadyInvited||!r(T.LocationName.AevumBachmanAndAssociates)||e.push(p);var d=v.Factions["Blade Industries"];d.isBanned||d.isMember||d.alreadyInvited||!r(T.LocationName.Sector12BladeIndustries)||e.push(d);var h=v.Factions.NWO;h.isBanned||h.isMember||h.alreadyInvited||!r(T.LocationName.VolhavenNWO)||e.push(h);var g=v.Factions["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!r(T.LocationName.AevumClarkeIncorporated)||e.push(g);var f=v.Factions["OmniTek Incorporated"];f.isBanned||f.isMember||f.alreadyInvited||!r(T.LocationName.VolhavenOmniTekIncorporated)||e.push(f);var y=v.Factions["Four Sigma"];y.isBanned||y.isMember||y.alreadyInvited||!r(T.LocationName.Sector12FourSigma)||e.push(y);var b=v.Factions["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!r(T.LocationName.ChongqingKuaiGongInternational)||e.push(b);var E=v.Factions["Fulcrum Secret Technologies"],C=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.FulcrumSecretTechnologies]];null==C?console.error("Could not find Fulcrum Secret Technologies Server"):E.isBanned||E.isMember||E.alreadyInvited||!C.backdoorInstalled||!r(T.LocationName.AevumFulcrumTechnologies,25e4)||e.push(E);var k=v.Factions.BitRunners,S=this.getHomeComputer(),O=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.BitRunnersServer]];null==O?console.error("Could not find BitRunners Server"):!k.isBanned&&!k.isMember&&O.backdoorInstalled&&!k.alreadyInvited&&S.maxRam>=128&&e.push(k);var x=v.Factions["The Black Hand"],w=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.TheBlackHandServer]];null==w?console.error("Could not find The Black Hand Server"):!x.isBanned&&!x.isMember&&w.backdoorInstalled&&!x.alreadyInvited&&S.maxRam>=64&&e.push(x);var A=v.Factions.NiteSec,R=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.NiteSecServer]];null==R?console.error("Could not find NiteSec Server"):!A.isBanned&&!A.isMember&&R.backdoorInstalled&&!A.alreadyInvited&&S.maxRam>=32&&e.push(A);var D=v.Factions.Chongqing;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(2e7)||this.city!=M.CityName.Chongqing||e.push(D);var B=v.Factions["Sector-12"];B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(15e6)||this.city!=M.CityName.Sector12||e.push(B);var L=v.Factions["New Tokyo"];L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(2e7)||this.city!=M.CityName.NewTokyo||e.push(L);var W=v.Factions.Aevum;W.isBanned||W.isMember||W.alreadyInvited||!this.money.gte(4e7)||this.city!=M.CityName.Aevum||e.push(W);var F=v.Factions.Ishima;F.isBanned||F.isMember||F.alreadyInvited||!this.money.gte(3e7)||this.city!=M.CityName.Ishima||e.push(F);var j=v.Factions.Volhaven;j.isBanned||j.isMember||j.alreadyInvited||!this.money.gte(5e7)||this.city!=M.CityName.Volhaven||e.push(j);var U=v.Factions["Speakers for the Dead"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!n.includes(T.LocationName.Sector12CIA)&&!n.includes(T.LocationName.Sector12NSA)&&e.push(U);var H=v.Factions["The Dark Army"];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==M.CityName.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!n.includes(T.LocationName.Sector12CIA)&&!n.includes(T.LocationName.Sector12NSA)&&e.push(H);var G=v.Factions["The Syndicate"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==M.CityName.Aevum||this.city==M.CityName.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!n.includes(T.LocationName.Sector12CIA)&&!n.includes(T.LocationName.Sector12NSA)&&e.push(G);var K=v.Factions.Silhouette;!K.isBanned&&!K.isMember&&!K.alreadyInvited&&(a.includes("Chief Technology Officer")||a.includes("Chief Financial Officer")||a.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(K);var q=v.Factions.Tetrads;!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(this.city==M.CityName.Chongqing||this.city==M.CityName.NewTokyo||this.city==M.CityName.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(q);var $=v.Factions["Slum Snakes"];!$.isBanned&&!$.isMember&&!$.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push($);var Y=v.Factions.Netburners,z=0,V=0,J=0;for(let e=0;e=80&&z>=8&&V>=4&&J>=100&&e.push(Y);var X=v.Factions["Tian Di Hui"];X.isBanned||X.isMember||X.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=M.CityName.Chongqing&&this.city!=M.CityName.NewTokyo&&this.city!=M.CityName.Ishima||e.push(X);var Q=v.Factions.CyberSec,Z=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.CyberSecServer]];return null==Z?console.error("Could not find CyberSec Server"):Q.isBanned||Q.isMember||!Z.backdoorInstalled||Q.alreadyInvited||e.push(Q),e}function xt(e){this.bitNodeN=e}function wt(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);this.firstAugPurchased=!0,this.queuedAugmentations.push(new i.PlayerOwnedAugmentation(e))}function At(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case l.CodingContractRewardType.FactionReputation:if(null==e.name||!(v.Factions[e.name]instanceof E.Faction))return e.type=l.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=_.CONSTANTS.CodingContractBaseFactionRepGain*t;return v.Factions[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case l.CodingContractRewardType.FactionReputationAll:const i=_.CONSTANTS.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var a=this.factions.slice();if(0==(a=a.filter(e=>!o.includes(e))).length)return e.type=l.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const m=Math.floor(i/a.length);for(const e of a)v.Factions[e]instanceof E.Faction&&(v.Factions[e].playerReputation+=m);return`Gained ${m} reputation for each of the following factions: ${a.toString()}`;case l.CodingContractRewardType.CompanyReputation:if(null==e.name||!(u.Companies[e.name]instanceof c.Company))return e.type=l.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);n=_.CONSTANTS.CodingContractBaseCompanyRepGain*t;return u.Companies[e.name].playerReputation+=n,`Gained ${n} company reputation for ${e.name}`;case l.CodingContractRewardType.Money:default:var r=_.CONSTANTS.CodingContractBaseMoneyGain*t*s.BitNodeMultipliers.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),`Gained ${K.numeralWrapper.formatMoney(r)}`}}function Rt(e){return null==S.Cities[e]?(console.warn(`Player.travel() called with invalid city: ${e}`),!1):(this.city=e,!0)}function Nt(e){return null==O.Locations[e]?(console.warn(`Player.gotoLocation() called with invalid location: ${e}`),!1):(this.location=e,!0)}function Dt(){return 10===this.bitNodeN||j.SourceFileFlags[10]>0}function Bt(e){this.exploits.includes(e)||this.exploits.push(e)}function It(e){return Object(A.calculateIntelligenceBonus)(this.intelligence,e)}function Lt(){return this.moneySourceA.casino}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessGang",function(){return l}),n.d(t,"getGangFaction",function(){return c}),n.d(t,"getGangName",function(){return u}),n.d(t,"hasGangWith",function(){return m}),n.d(t,"inGang",function(){return p}),n.d(t,"startGang",function(){return d});var a=n(16),r=n(318),i=n(43),o=n(21);const s=-54e3;function l(){return 2===this.bitNodeN||!(i.SourceFileFlags[2]<=0)&&this.karma<=o.BitNodeMultipliers.GangKarmaRequirement*s}function c(){const e=a.Factions[this.gang.facName];if(null==e)throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);return e}function u(){return this.inGang()?this.gang.facName:""}function m(e){return this.inGang()&&this.gang.facName===e}function p(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof r.Gang}function d(e,t){this.gang=new r.Gang(e,t);const n=a.Factions[e];if(null==n)throw new Error(`Invalid faction name when creating gang: ${e}`);n.playerReputation=0}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessCorporation",function(){return i}),n.d(t,"hasCorporation",function(){return o}),n.d(t,"startCorporation",function(){return s});var a=n(41),r=n(43);function i(){return 3===this.bitNodeN||r.SourceFileFlags[3]>0}function o(){return null!=this.corporation&&this.corporation instanceof a.c}function s(e,t=0){this.corporation=new a.c({name:e}),this.corporation.totalShares+=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptUrl=void 0;t.ScriptUrl=class{constructor(e,t){this.filename=e,this.url=t}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return executeJSScript});var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(76),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(834),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urls=null,script=workerScript.getScript();shouldCompile(script,scripts)&&(script.markUpdated(),urls=_getScriptUrls(script,scripts,[]),script.url=urls[urls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(urls[urls.length - 1].url)"))),script.dependencies=urls),loadedModule=await script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,`${script.filename} cannot be run because it does not have a main function.`);return loadedModule.main(ns)}finally{if(null!=urls)for(const e in urls)URL.revokeObjectURL(e.url)}}function shouldCompile(e,t){return""===e.module||e.dependencies.some(n=>{const a=t.find(e=>e.filename==n.filename);return!a||a.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,n){const a=[];n.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,n);return a.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',a.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.ScriptUrl(e.filename,URL.createObjectURL(makeScriptBlob(r)))),a}catch(e){for(const e in a)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is2DArray=void 0,t.is2DArray=function(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tabCompletion=void 0;const a=n(7),r=n(20);t.tabCompletion=function(e,t,n){if(n.constructor!==Array)return;if(!r.containsAllStrings(n))return;if(""===t)for(let t=n.length-1;t>=0;--t)n[t].toLowerCase().startsWith(e.toLowerCase())||n.splice(t,1);else for(let e=n.length-1;e>=0;--e)n[e].toLowerCase().startsWith(t.toLowerCase())||n.splice(e,1);const i=document.getElementById("terminal-input-text-box");if(null==i)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=i,s=o.value.lastIndexOf(";");let l="";if(0!==n.length)if(1===n.length)l=""===t?n[0]+" ":e+" "+n[0],o.value=-1===s?l:o.value.slice(0,s+1)+" "+l,o.focus();else{const i=r.longestCommonStart(n);let l="";for(let e=0;e "+e),a.post(l)):(o.value=-1===s?i:`${o.value.slice(0,s+1)} ${i}`,o.focus()):i===t?(a.post("> "+e+" "+t),a.post(l)):(o.value=-1==s?`${e} ${i}`:`${o.value.slice(0,s+1)} ${e} ${i}`,o.focus())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineAllPossibilitiesForTabCompletion=void 0;const a=n(94),r=n(1132),i=n(75),o=n(305),s=n(81),l=n(23),c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"];t.determineAllPossibilitiesForTabCompletion=function(e,t,n,u=""){let m=[];m=m.concat(Object.keys(i.GlobalAliases));const p=e.getCurrentServer(),d=e.getHomeComputer();let h="",_=null;function g(){for(const e of p.contracts)m.push(e.fn)}function f(){for(const e of p.messages)e instanceof s.Message||m.push(e)}function y(){for(const e of d.programs)m.push(e)}function b(){for(const e of p.scripts){const t=C(e.filename);t&&m.push(t)}}function E(){for(const e of p.textFiles){const t=C(e.fn);t&&m.push(t)}}function v(){const e=r.getSubdirectories(p,null==_?"/":_);for(let t=0;t=e.getUpgradeCost(t.name)){Object(i.n)(t.name,this.state.selectedServer)?this.props.rerender():Object(m.dialogBoxCreate)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature this upgrade affects.")}}render(){const e=this.props.hashManager,t=this.props.upg,n=e.getUpgradeCost(t.name),a=e.upgrades[t.name],i=t.effectText(a),o=e.hashes>=n?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(p.CopyableText,{value:t.name}),r.a.createElement("p",null,"Cost: ",Object(d.Hashes)(n),", Bought: ",a," times"),r.a.createElement("p",null,t.desc),r.a.createElement("button",{className:o,onClick:this.purchase},"Purchase"),a>0&&i&&r.a.createElement("p",null,i),t.hasTargetServer&&r.a.createElement(u.a,{serverType:u.b.Foreign,onChange:this.changeTargetServer,style:{margin:"5px"}}))}}class _ extends r.a.Component{constructor(e){super(e),this.state={totalHashes:l.Player.hashManager.hashes}}componentDidMount(){this.interval=setInterval(()=>this.tick(),1e3)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState({totalHashes:l.Player.hashManager.hashes})}render(){const e=this.props.rerender,t=l.Player.hashManager;if(!(t instanceof o.HashManager))throw new Error("Player does not have a HashManager)");const n=Object.keys(s.HashUpgrades).map(n=>{const a=s.HashUpgrades[n];return r.a.createElement(h,{upg:a,hashManager:t,key:a.name,rerender:e})});return r.a.createElement("div",null,r.a.createElement("p",null,"Spend your hashes on a variety of different upgrades"),r.a.createElement("p",null,"Hashes: ",c.numeralWrapper.formatHashes(this.state.totalHashes)),n)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(0),r=n.n(a),i=n(37),o=n(28),s=n(1),l=n(31),c=n(132),u=n(466);class m extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,n=this.props.recalculate;let a,m;if(e.level>=i.HacknetServerConstants.MaxLevel)a=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.f)(e,i.HacknetServerConstants.MaxLevel);else{const a=i.HacknetServerConstants.MaxLevel-e.level;n=Math.min(a,t)}const c=e.calculateLevelUpgradeCost(n,s.Player.hacknet_node_level_cost_mult);a=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(c)),m=s.Player.money.lt(c)?"std-button-disabled":"std-button"}let p,d;if(e.maxRam>=i.HacknetServerConstants.MaxRam)p=r.a.createElement(r.a.Fragment,null,"MAX RAM"),d="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.g)(e,i.HacknetServerConstants.MaxRam);else{const a=Math.round(Math.log2(i.HacknetServerConstants.MaxRam/e.maxRam));n=Math.min(a,t)}const a=e.calculateRamUpgradeCost(n,s.Player.hacknet_node_ram_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),d=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let h,_;if(e.cores>=i.HacknetServerConstants.MaxCores)h=r.a.createElement(r.a.Fragment,null,"MAX CORES"),_="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.e)(e,i.HacknetServerConstants.MaxCores);else{const a=i.HacknetServerConstants.MaxCores-e.cores;n=Math.min(a,t)}const a=e.calculateCoreUpgradeCost(n,s.Player.hacknet_node_core_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),_=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let g,f;if(e.cache>=i.HacknetServerConstants.MaxCache)g=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),f="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.d)(e,i.HacknetServerConstants.MaxCache);else{const a=i.HacknetServerConstants.MaxCache-e.cache;n=Math.min(a,t)}const a=e.calculateCacheUpgradeCost(n);g=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),f=s.Player.money.lt(a)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},e.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(c.Hashes)(e.totalHashesGenerated)," (",Object(u.HashRate)(e.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(c.Hashes)(e.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:m,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.f)(e,i.HacknetServerConstants.MaxLevel)),Object(o.o)(e,a),n(),!1}},a)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.maxRam,"GB"),r.a.createElement("button",{className:d,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.g)(e,i.HacknetServerConstants.MaxRam)),Object(o.p)(e,a),n(),!1}},p)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:_,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.e)(e,i.HacknetServerConstants.MaxCores)),Object(o.l)(e,a),n(),!1}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.cache),r.a.createElement("button",{className:f,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.d)(e,i.HacknetServerConstants.MaxCache)),Object(o.k)(e,a),n(),Object(o.r)(),!1}},g))))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var a=n(0),r=n.n(a),i=n(37),o=n(28),s=n(1),l=n(31),c=n(125);class u extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,n=this.props.recalculate;let a,u;if(e.level>=i.HacknetNodeConstants.MaxLevel)a=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.f)(e,i.HacknetNodeConstants.MaxLevel);else{const a=i.HacknetNodeConstants.MaxLevel-e.level;n=Math.min(a,t)}const c=e.calculateLevelUpgradeCost(n,s.Player.hacknet_node_level_cost_mult);a=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(c)),u=s.Player.money.lt(c)?"std-button-disabled":"std-button"}let m,p;if(e.ram>=i.HacknetNodeConstants.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.g)(e,i.HacknetNodeConstants.MaxRam);else{const a=Math.round(Math.log2(i.HacknetNodeConstants.MaxRam/e.ram));n=Math.min(a,t)}const a=e.calculateRamUpgradeCost(n,s.Player.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),p=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let d,h;if(e.cores>=i.HacknetNodeConstants.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),h="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.e)(e,i.HacknetNodeConstants.MaxCores);else{const a=i.HacknetNodeConstants.MaxCores-e.cores;n=Math.min(a,t)}const a=e.calculateCoreUpgradeCost(n,s.Player.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),h=s.Player.money.lt(a)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},e.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(l.Money)(e.totalMoneyGenerated)," (",Object(c.MoneyRate)(e.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:u,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.f)(e,i.HacknetNodeConstants.MaxLevel)),Object(o.o)(e,a),n(),!1}},a)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.ram,"GB"),r.a.createElement("button",{className:p,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.g)(e,i.HacknetNodeConstants.MaxRam)),Object(o.p)(e,a),n(),!1}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:h,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.e)(e,i.HacknetNodeConstants.MaxCores)),Object(o.l)(e,a),n(),!1}},d))))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),r=n.n(a),i=n(28);class o extends r.a.Component{getSecondParagraph(){return Object(i.h)()?"Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers will perform computations and operations on the network, earning you hashes. Hashes can be spent on a variety of different upgrades.":"Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its resources to the Hacknet network. This allows you to take a small percentage of profits from hacks performed on the network. Essentially, you are renting out your Node's computing power."}getThirdParagraph(){return Object(i.h)()?"Hacknet Servers can also be used as servers to run scripts. However, running scripts on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash rate will be reduced by the percentage of RAM that is being used by that Server to run scripts.":"Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded in order to increase its computing power and thereby increase the profit you earn from it."}render(){return r.a.createElement("div",null,r.a.createElement("p",{className:"hacknet-general-info"},"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced."),r.a.createElement("p",{className:"hacknet-general-info"},this.getSecondParagraph()),r.a.createElement("p",{className:"hacknet-general-info"},this.getThirdParagraph()))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(80),r=n(17),i=n(1),o=n(56),s=n(19);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){!function(e){document.getElementById("faction-invitation-box-text").innerHTML=e}("You have received a faction invitation from "+e.name),e.alreadyInvited=!0,i.Player.factionInvitations.push(e.name),s.routing.isOn(s.Page.Factions)&&r.Engine.loadFactionsContent(),Object(o.clearEventListeners)("faction-invitation-box-yes").addEventListener("click",function(){return-1===i.Player.factionInvitations.findIndex(t=>t===e.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(a.joinFaction)(e),l(),s.routing.isOn(s.Page.Factions)&&r.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return l(),!1}),document.getElementById("faction-invitation-box-container").style.display="flex"}},,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FactionRoot=void 0;const o=i(n(0)),s=n(1303),l=n(1300),c=n(1299),u=n(1153),m=n(11),p=n(21),d=n(709),h=n(43),_=n(54),g="Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",f="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+)",y="Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp.",b="Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats.",E="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.",v="As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",C="Purchase Duplicate Sleeves and upgrades. These are permanent!",k=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];t.FactionRoot=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1,purchasingAugs:!!e.initiallyOnAugmentationsPage&&e.initiallyOnAugmentationsPage},this.manageGang=this.manageGang.bind(this),this.rerender=this.rerender.bind(this),this.routeToMain=this.routeToMain.bind(this),this.routeToPurchaseAugs=this.routeToPurchaseAugs.bind(this),this.sleevePurchases=this.sleevePurchases.bind(this),this.startFieldWork=this.startFieldWork.bind(this),this.startHackingContracts=this.startHackingContracts.bind(this),this.startHackingMission=this.startHackingMission.bind(this),this.startSecurityWork=this.startSecurityWork.bind(this)}manageGang(){if(this.props.p.inGang())return this.props.engine.loadGangContent();const e=this.props.faction.name;let t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0);const n=_.yesNoBoxGetYesButton(),a=_.yesNoBoxGetNoButton();if(null==n||null==a)return;n.innerHTML="Create Gang",n.addEventListener("click",()=>{this.props.p.startGang(e,t);const n=document.getElementById("world-menu-header");n instanceof HTMLElement&&(n.click(),n.click()),this.props.engine.loadGangContent(),_.yesNoBoxClose()}),a.innerHTML="Cancel",a.addEventListener("click",()=>{_.yesNoBoxClose()});let r="";r=t?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.

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

",_.yesNoBoxCreate(`Would you like to create a new Gang with ${e}?

`+"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.

"+r+"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.")}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}routeToMain(){this.setState({purchasingAugs:!1})}routeToPurchaseAugs(){this.setState({purchasingAugs:!0})}sleevePurchases(){d.createSleevePurchasesFromCovenantPopup(this.props.p)}startFieldWork(){this.props.p.startFactionFieldWork(this.props.faction)}startHackingContracts(){this.props.p.startFactionHackWork(this.props.faction)}startHackingMission(){const e=this.props.faction;this.props.p.singularityStopWork(),this.props.engine.loadMissionContent(),this.props.startHackingMissionFn(e)}startSecurityWork(){this.props.p.startFactionSecurityWork(this.props.faction)}render(){return this.state.purchasingAugs?this.renderAugmentationsPage():this.renderMainPage()}renderMainPage(){const e=this.props.p,t=this.props.faction,n=t.getInfo(),a=e.inGang()&&e.getGangName()===t.name,r=Math.floor(m.CONSTANTS.BaseFavorToDonate*p.BitNodeMultipliers.RepToDonateToFaction),i=t.favor>=r,s="The Covenant"===t.name&&e.bitNodeN>=10&&h.SourceFileFlags[10];let d=e.canAccessGang()&&k.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?d=!1:e.getGangName()===t.name&&(d=!0)),o.createElement("div",null,o.createElement("h1",null,t.name),o.createElement(c.Info,{faction:t,factionInfo:n}),d&&o.createElement(u.Option,{buttonText:"Manage Gang",infoText:g,onClick:this.manageGang}),!a&&n.offerHackingMission&&o.createElement(u.Option,{buttonText:"Hacking Mission",infoText:f,onClick:this.startHackingMission}),!a&&n.offerHackingWork&&o.createElement(u.Option,{buttonText:"Hacking Contracts",infoText:y,onClick:this.startHackingContracts}),!a&&n.offerFieldWork&&o.createElement(u.Option,{buttonText:"Field Work",infoText:b,onClick:this.startFieldWork}),!a&&n.offerSecurityWork&&o.createElement(u.Option,{buttonText:"Security Work",infoText:E,onClick:this.startSecurityWork}),!a&&n.offersWork()&&o.createElement(l.DonateOption,{faction:this.props.faction,p:this.props.p,rerender:this.rerender,favorToDonate:r,disabled:!i}),o.createElement(u.Option,{buttonText:"Purchase Augmentations",infoText:v,onClick:this.routeToPurchaseAugs}),s&&o.createElement(u.Option,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:C,onClick:this.sleevePurchases}))}renderAugmentationsPage(){return o.createElement("div",null,o.createElement(s.AugmentationsPage,{faction:this.props.faction,p:this.props.p,routeToMainPage:this.routeToMain}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessBladeburner",function(){return i}),n.d(t,"inBladeburner",function(){return o}),n.d(t,"startBladeburner",function(){return s});var a=n(100),r=n(43);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.SourceFileFlags[6]>0||r.SourceFileFlags[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof a.Bladeburner}function s(){this.bladeburner=new a.Bladeburner(this)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasAugmentation=void 0;const a=n(18);t.hasAugmentation=function(e){const t=e instanceof a.Augmentation?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(856),r=n(855),i=n(833),o=n(832),s=n(831),l=n(828),c=n(185),u=n(38),m=n(187),p=n(27),d=n(55);function h(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new d.a(1e3),this.homeComputer="",this.city=u.CityName.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new c.HashManager,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.MoneySourceTracker,this.moneySourceB=new m.MoneySourceTracker,this.scriptProdSinceLastAug=0,this.exploits=[]}Object.assign(h.prototype,s,l,r,i,o,a),h.prototype.toJSON=function(){return Object(p.Generic_toJSON)("PlayerObject",this)},h.fromJSON=function(e){return Object(p.Generic_fromJSON)(h,e.data)},p.Reviver.constructors.PlayerObject=h},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(72),o=n(3),s=n(12);class l extends i.a{render(){const e=this.props.upgradeData,t=`${e[2]} - ${o.numeralWrapper.formatMoney(e[1])}`,n=e[3];return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:()=>{const t=this.corp();t.funds.lt(e[1])?Object(s.dialogBoxCreate)("Insufficient funds"):(t.unlock(e),t.rerender())}},t,r.a.createElement("span",{className:"tooltiptext"},n))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(72),o=n(3),s=n(12);class l extends i.a{render(){const e=this.props.upgradeData,t=this.props.upgradeLevel,n=e[1],a=e[2],i=n*Math.pow(a,t),l=`${e[4]} - ${o.numeralWrapper.formatMoney(i)}`,c=e[5];return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:()=>{const t=this.corp();t.funds.lt(i)?Object(s.dialogBoxCreate)("Insufficient funds"):(t.upgrade(e),t.rerender())}},l,r.a.createElement("span",{className:"tooltiptext"},c))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return _});var a=n(0),r=n.n(a),i=n(72),o=n(859),s=n(858),l=n(41),c=n(472),u=n(471),m=n(11),p=n(3),d=n(20);function h(){return(h=Object.assign||function(e){for(var t=1;t=0?p.numeralWrapper.formatMoney(e):"-"+p.numeralWrapper.format(-1*e,"$0.000a");let n="";if(this.corp().dividendPercentage>0&&e>0){const t=this.corp().dividendPercentage/100*e,a=e-t,r=t/this.corp().totalShares,i=this.corp().numShares*r;n=`Retained Profits (after dividends): ${p.numeralWrapper.format(a,"$0.000a")} / s

`+`Dividend Percentage: ${p.numeralWrapper.format(this.corp().dividendPercentage/100,"0%")}
`+`Dividends per share: ${p.numeralWrapper.format(r,"$0.000a")} / s
`+`Your earnings as a shareholder (Pre-Tax): ${p.numeralWrapper.format(i,"$0.000a")} / s
`+`Dividend Tax Rate: ${this.corp().dividendTaxPercentage}%
`+`Your earnings as a shareholder (Post-Tax): ${p.numeralWrapper.format(i*(1-this.corp().dividendTaxPercentage/100),"$0.000a")} / s

`}let a="Total Funds: "+p.numeralWrapper.format(this.corp().funds.toNumber(),"$0.000a")+"
Total Revenue: "+p.numeralWrapper.format(this.corp().revenue.toNumber(),"$0.000a")+" / s
Total Expenses: "+p.numeralWrapper.format(this.corp().expenses.toNumber(),"$0.000a")+" / s
Total Profits: "+t+" / s
"+n+"Publicly Traded: "+(this.corp().public?"Yes":"No")+"
Owned Stock Shares: "+p.numeralWrapper.format(this.corp().numShares,"0.000a")+"
Stock Price: "+(this.corp().public?p.numeralWrapper.formatMoney(this.corp().sharePrice):"N/A")+"

Total Stock Shares: "+p.numeralWrapper.format(this.corp().totalShares,"0.000a")+""+`Outstanding Shares: ${p.numeralWrapper.format(this.corp().issuedShares,"0.000a")}
`+`Private Shares: ${p.numeralWrapper.format(this.corp().totalShares-this.corp().issuedShares-this.corp().numShares,"0.000a")}`+"



";const r=this.corp().storedCycles*m.CONSTANTS.MilliPerCycle;r>15e3&&(a+=`Bonus time: ${Object(d.convertTimeMsToTimeElapsedString)(r)}

`);let i=this.corp().getProductionMultiplier(),o=this.corp().getStorageMultiplier(),s=this.corp().getAdvertisingMultiplier(),l=this.corp().getEmployeeCreMultiplier(),c=this.corp().getEmployeeChaMultiplier(),u=this.corp().getEmployeeIntMultiplier(),h=this.corp().getEmployeeEffMultiplier(),_=this.corp().getSalesMultiplier(),g=this.corp().getScientificResearchMultiplier();return i>1&&(a+="Production Multiplier: "+p.numeralWrapper.format(i,"0.000")+"
"),o>1&&(a+="Storage Multiplier: "+p.numeralWrapper.format(o,"0.000")+"
"),s>1&&(a+="Advertising Multiplier: "+p.numeralWrapper.format(s,"0.000")+"
"),l>1&&(a+="Empl. Creativity Multiplier: "+p.numeralWrapper.format(l,"0.000")+"
"),c>1&&(a+="Empl. Charisma Multiplier: "+p.numeralWrapper.format(c,"0.000")+"
"),u>1&&(a+="Empl. Intelligence Multiplier: "+p.numeralWrapper.format(u,"0.000")+"
"),h>1&&(a+="Empl. Efficiency Multiplier: "+p.numeralWrapper.format(h,"0.000")+"
"),_>1&&(a+="Sales Multiplier: "+p.numeralWrapper.format(_,"0.000")+"
"),g>1&&(a+="Scientific Research Multiplier: "+p.numeralWrapper.format(g,"0.000")+"
"),a}renderButtons(){const e=this.corp().getStarterGuide.bind(this.corp()),t=this.createButton({class:"a-link-button",display:"inline-block",onClick:e,text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),n=this.corp().determineValuation()>=l.a,a=this.eventHandler().createBribeFactionsPopup.bind(this.eventHandler()),r=n?"a-link-button":"a-link-button-inactive",i={bribeFactions:this.createButton({class:r,display:"inline-block",onClick:a,text:"Bribe Factions",tooltip:n?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"}),getStarterGuide:t};return this.corp().public?this.renderPublicButtons(i):this.renderPrivateButtons(i)}renderPrivateButtons(e){const t=this.corp().fundingRound<4,n=t?"std-button":"a-link-button-inactive",a=t?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":null,i=this.corp().getInvestment.bind(this.corp()),o=this.corp().goPublic.bind(this.corp()),s=this.createButton({class:n,onClick:i,style:"inline-block",text:"Find Investors",tooltip:a}),l=this.createButton({class:"std-button",onClick:o,style:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."});return r.a.createElement("div",null,e.getStarterGuide,s,l,r.a.createElement("br",null),e.bribeFactions)}renderPublicButtons(e){const t=this.corp(),n=this.eventHandler().createSellSharesPopup.bind(this.eventHandler()),a=t.shareSaleCooldown>0,i=a?"a-link-button-inactive":"std-button",o=a?"Cannot sell shares for "+t.convertCooldownToString(t.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=this.createButton({class:i,display:"inline-block",onClick:function(e){e.isTrusted&&n(e)},text:"Sell Shares",tooltip:o}),l=this.eventHandler().createBuybackSharesPopup.bind(this.eventHandler()),c=this.createButton({class:"std-button",display:"inline-block",onClick:l,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),u=this.eventHandler().createIssueNewSharesPopup.bind(this.eventHandler()),m=t.issueNewSharesCooldown>0,p=m?"a-link-button-inactive":"std-button",d=m?"Cannot issue new shares for "+t.convertCooldownToString(t.issueNewSharesCooldown):"Issue new equity shares to raise capital.",h=this.createButton({class:p,display:"inline-block",onClick:u,text:"Issue New Shares",tooltip:d}),_=this.eventHandler().createIssueDividendsPopup.bind(this.eventHandler()),g=this.createButton({class:"std-button",display:"inline-block",onClick:_,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"});return r.a.createElement("div",null,e.getStarterGuide,s,c,r.a.createElement("br",null),h,g,r.a.createElement("br",null),e.bribeFactions)}renderUpgrades(){if(this.corp().divisions.length<=0)return;const e=[];Object.values(c.CorporationUnlockUpgrades).forEach(t=>{0===this.corp().unlockUpgrades[t[0]]&&e.push(this.renderUnlockUpgrade(t))});const t=[];for(let e=0;ethis.renderLevelableUpgrade(e)))}renderUnlockUpgrade(e){return r.a.createElement(s.a,h({},this.props,{upgradeData:e,key:e[0]}))}renderLevelableUpgrade(e){return r.a.createElement(o.a,h({},this.props,{upgradeData:e.upgradeData,upgradeLevel:e.upgradeLevel,key:e.upgradeData[0]}))}render(){return r.a.createElement("div",null,r.a.createElement("p",{dangerouslySetInnerHTML:{__html:this.getOverviewText()}}),this.renderButtons(),r.a.createElement("br",null),this.renderUpgrades())}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return IndustryWarehouse});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_BaseReactComponent__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(72),_Corporation__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(41),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(307),_Material__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_3__),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(210),_Product__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_4__),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(119),_Warehouse__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_5__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(62),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__);function ProductComponent(e){const t=e.corp,n=e.division,a=e.city,r=e.product,i=e.eventHandler,o="0.000",s="0.000a",l=n.hasResearch("uPgrade: Dashboard"),c=r.data[a][1]-r.data[a][2];let u;if(u=r.sllman[a][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(r.sllman[a][1])?`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][2],s)}/${r.sllman[a][1]})`:`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][2],s)}/${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.sllman[a][1],s)})`:"Sell (0.000/0.000)",r.marketTa2)u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.marketTa2Price[a]);else if(r.marketTa1){const e=r.rat/r.mku;u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.pCost+e)}else r.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(r.sCost)?u+=" @ "+r.sCost:u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.sCost,"$0.000a"));const m=i.createSellProductPopup.bind(i,r,a);let p="Limit Production";r.prdman[a][0]&&(p+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.prdman[a][1],o)+")");const d=i.createLimitProductProdutionPopup.bind(i,r,a),h=i.createDiscontinueProductPopup.bind(i,r,n),_=i.createProductMarketTaPopup.bind(i,r,n);return r.fin?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},r.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][0],s)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(c,s),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][1],s),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][2],s)," /s")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.rat,o),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.qlt,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.per,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.dur,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.rel,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.aes,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.fea,o),1===t.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===t.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.dmd,o),1===t.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===t.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.cmp,o))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Production Cost: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.pCost/_Corporation__WEBPACK_IMPORTED_MODULE_2__.j),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.pCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:m},u),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:d},p),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:h},"Discontinue"),n.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:_},"Market-TA"))):l?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",r.name,"..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.prog,"0.00"),"% complete"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:m},u),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:d},p),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:h},"Discontinue"),n.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:_},"Market-TA"))):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",r.name,"..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.prog,"0.00"),"% complete"))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,eventHandler=props.eventHandler,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _Corporation__WEBPACK_IMPORTED_MODULE_2__.i))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.buy,nfB)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button",purchaseButtonOnClick=eventHandler.createPurchaseMaterialPopup.bind(eventHandler,mat,division,warehouse),exportButtonOnClick=eventHandler.createExportMaterialPopup.bind(eventHandler,mat);let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(mat.sllman[1])?`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)}/${mat.sllman[1]})`:`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)}/${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sllman[1],nfB)})`,mat.marketTa2)sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.marketTa2Price);else if(mat.marketTa1)sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.bCost+markupLimit);else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(eval(sCost))}else sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.sCost)}else sellButtonText="Sell (0.000/0.000)";const sellButtonOnClick=eventHandler.createSellMaterialPopup.bind(eventHandler,mat),marketTaButtonOnClick=eventHandler.createMaterialMarketTaPopup.bind(eventHandler,mat,division);return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.bCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.qlt,"0.00a"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:purchaseButtonClass,onClick:purchaseButtonOnClick},purchaseButtonText,tutorial&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:exportButtonOnClick},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:sellButtonOnClick},sellButtonText),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:marketTaButtonOnClick},"Market-TA")))}class IndustryWarehouse extends _BaseReactComponent__WEBPACK_IMPORTED_MODULE_1__.a{isRelevantMaterial(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}renderWarehouseUI(){const e=this.corp(),t=this.routing().currentDivision,n=t.warehouses[this.props.currentCity],a={color:n.sizeUsed>=n.size?"red":"white",margin:"5px"},r=_Corporation__WEBPACK_IMPORTED_MODULE_2__.o*Math.pow(1.07,n.level+1),i=e.funds.gt(r)?"std-button":"a-link-button-inactive";let o="This Industry uses ["+Object.keys(t.reqMats).join(", ")+"] in order to ";t.prodMats.length>0?(o+="produce ["+t.prodMats.join(", ")+"] ",t.makesProducts&&(o+=" and "+t.getProductDescriptionText())):t.makesProducts&&(o+=t.getProductDescriptionText()+".");const s=[];for(const e in t.reqMats)if(t.reqMats.hasOwnProperty(e)){const n=[" *",t.reqMats[e],e].join(" ");s.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:e},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,n)))}let l,c="in order to create ";switch(t.prodMats.length>0?(c+="one of each produced Material ("+t.prodMats.join(", ")+") ",t.makesProducts&&(c+="or to create one of its Products")):t.makesProducts&&(c+="one of its Products"),t.state){case"START":l="Current state: Preparing...";break;case"PURCHASE":l="Current state: Purchasing materials...";break;case"PRODUCTION":l="Current state: Producing materials and/or products...";break;case"SALE":l="Current state: Selling materials and/or products...";break;case"EXPORT":l="Current state: Exporting materials and/or products...";break;default:console.error(`Invalid state: ${t.state}`)}const u=[];for(const a in n.materials)n.materials[a]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.Material&&this.isRelevantMaterial(a,t)&&u.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{city:this.props.currentCity,corp:e,division:t,eventHandler:this.eventHandler(),key:a,mat:n.materials[a],warehouse:n}));const m=[];if(t.makesProducts&&Object.keys(t.products).length>0)for(const a in t.products)t.products[a]instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.Product&&m.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{city:this.props.currentCity,corp:e,division:t,eventHandler:this.eventHandler(),key:a,product:t.products[a],warehouse:n}));return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip",style:a},"Storage: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatBigNumber(n.sizeUsed)," / ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatBigNumber(n.size),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:n.breakdown}})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:i,onClick:()=>{++n.level,n.updateSize(e,t),e.funds=e.funds.minus(r),e.rerender()}},"Upgrade Warehouse Size - ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r)),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,o,". The exact requirements for production are:"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),s,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,c),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,l),e.unlockUpgrades[1]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:t=>{n.smartSupplyEnabled=t.target.checked,e.rerender()},style:{margin:"3px"},checked:n.smartSupplyEnabled})),u,m)}render(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=e.warehouses[this.props.currentCity],n=this.eventHandler().purchaseWarehouse.bind(this.eventHandler(),e,this.props.currentCity);return t instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.Warehouse?this.renderWarehouseUI():react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:n},"Purchase Warehouse (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(_Corporation__WEBPACK_IMPORTED_MODULE_2__.m),")"))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var a=n(0),r=n.n(a),i=n(72),o=n(41),s=n(33),l=n(320),c=n(3),u=n(12),m=n(171);class p extends i.a{renderMakeProductButton(){const e=this.routing().currentDivision;var t,n;switch(e.type){case s.Industries.Food:t="Build Restaurant",n="Build and manage a new restaurant!";break;case s.Industries.Tobacco:t="Create Product",n="Create a new tobacco product!";break;case s.Industries.Pharmaceutical:t="Create Drug",n="Design and develop a new pharmaceutical drug!";break;case s.Industries.Computer:case"Computer":t="Create Product",n="Design and manufacture a new computer hardware product!";break;case s.Industries.Robotics:t="Design Robot",n="Design and create a new robot or robotic system!";break;case s.Industries.Software:t="Develop Software",n="Develop a new piece of software!";break;case s.Industries.Healthcare:t="Build Hospital",n="Build and manage a new hospital!";break;case s.Industries.RealEstate:t="Develop Property",n="Develop a new piece of real estate property!";break;default:return t="Create Product",n="Create a new product!",""}n+="

To begin developing a product, first choose the city in which it will be designed. The stats of your employees in the selected city affect the properties of the finished product, such as its quality, performance, and durability.

You can also choose to invest money in the design and marketing of the product. Investing money in its design will result in a superior product. Investing money in marketing the product will help the product's sales.";const a=e.hasMaximumNumberProducts(),i=a?"a-link-button-inactive tooltip":"std-button",o=this.eventHandler().createMakeProductPopup.bind(this.eventHandler(),n,e);return r.a.createElement("button",{className:i,onClick:o,style:{margin:"6px",display:"inline-block"}},t,a&&r.a.createElement("span",{className:"tooltiptext"},"You have reached the maximum number of products: ",e.getMaximumNumberProducts()))}renderText(){const e=this.corp(),t=this.routing().currentDivision,n=1===e.unlockUpgrades[4],a=t.lastCycleRevenue.minus(t.lastCycleExpenses).toNumber(),i=`Industry: ${t.type} (Corp Funds: ${c.numeralWrapper.formatMoney(e.funds.toNumber())})`,o=`Awareness: ${c.numeralWrapper.format(t.awareness,"0.000")}`,s=`Popularity: ${c.numeralWrapper.format(t.popularity,"0.000")}`;let l=!1;const p=t.getAdvertisingFactors(),d=p[1],h=p[2],_=p[3],g=p[0];n&&(l=!0);const f=`Revenue: ${c.numeralWrapper.formatMoney(t.lastCycleRevenue.toNumber())} / s`,y=`Expenses: ${c.numeralWrapper.formatMoney(t.lastCycleExpenses.toNumber())} /s`,b=`Profit: ${c.numeralWrapper.formatMoney(a)} / s`;return r.a.createElement("div",null,i,r.a.createElement("br",null)," ",r.a.createElement("br",null),o," ",r.a.createElement("br",null),s," ",r.a.createElement("br",null),!1!==l&&r.a.createElement("p",{className:"tooltip"},"Advertising Multiplier: x",c.numeralWrapper.format(g,"0.000"),r.a.createElement("span",{className:"tooltiptext cmpy-mgmt-advertising-info"},"Total multiplier for this industrys sales due to its awareness and popularity",r.a.createElement("br",null),"Awareness Bonus: x",c.numeralWrapper.format(Math.pow(d,.85),"0.000"),r.a.createElement("br",null),"Popularity Bonus: x",c.numeralWrapper.format(Math.pow(h,.85),"0.000"),r.a.createElement("br",null),"Ratio Multiplier: x",c.numeralWrapper.format(Math.pow(_,.85),"0.000"))),l,r.a.createElement("br",null),r.a.createElement("br",null),f," ",r.a.createElement("br",null),y," ",r.a.createElement("br",null),b,r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Production Multiplier: ",c.numeralWrapper.format(t.prodMult,"0.00"),r.a.createElement("span",{className:"tooltiptext"},"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate")),r.a.createElement("div",{className:"help-tip",onClick:()=>{function e(e){return Object(m.createProgressBarText)({progress:e,totalTicks:20})}Object(u.dialogBoxCreate)("Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these materials have on your production varies between Industries. For example, Real Estate may be very effective for some Industries, but ineffective for others.

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.

Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):

"+`Hardware:    ${e(t.hwFac)}
`+`Robots:      ${e(t.robFac)}
`+`AI Cores:    ${e(t.aiFac)}
`+`Real Estate: ${e(t.reFac)}`)}},"?"),r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Scientific Research: ",c.numeralWrapper.format(t.sciResearch.qty,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),r.a.createElement("button",{className:"help-tip",onClick:t.createResearchBox.bind(t)},"Research"))}renderUpgrades(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity];if(!(n instanceof o.i))throw new Error(`Current City (${this.props.currentCity}) for UI does not have an OfficeSpace object`);const a=[];for(const r in l.IndustryUpgrades){const i=l.IndustryUpgrades[r];if(t.hasResearch("AutoBrew")&&"Coffee"===i[4])continue;const o=i[0],s=i[1],m=i[2];let p=0;switch(o){case 0:p=n.employees.length*s;break;default:p=s*Math.pow(m,t.upgrades[o])}const d=()=>{e.funds.lt(p)?Object(u.dialogBoxCreate)("Insufficient funds"):(e.funds=e.funds.minus(p),t.upgrade(i,{corporation:e,office:n}),e.rerender())};a.push(this.renderUpgrade({onClick:d,text:`${i[4]} - ${c.numeralWrapper.formatMoney(p)}`,tooltip:i[5]}))}return a}renderUpgrade(e){return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",onClick:e.onClick,key:e.text},e.text,null!=e.tooltip&&r.a.createElement("span",{className:"tooltiptext"},e.tooltip))}render(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=this.renderMakeProductButton();return r.a.createElement("div",{className:"cmpy-mgmt-industry-overview-panel"},this.renderText(),r.a.createElement("br",null),r.a.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),r.a.createElement("br",null),this.renderUpgrades()," ",r.a.createElement("br",null),e.makesProducts&&t)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var a=n(0),r=n.n(a),i=n(72),o=n(41),s=n(25),l=n(3),c=n(181);class u extends i.a{constructor(e){super(e),this.state={city:"",division:"",employeeManualAssignMode:!1,employee:null,numEmployees:0,numOperations:0,numEngineers:0,numBusiness:0,numManagement:0,numResearch:0,numUnassigned:0,numTraining:0},this.updateEmployeeCount()}resetEmployeeCount(){this.state.numEmployees=0,this.state.numOperations=0,this.state.numEngineers=0,this.state.numBusiness=0,this.state.numManagement=0,this.state.numResearch=0,this.state.numUnassigned=0,this.state.numTraining=0}updateEmployeeCount(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=e.offices[this.props.currentCity];if(!(t instanceof o.i))throw new Error(`Current City (${this.props.currentCity}) for UI does not have an OfficeSpace object`);e.name===this.state.division&&this.props.currentCity===this.state.city||(this.resetEmployeeCount(),this.state.division=e.name,this.state.city=this.props.currentCity);const n=t.employees.length;for(let e=this.state.numEmployees;e0&&(u=a/t.employees.length,m=i/t.employees.length,p=o/t.employees.length);const d=n=>{if(this.state.numUnassigned<=0)console.warn("Cannot assign employee. No unassigned employees available");else{switch(n){case s.EmployeePositions.Operations:++this.state.numOperations;break;case s.EmployeePositions.Engineer:++this.state.numEngineers;break;case s.EmployeePositions.Business:++this.state.numBusiness;break;case s.EmployeePositions.Management:++this.state.numManagement;break;case s.EmployeePositions.RandD:++this.state.numResearch;break;case s.EmployeePositions.Unassigned:++this.state.numUnassigned;break;case s.EmployeePositions.Training:++this.state.numTraining;break;default:console.error("Unrecognized employee position: "+n)}--this.state.numUnassigned,t.assignEmployeeToJob(n),t.calculateEmployeeProductivity({corporation:this.corp(),industry:e}),this.corp().rerender()}},h=n=>{function a(e){console.warn(`Cannot unassign from ${e} because there is nobody assigned to that position`)}switch(n){case s.EmployeePositions.Operations:if(this.state.numOperations<=0)return a(s.EmployeePositions.Operations);--this.state.numOperations;break;case s.EmployeePositions.Engineer:if(this.state.numEngineers<=0)return a(s.EmployeePositions.Operations);--this.state.numEngineers;break;case s.EmployeePositions.Business:if(this.state.numBusiness<=0)return a(s.EmployeePositions.Operations);--this.state.numBusiness;break;case s.EmployeePositions.Management:if(this.state.numManagement<=0)return a(s.EmployeePositions.Operations);--this.state.numManagement;break;case s.EmployeePositions.RandD:if(this.state.numResearch<=0)return a(s.EmployeePositions.Operations);--this.state.numResearch;break;case s.EmployeePositions.Unassigned:console.warn("Tried to unassign from the Unassigned position");break;case s.EmployeePositions.Training:if(this.state.numTraining<=0)return a(s.EmployeePositions.Operations);--this.state.numTraining;break;default:console.error("Unrecognized employee position: "+n)}++this.state.numUnassigned,t.unassignEmployeeFromJob(n),t.calculateEmployeeProductivity({corporation:this.corp(),industry:e}),this.corp().rerender()},_={fontSize:"15px",margin:"5px 0px 5px 0px",width:"50%"},g=this.state.numUnassigned>0?"std-button":"a-link-button-inactive",f=this.state.numOperations>0?"std-button":"a-link-button-inactive",y=this.state.numEngineers>0?"std-button":"a-link-button-inactive",b=this.state.numBusiness>0?"std-button":"a-link-button-inactive",E=this.state.numManagement>0?"std-button":"a-link-button-inactive",v=this.state.numResearch>0?"std-button":"a-link-button-inactive",C=this.state.numTraining>0?"std-button":"a-link-button-inactive";return r.a.createElement("div",null,r.a.createElement("button",{className:"std-button tooltip",onClick:()=>{this.state.employeeManualAssignMode=!0,this.corp().rerender()}},"Switch to Manual Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")),r.a.createElement("p",null,r.a.createElement("strong",null,"Unassigned Employees: ",this.state.numUnassigned)),r.a.createElement("br",null),r.a.createElement("p",null,"Avg Employee Morale: ",l.numeralWrapper.format(u,"0.000")),r.a.createElement("p",null,"Avg Employee Happiness: ",l.numeralWrapper.format(m,"0.000")),r.a.createElement("p",null,"Avg Employee Energy: ",l.numeralWrapper.format(p,"0.000")),r.a.createElement("p",null,"Total Employee Salary: ",l.numeralWrapper.formatMoney(c)),n&&r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production: ",l.numeralWrapper.format(e.getOfficeProductivity(t),"0.000"),r.a.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),n&&r.a.createElement("br",null),n&&r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production: ",l.numeralWrapper.format(e.getOfficeProductivity(t,{forProduct:!0}),"0.000"),r.a.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),n&&r.a.createElement("br",null),n&&r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier: x",l.numeralWrapper.format(e.getBusinessFactor(t),"0.000"),r.a.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales")),n&&r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Operations," (",this.state.numOperations,")",r.a.createElement("span",{className:"tooltiptext"},"Manages supply chain operations. Improves the amount of Materials and Products you produce.")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Operations),this.corp().rerender()}},"+"),r.a.createElement("button",{className:f,onClick:()=>{h(s.EmployeePositions.Operations),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Engineer," (",this.state.numEngineers,")",r.a.createElement("span",{className:"tooltiptext"},"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Engineer),this.corp().rerender()}},"+"),r.a.createElement("button",{className:y,onClick:()=>{h(s.EmployeePositions.Engineer),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Business," (",this.state.numBusiness,")",r.a.createElement("span",{className:"tooltiptext"},"Handles sales and finances. Improves the amount of Materials and Products you can sell.")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Business),this.corp().rerender()}},"+"),r.a.createElement("button",{className:b,onClick:()=>{h(s.EmployeePositions.Business),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Management," (",this.state.numManagement,")",r.a.createElement("span",{className:"tooltiptext"},"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Management),this.corp().rerender()}},"+"),r.a.createElement("button",{className:E,onClick:()=>{h(s.EmployeePositions.Management),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.RandD," (",this.state.numResearch,")",r.a.createElement("span",{className:"tooltiptext"},"Research new innovative ways to improve the company. Generates Scientific Research")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.RandD),this.corp().rerender()}},"+"),r.a.createElement("button",{className:v,onClick:()=>{h(s.EmployeePositions.RandD),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Training," (",this.state.numTraining,")",r.a.createElement("span",{className:"tooltiptext"},"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations.")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Training),this.corp().rerender()}},"+"),r.a.createElement("button",{className:C,onClick:()=>{h(s.EmployeePositions.Training),this.corp().rerender()}},"-"))}renderManualEmployeeManagement(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity],a=[];for(let e=0;e{this.state.employeeManualAssignMode=!1,this.corp().rerender()}},"Switch to Auto Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")),r.a.createElement("div",{style:{color:"white",margin:"4px",padding:"4px"}},r.a.createElement("select",{onChange:t=>{const a=Object(c.getSelectText)(t.target);for(let e=0;e{const n=Object(c.getSelectText)(t.target);this.state.employee.pos=n,this.resetEmployeeCount(),e.rerender()},value:o},u)))}render(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity],a={fontSize:"13px"};let i="tooltip";n.atCapacity()?i+=" a-link-button-inactive":(i+=" std-button",0===n.employees.length&&(i+=" flashing-button"));let o="tooltip";n.atCapacity()?o+=" a-link-button-inactive":o+=" std-button";const s=this.eventHandler().createUpgradeOfficeSizePopup.bind(this.eventHandler(),n),l=this.eventHandler().createThrowOfficePartyPopup.bind(this.eventHandler(),n);return r.a.createElement("div",{className:"cmpy-mgmt-employee-panel"},r.a.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),r.a.createElement("p",null,"Size: ",n.employees.length," / ",n.size," employees"),r.a.createElement("button",{className:i,onClick:()=>{n.findEmployees({corporation:e,industry:t})},style:a},"Hire Employee",0===n.employees.length&&r.a.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),r.a.createElement("button",{className:o,onClick:()=>{n.atCapacity()||(n.hireRandomEmployee(),this.corp().rerender())},style:a},"Autohire Employee",r.a.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button tooltip",onClick:s,style:a},"Upgrade size",r.a.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!t.hasResearch("AutoPartyManager")&&r.a.createElement("button",{className:"std-button tooltip",onClick:l,style:a},"Throw Party",r.a.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),r.a.createElement("br",null),this.renderEmployeeManagement())}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(0),r=n.n(a),i=n(72),o=n(863),s=n(862),l=n(861);class c extends i.a{constructor(e){if(null==e.currentCity)throw new Error("Industry component constructed without 'city' prop");super(e)}render(){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(s.a,this.props),r.a.createElement(o.a,this.props)),r.a.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},r.a.createElement(l.a,this.props)))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),r=n.n(a),i=n(72);class o extends i.a{constructor(e){if(null==e.onClicks)throw new Error("CityTabs component constructed without onClick handlers");if(null==e.city)throw new Error("CityTabs component constructed without 'city' property");if(null==e.cityStateSetter)throw new Error("CityTabs component constructed without 'cityStateSetter' property");super(e)}renderTab(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick,key:e.key},e.key)}render(){const e=this.routing().currentDivision,t=[];for(const e in this.props.onClicks)t.push(this.renderTab({current:this.props.city===e,key:e,onClick:this.props.onClicks[e]}));const n=this.eventHandler().createNewCityPopup.bind(this.eventHandler(),e,this.props.cityStateSetter);return t.push(this.renderTab({current:!1,key:"Expand into new City",onClick:n})),t}}},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var a=n(0),r=n.n(a),i=n(72),o=n(865),s=n(864),l=n(860),c=n(41),u=n(38);function m(){return(m=Object.assign||function(e){for(var t=1;t{this.state.city=n,this.corp().rerender()}));const n=r.a.createElement(o.a,m({},this.props,{city:this.state.city,onClicks:t,cityStateSetter:this.changeCityState.bind(this)})),a=r.a.createElement(s.a,m({},this.props,{currentCity:this.state.city}));return r.a.createElement("div",{id:"cmpy-mgmt-panel"},n,a)}render(){return this.renderContent()}}},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var a=n(0),r=n.n(a),i=n(72);function o(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.text)}class s extends i.a{renderTab(e){return r.a.createElement(o,{current:e.current,key:e.key,onClick:e.onClick,text:e.text})}render(){const e={};for(const t of this.corp().divisions){const n=t.name,a=()=>{this.routing().routeTo(n),this.corp().rerender()};e[n]=a}return r.a.createElement("div",null,this.renderTab({current:this.routing().isOnOverviewPage(),key:"overview",onClick:()=>{this.routing().routeToOverviewPage(),this.corp().rerender()},text:this.corp().name}),this.corp().divisions.map(t=>this.renderTab({current:this.routing().isOn(t.name),key:t.name,onClick:e[t.name],text:t.name})),this.renderTab({onClick:this.eventHandler().createNewIndustryPopup.bind(this.eventHandler()),text:"Expand into new Industry"}))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(72),o=n(867),s=n(866);class l extends i.a{render(){return r.a.createElement("div",null,r.a.createElement(o.a,this.props),r.a.createElement(s.a,this.props))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSelector=void 0,t.clearSelector=function(e){for(let t=e.options.length-1;t>=0;t--)e.remove(t)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return CorporationEventHandler});var _Routing__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(469),_Routing__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Routing__WEBPACK_IMPORTED_MODULE_0__),_Corporation__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(41),_IndustryData__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(33),_IndustryData__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_2__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(134),_MaterialSizes__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(210),_Product__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_4__),_Player__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1),_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(16),_Faction_Factions__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(173),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(12),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(36),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(44),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(869),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_12__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(13),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__),_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(431),_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_14__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(57),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(69),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__),_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(181),_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(49),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__);class CorporationEventHandler{constructor(e,t){if(!(e instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.c))throw new Error("CorporationEventHandler constructed without proper Corporation instance");if(!(t instanceof _Routing__WEBPACK_IMPORTED_MODULE_0__.CorporationRouting))throw new Error("CorporationEventHandler constructed without proper CorporationRouting instance");this.corp=e,this.routing=t}createBribeFactionsPopup(){const e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_13__.createElement)("select",{class:"dropdown",margin:"3px"});for(let e=0;e<_Player__WEBPACK_IMPORTED_MODULE_5__.Player.factions.length;++e){const t=_Player__WEBPACK_IMPORTED_MODULE_5__.Player.factions[e];_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__.Factions[t].getInfo().offersWork()&&n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("option",{text:t,value:t}))}var a,r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==i.value||""==i.value?0:parseFloat(i.value),t=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(parseFloat(a.value));if(isNaN(e)||isNaN(o)||e<0||o<0)r.innerText="ERROR: Invalid value(s) entered";else if(this.corp.funds.lt(e))r.innerText="ERROR: You do not have this much money to bribe with";else if(this.corp.stockShares>this.corp.numShares)r.innerText="ERROR: You do not have this many shares to bribe with";else{var s=(Number(e)+o*t)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;r.innerText="You will gain "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(s,"0,0")+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==i.value||""==i.value?0:parseFloat(i.value),t=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(a.value);if(isNaN(e)||isNaN(o)||e<0||o<0)r.innerText="ERROR: Invalid value(s) entered";else if(this.corp.funds.lt(e))r.innerText="ERROR: You do not have this much money to bribe with";else if(this.corp.stockShares>this.corp.numShares)r.innerText="ERROR: You do not have this many shares to bribe with";else{var s=(e+o*t)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;r.innerText="You will gain "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(s,"0,0")+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==i.value||""==i.value?0:parseFloat(i.value),r=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(parseFloat(a.value)),s=_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__.Factions[n.options[n.selectedIndex].value];if(null==s)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(o)||t<0||o<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.corp.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(o>this.corp.numShares)){var l=(t+o*r)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(l,"0,0")+" reputation with "+s.name+" by bribing them."),s.playerReputation+=l,this.corp.funds=this.corp.funds.minus(t),this.corp.numShares-=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[t,n,r,i,a,o,s])}createBuybackSharesPopup(){const e="cmpy-mgmt-buyback-shares-popup",t=1.1*this.corp.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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.

To purchase these shares, you must use your own money (NOT your Corporation's funds).

The current buyback price of your company's stock is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")+". Your company currently has "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatBigNumber(this.corp.issuedShares)+" outstanding stock shares"});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"number",placeholder:"Shares to buyback",margin:"5px",inputListener:()=>{var e=Math.round(r.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to buyback":e>this.corp.issuedShares?a.innerText="There are not this many shares available to buy back. There are only "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatBigNumber(this.corp.issuedShares)+" outstanding shares.":a.innerText="Purchase "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(e*t,"$0.000a")}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(r.value);const n=1.1*this.corp.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.corp.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: There are not this many oustanding shares to buy back");else if(t*n>_Player__WEBPACK_IMPORTED_MODULE_5__.Player.money)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t*n,"$0.000a")+")");else{if(this.corp.numShares+=t,isNaN(this.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+this.corp.issuedShares),console.warn("Converting to number now");const e=parseInt(this.corp.issuedShares);isNaN(e)?this.corp.issuedShares=0:this.corp.issuedShares=e}this.corp.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_5__.Player.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),this.rerender()}return!1}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[n,a,r,i,o]),r.focus()}createDiscontinueProductPopup(e,t){const n="cmpy-mgmt-discontinue-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"popup-box-button",innerText:"Discontinue",clickListener:()=>(t.discontinueProduct(e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),this.rerender(),!1)}),i=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,i,r])}createExportMaterialPopup(mat){const corp=this.corp,popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_13__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown",changeListener:()=>{const e=Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__.getSelectValue)(industrySelector);for(let t=0;t{const industryName=Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__.getSelectText)(industrySelector),cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value;let sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");let temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid expression entered for export amount: "+e),!1}if(!(null==temp||isNaN(temp)||temp<0)){var exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};return mat.exp.push(exportObj),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(popupId),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(popupId,{innerText:"Cancel"}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."}),currExports=[];for(var i=0;iCity: "+t.exp[e].city+"
Amount/s: "+t.exp[e].amt,clickListener:()=>{t.exp.splice(e,1),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(popupId),createExportMaterialPopup(t)}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}createIssueDividendsPopup(){const e="cmpy-mgmt-issue-dividends-popup",t="Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.

In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an "+`integer between 0 and ${_Corporation__WEBPACK_IMPORTED_MODULE_1__.d}. (A percentage of 0 means no dividends will be `+"issued

Two important things to note:
* Issuing dividends will negatively affect your corporation's stock price
* Dividends are taxed. Taxes start at 50%, but can be decreased

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_13__.createElement)("p",{innerHTML:t});let a;const r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Dividend %",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&a.click()}});a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Allocate Dividend Percentage",clickListener:()=>{const t=Math.round(parseInt(r.value));return isNaN(t)||t<0||t>_Corporation__WEBPACK_IMPORTED_MODULE_1__.d?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Invalid value. Must be an integer between 0 and ${_Corporation__WEBPACK_IMPORTED_MODULE_1__.d}`):(this.corp.dividendPercentage=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),this.rerender(),!1)}});const i=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[n,r,a,i]),r.focus()}createIssueNewSharesPopup(){const e="cmpy-mgmt-issue-new-shares-popup",t=Math.round(.2*this.corp.totalShares),n=t-t%1e6,a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.

"+` * You can issue at most ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.000a")} new shares
`+" * New shares are sold at a 10% discount
 * You can only issue new shares once every 12 hours
 * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share
 * Number of new shares issued must be a multiple of 10 million

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 r,i;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{display:"block"});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"# New Shares",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER?r.click():function(e){const t=Math.round(.9*e.sharePrice);let a=parseInt(i.value);isNaN(a)?o.innerText="Invalid input":(a/=1e7,a=1e7*Math.round(a),o.innerText=a<1e7?"Must issue at least 10 million new shares":a>n?"You cannot issue that many shares":`Issue ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0.000a")} new shares `+`for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(a*t)}?`)}(this.corp)}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Issue New Shares",clickListener:()=>{const t=Math.round(.9*this.corp.sharePrice);let a=parseInt(i.value);if(isNaN(a))return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input for number of new shares");if((a=1e7*Math.round(a/1e7))<1e7||a>n)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input for number of new shares");const r=a*t;this.corp.issueNewSharesCooldown=_Corporation__WEBPACK_IMPORTED_MODULE_1__.f,this.corp.totalShares+=a;let o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10__.getRandomInt)(0,Math.round(a/2));return o=1e6*Math.round(o/1e6),this.corp.issuedShares+=a-o,this.corp.funds=this.corp.funds.plus(r),this.corp.immediatelyUpdateSharePrice(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Issued ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0.000a")} and raised `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(r)}. ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(o,"0.000a")} `+"of these shares were bought by private investors.

"+`Stock price decreased to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(this.corp.sharePrice)}`),this.rerender(),!1}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[a,o,i,r,s]),i.focus()}createLimitProductProdutionPopup(e,t){const n="cmpy-mgmt-limit-product-production-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."});let r;const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Limit",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&r.click()}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Limit production",margin:"5px",clickListener:()=>{if(""===i.value)return e.prdman[t][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),!1;var a=parseFloat(i.value);return isNaN(a)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value entered"),!1):(a<0?e.prdman[t][0]=!1:(e.prdman[t][0]=!0,e.prdman[t][1]=a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),this.rerender(),!1)}});const o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{innerText:"Cancel"});o.style.margin="6px",Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,i,r,o]),i.focus()}createMakeProductPopup(e,t){if(t.hasMaximumNumberProducts())return;const n="cmpy-mgmt-create-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:e}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown",margin:"5px"});for(const e in t.offices)t.offices[e]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.i&&r.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("option",{value:e,text:e}));let i="Product Name";t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Food?i="Restaurant Name":t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Healthcare?i="Hospital Name":t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.RealEstate&&(i="Property Name");var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",margin:"5px",placeholder:i}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("br"),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",margin:"5px",placeholder:"Design investment",type:"number"});let c;var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",margin:"5px",placeholder:"Marketing investment",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&c.click()}});c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Develop Product",clickListener:()=>{(null==l.value||l.value<0)&&(l.value=0),(null==u.value||u.value<0)&&(u.value=0);var e=parseFloat(l.value),a=parseFloat(u.value);if(null==o.value||""===o.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.corp.funds.lt(e+a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{const i=new _Product__WEBPACK_IMPORTED_MODULE_4__.Product({name:o.value.replace(/[<>]/g,""),createCity:r.options[r.selectedIndex].value,designCost:e,advCost:a});if(t.products[i.name]instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.Product)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You already have a product with this name!");this.corp.funds=this.corp.funds.minus(e+a),t.products[i.name]=i,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n)}return this.rerender(),!1}});const m=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,r,o,s,l,u,c,m]),o.focus()}createMaterialMarketTaPopup(e,t){const n="cmpy-mgmt-marketta-popup",a=e.getMarkupLimit(),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Market-TA.I
The maximum sale price you can mark this up to is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(e.bCost+a)+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{display:"block"}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{color:"white",for:"cmpy-mgmt-marketa1-checkbox",innerText:"Use Market-TA.I for Auto-Sale Price",tooltip:"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)"}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:e.marketTa1,id:"cmpy-mgmt-marketa1-checkbox",margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa1=t.target.checked}});i.appendChild(o),i.appendChild(s);const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",display:"block",innerText:"Close"});if(t.hasResearch("Market-TA.II")){let t;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),t()},type:"number",value:e.bCost});(t=function(){const t=parseFloat(s.value);let n=1;t>e.bCost?t-e.bCost>a&&(n=Math.pow(a/(t-e.bCost),2)):t{e.marketTa2=t.target.checked}});u.appendChild(m),u.appendChild(p);const d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,o,s,u,d,l])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,l])}createNewCityPopup(e,t){const n="cmpy-mgmt-expand-city-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g,"$0.000a")}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown",margin:"5px"});for(const t in e.offices)e.offices[t]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.i||r.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("option",{text:t,value:t}));const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Confirm",clickListener:()=>{if(r.length<=0)return!1;let a=r.options[r.selectedIndex].value;return this.corp.funds.lt(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.corp.funds=this.corp.funds.minus(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Opened a new office in "+a+"!"),e.offices[a]=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.i({loc:a,size:_Corporation__WEBPACK_IMPORTED_MODULE_1__.h})),t(a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),this.rerender(),!1}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,r,i,o])}createNewIndustryPopup(){const e="cmpy-mgmt-expand-industry-popup";if(null!=document.getElementById(e))return;var t,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&t.click()}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{const e=a.options[a.selectedIndex].value,t=i.value;for(let e=0;e
",a.addEventListener("change",function(){var e=a.options[a.selectedIndex].value;r.innerHTML=_IndustryData__WEBPACK_IMPORTED_MODULE_2__.IndustryDescriptions[e]+"

"});const m=[];return m.push(n),m.push(a),m.push(r),m.push(o),m.push(i),m.push(s),m.push(t),Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,m),i.focus(),!1}createProductMarketTaPopup(e,t){const n="cmpy-mgmt-marketta-popup",a=e.rat/e.mku,r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Market-TA.I
The maximum sale price you can mark this up to is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(e.pCost+a)+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{display:"block"}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{color:"white",for:"cmpy-mgmt-marketa1-checkbox",innerText:"Use Market-TA.I for Auto-Sale Price",tooltip:"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)"}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:e.marketTa1,id:"cmpy-mgmt-marketa1-checkbox",margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa1=t.target.checked}});i.appendChild(o),i.appendChild(s);const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",display:"block",innerText:"Close"});if(t.hasResearch("Market-TA.II")){let t;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),t()},type:"number",value:e.pCost});(t=function(){const t=parseFloat(s.value);let n=1;t>e.pCost&&t-e.pCost>a&&(n=a/(t-e.pCost)),o.innerHTML="
Market-TA.II
"+`If you sell at ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t)}, `+`then you will sell ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.00000")}x as much compared `+"to if you sold at market price."})();const c="cmpy-mgmt-marketa2-checkbox",u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{display:"block"}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{color:"white",for:c,innerText:"Use Market-TA.II for Auto-Sale Price",tooltip:"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)"}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:e.marketTa2,id:c,margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa2=t.target.checked}});u.appendChild(m),u.appendChild(p);const d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,o,s,u,d,l])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,l])}createPurchaseMaterialPopup(e,t,n){const a=this.corp,r="cmpy-mgmt-material-purchase-popup",i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Enter the amount of "+e.name+" you would like to purchase per second. This material's cost changes constantly"});let o,s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Purchase amount",type:"number",value:e.buy?e.buy:null,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&o.click()}});o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{innerText:"Confirm",class:"std-button",clickListener:()=>{if(!isNaN(s.value))return e.buy=parseFloat(s.value),isNaN(e.buy)&&(e.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(r),this.rerender(),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid amount")}});const l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{innerText:"Clear Purchase",class:"std-button",clickListener:()=>(e.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(r),this.rerender(),!1)}),c=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(r,{class:"std-button",innerText:"Cancel"}),u=[i,s,o,l,c];if(t.hasResearch("Bulk Purchasing")){const t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Enter the amount of "+e.name+" you would like to bulk purchase. This purchases the specified amount instantly (all at once)."});let i,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p");const s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Bulk Purchase amount",type:"number",onkeyup:t=>{t.preventDefault(),function(t){const a=parseFloat(t),r=a*e.bCost,i=_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__.MaterialSizes[e.name];a*i>(n.size-n.sizeUsed)/i?o.innerText="Not enough warehouse space to purchase this amount":isNaN(r)?o.innerText="Invalid put for Bulk Purchase amount":o.innerText=`Purchasing ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0,0.00")} of `+`${e.name} will cost ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(r)}`}(t.target.value),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&i.click()}});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Confirm Bulk Purchase",clickListener:()=>{const t=parseFloat(s.value),i=_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__.MaterialSizes[e.name];if(t*i>(n.size-n.sizeUsed)/i)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You do not have enough warehouse size to fit this purchase"),!1;if(!isNaN(t)){const n=t*e.bCost;return a.funds.gt(n)?(a.funds=a.funds.minus(n),e.qty+=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(r),!1):(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You cannot afford this purchase."),!1)}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input amount")}}),u.push(t),u.push(o),u.push(s),u.push(i)}Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(r,u),s.focus()}createSellMaterialPopup(mat){const sellPopupId="cmpy-mgmt-material-sell-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Enter the maximum amount of "+mat.name+" you would like to sell per second, as well as the price at which you would like to sell at.

If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded

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

When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.

When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."}),br=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("br");let confirmBtn;const inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_11__.KEY.ENTER&&confirmBtn.click()}});let inputButtonInitValue=mat.sCost?mat.sCost:null;mat.marketTa2?inputButtonInitValue+=" (Market-TA.II)":mat.marketTa1&&(inputButtonInitValue+=" (Market-TA.I)");const inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"text",marginTop:"4px",value:inputButtonInitValue,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Confirm",clickListener:()=>{let cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");let temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){let qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");let tempQty=qty.replace(/MAX/g,1);tempQty=tempQty.replace(/PROD/g,1);try{tempQty=eval(tempQty)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==tempQty||isNaN(tempQty))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;mat.sllman[0]=!0,mat.sllman[1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric or 'MAX'"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=qty)}return Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(sellPopupId),this.rerender(),!1}});const cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(sellPopupId,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(sellPopupId,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}createSellProductPopup(product,city){const popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Enter the maximum amount of "+product.name+" you would like to sell per second, as well as the price at which you would like to sell it at.

If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.

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

When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.

When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."});let confirmBtn;const inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px 0px 5px 0px",placeholder:"Sell amount",type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&confirmBtn.click()}});let inputButtonInitValue=product.sCost?product.sCost:null;product.marketTa2?inputButtonInitValue+=" (Market-TA.II)":product.marketTa1&&(inputButtonInitValue+=" (Market-TA.I)");const inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px 0px 5px 0px",placeholder:"Sell price",type:"text",value:inputButtonInitValue,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&confirmBtn.click()}}),checkboxDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{border:"1px solid white",display:"inline-block"}),checkboxLabel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{for:popupId+"-checkbox",innerText:"Use same 'Sell Amount' for all cities"}),checkbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:!0,id:popupId+"-checkbox",margin:"2px",type:"checkbox"});checkboxDiv.appendChild(checkboxLabel),checkboxDiv.appendChild(checkbox),confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Confirm",clickListener:()=>{if(inputPx.value.includes("MP")){var price=inputPx.value.replace(/\s+/g,"");price=price.replace(/[^-()\d/*+.MP]/g,"");var temp=price.replace(/MP/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell quantity field."),!1;product.sCost=price}else{var cost=parseFloat(inputPx.value);if(isNaN(cost))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}const cities=Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__.Cities);if(inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(checkbox.checked)for(let e=0;e
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.

The current price of your company's stock is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(r.value);if(isNaN(e)||e<=0)a.innerText="ERROR: Invalid value entered for number of shares to sell";else if(e>this.corp.numShares)a.innerText="You don't have this many shares to sell!";else{const t=this.corp.calculateShareSale(e)[0];a.innerText="Sell "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"a-link-button",innerText:"Sell shares",display:"inline-block",clickListener:()=>{var t=Math.round(r.value);if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.corp.numShares)){const a=this.corp.calculateShareSale(t),r=a[0],i=a[1],o=a[2];if(this.corp.numShares-=t,isNaN(this.corp.issuedShares)){console.error(`Corporation issuedShares is NaN: ${this.corp.issuedShares}`);var n=parseInt(this.corp.issuedShares);isNaN(n)?this.corp.issuedShares=0:this.corp.issuedShares=n}return this.corp.issuedShares+=t,this.corp.sharePrice=i,this.corp.shareSalesUntilPriceUpdate=o,this.corp.shareSaleCooldown=_Corporation__WEBPACK_IMPORTED_MODULE_1__.k,_Player__WEBPACK_IMPORTED_MODULE_5__.Player.gainMoney(r),_Player__WEBPACK_IMPORTED_MODULE_5__.Player.recordMoneySource(r,"corporation"),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t,"0.000a")} shares for `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(r,"$0.000a")}. `+`The corporation's stock price fell to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(this.corp.sharePrice)} `+"as a result of dilution."),this.rerender(),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[n,a,r,i,o]),r.focus()}createThrowOfficePartyPopup(e){const t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_13__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"});let r;const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(i.value)||i.value<0)a.innerText="Invalid value entered!";else{const t=i.value*e.employees.length;a.innerText="Throwing this party will cost a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}},onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&r.click()}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Throw Party",clickListener:()=>{if(isNaN(i.value)||i.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value entered");else{var n=i.value*e.employees.length;if(this.corp.funds.lt(n))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to throw this.corp party!");else{var a;this.corp.funds=this.corp.funds.minus(n);for(let t=0;t=o);){let e=Math.pow(1.09,n+s);if(r+e>o)break;r+=e,++s}const l=_Corporation__WEBPACK_IMPORTED_MODULE_1__.g*r,c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Upgrade size: "}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:this.corp.funds.lt(a)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"$0.000a"),clickListener:()=>(this.corp.funds.lt(a)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=_Corporation__WEBPACK_IMPORTED_MODULE_1__.h,this.corp.funds=this.corp.funds.minus(a),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(t),!1)}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:this.corp.funds.lt(i)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(i,"$0.000a"),clickListener:()=>(this.corp.funds.lt(i)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=5*_Corporation__WEBPACK_IMPORTED_MODULE_1__.h,this.corp.funds=this.corp.funds.minus(i),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(t),!1)}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:this.corp.funds.lt(l)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+s*_Corporation__WEBPACK_IMPORTED_MODULE_1__.h+")",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(l,"$0.000a"),clickListener:()=>(this.corp.funds.lt(l)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=_Corporation__WEBPACK_IMPORTED_MODULE_1__.h*s,this.corp.funds=this.corp.funds.minus(l),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(t),!1)}),h=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(t,{innerText:"Cancel"});h.style.margin="4px",Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(t,[c,u,m,p,d,h])}purchaseWarehouse(e,t){const n=this.corp;n.funds.lt(_Corporation__WEBPACK_IMPORTED_MODULE_1__.m)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[t]=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.l({corp:n,industry:e,loc:t,size:_Corporation__WEBPACK_IMPORTED_MODULE_1__.n}),n.funds=n.funds.minus(_Corporation__WEBPACK_IMPORTED_MODULE_1__.m),this.rerender())}rerender(){this.corp.rerender()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendLineBreaks=void 0;const a=n(13);t.appendLineBreaks=function(e,t){for(let n=0;n=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),n<1&&console.warn(`Linear factor is ${n}. This is not an intended value for it`),Math.pow(e,t)+e/n}Object.defineProperty(t,"__esModule",{value:!0}),t.EffectWithFactors=t.calculateEffectWithFactors=void 0,t.calculateEffectWithFactors=a;t.EffectWithFactors=class{constructor(e,t){this.expFac=e,this.linearFac=t}calculate(e){return a(e,this.expFac,this.linearFac)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationsRoot=void 0;const o=i(n(0)),s=n(1325),l=n(1039),c=n(1038),u=n(1),m=n(63),p=n(157);t.AugmentationsRoot=class extends o.Component{constructor(e){super(e),this.state={rerender:!1},this.export=this.export.bind(this)}export(){this.props.exportGameFn(),this.setState({rerender:!this.state.rerender})}render(){return o.createElement("div",{id:"augmentations-content"},o.createElement("h1",null,"Purchased Augmentations"),o.createElement("p",null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),o.createElement("p",null,"WARNING: Installing your Augmentations resets most of your progress, including:"),o.createElement("br",null),o.createElement("p",null,"- Stats/Skill levels and Experience"),o.createElement("p",null,"- Money"),o.createElement("p",null,"- Scripts on every computer but your home computer"),o.createElement("p",null,"- Purchased servers"),o.createElement("p",null,"- Hacknet Nodes"),o.createElement("p",null,"- Faction/Company reputation"),o.createElement("p",null,"- Stocks"),o.createElement("br",null),o.createElement("p",null,"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)"),o.createElement(m.StdButton,{onClick:this.props.installAugmentationsFn,text:"Install Augmentations",tooltip:"'I never asked for this'"}),o.createElement(m.StdButton,{addClasses:"flashing-button",onClick:this.export,text:`Backup Save ${p.canGetBonus()?"(+1 favor to all factions)":""}`,tooltip:"It's always a good idea to backup/export your save!"}),o.createElement(c.PurchasedAugmentations,null),o.createElement("h1",null,"Installed Augmentations"),o.createElement("p",null,`List of all Augmentations ${u.Player.sourceFiles.length>0?"and Source Files ":""} `+"that have been installed. You have gained the effects of these."),o.createElement(s.InstalledAugmentationsAndSourceFiles,null),o.createElement("br",null)," ",o.createElement("br",null),o.createElement(l.PlayerMultipliers,null))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),r=n(175);!function(){function e(e){if(!(e.target&&e.target instanceof Element))return;"none"===window.getComputedStyle(e.target).display&&e.isTrusted&&a.Player.giveExploit(r.Exploit.Unclickable)}document.addEventListener("DOMContentLoaded",function t(){const n=document.getElementById("unclickable");null!=n?(n.addEventListener("click",e),document.removeEventListener("DOMContentLoaded",t)):console.error("Could not find the unclickable elem for the related exploit.")})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),r=n(175);setInterval(function(){"5.5e+1"!==55..toExponential()&&a.Player.giveExploit(r.Exploit.PrototypeTampering)},9e5)},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordionContentPaginated=t.ServerAccordionContent=void 0;const o=i(n(0)),s=n(565),l=n(564),c=20;function u(e){const[t,n]=o.useState(0),a=[],r=Math.ceil(e.workerScripts.length/c),i=Math.min((t+1)*c,e.workerScripts.length);for(let n=t*c;n(t+=e,u(t=Math.round(t))))}return m!==t&&n(m),o.default.createElement(o.default.Fragment,null,o.default.createElement("ul",null,a),o.default.createElement(l.AccordionButton,{onClick:()=>p(-1e99),text:"<<"}),o.default.createElement(l.AccordionButton,{onClick:()=>p(-1),text:"<"}),o.default.createElement("span",{className:"text"},t+1," / ",r),o.default.createElement(l.AccordionButton,{onClick:()=>p(1),text:">"}),o.default.createElement(l.AccordionButton,{onClick:()=>p(1e99),text:">>"}))}t.ServerAccordionContent=function(e){if(e.workerScripts.length>c)return o.default.createElement(u,{workerScripts:e.workerScripts});const t=e.workerScripts.map(e=>o.default.createElement(s.WorkerScriptAccordion,{key:`${e.name}_${e.args}`,workerScript:e}));return o.default.createElement("ul",null,t)},t.ServerAccordionContentPaginated=u},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordion=void 0;const o=i(n(0)),s=n(565),l=n(167),c=n(942),u=n(171);t.ServerAccordion=function(e){const t=e.server,n=`${t.hostname}${" ".repeat(18)}`.slice(0,Math.max(t.hostname.length,18)),a={progress:t.ramUsed/t.maxRam,totalTicks:30},r=`${n} ${u.createProgressBarText(a)}`;return e.workerScripts.map(e=>o.createElement(s.WorkerScriptAccordion,{key:`${e.name}_${e.args}`,workerScript:e})),o.createElement(l.Accordion,{headerContent:o.createElement("pre",null,r),panelContent:o.createElement(c.ServerAccordionContent,{workerScripts:e.workerScripts})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordions=void 0;const o=i(n(0)),s=n(943),l=n(154),c=n(24),u="ActiveScriptsUI";t.ServerAccordions=class extends o.Component{constructor(e){super(e),this.serverToScriptMap={},this.state={rerenderFlag:!1},this.updateServerToScriptsMap(),this.rerender=this.rerender.bind(this)}componentDidMount(){l.WorkerScriptStartStopEventEmitter.addSubscriber({cb:this.rerender,id:u})}componentWillUnmount(){l.WorkerScriptStartStopEventEmitter.removeSubscriber(u)}updateServerToScriptsMap(){const e={};for(const t of this.props.workerScripts.values()){const n=c.getServer(t.serverIp);null!=n?(null==e[n.hostname]&&(e[n.hostname]={server:n,workerScripts:[]}),e[n.hostname].workerScripts.push(t)):console.warn(`WorkerScript has invalid IP address: ${t.serverIp}`)}this.serverToScriptMap=e}rerender(){this.updateServerToScriptsMap(),this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=Object.keys(this.serverToScriptMap).map(e=>{const t=this.serverToScriptMap[e];return o.createElement(s.ServerAccordion,{key:e,server:t.server,workerScripts:t.workerScripts})});return o.createElement("ul",{className:"active-scripts-list",id:"active-scripts-list"},e)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptProduction=void 0;const o=i(n(0)),s=n(31);t.ScriptProduction=function(e){const t=e.p.scriptProdSinceLastAug/(e.p.playtimeSinceLastAug/1e3);let n=0;for(const t of e.workerScripts.values())n+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return o.createElement("p",{id:"active-scripts-total-prod"},"Total online production of Active scripts: ",o.createElement("span",{className:"money-gold"},o.createElement("span",{id:"active-scripts-total-production-active"},s.Money(n))," / sec"),o.createElement("br",null),"Total online production since last Aug installation: ",o.createElement("span",{id:"active-scripts-total-prod-aug-total",className:"money-gold"},s.Money(e.p.scriptProdSinceLastAug))," (",o.createElement("span",{className:"money-gold"},o.createElement("span",{id:"active-scripts-total-prod-aug-avg",className:"money-gold"},s.Money(t))," / sec"),")")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resleeve=void 0;const a=n(708),r=n(14),i=n(27);class o extends a.Person{constructor(){super()}getCost(){const e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp;let t=0;for(let e=0;e=0;--e)t.augmentations[e].name!==o.AugmentationNames.NeuroFluxGovernor?t.augmentations.splice(e,1):r.Augmentations[o.AugmentationNames.NeuroFluxGovernor].owned=!0;for(let n=0;n=0;--e){const n=t.queuedAugmentations[e].name;t.augmentations.filter(e=>e.name!==o.AugmentationNames.NeuroFluxGovernor&&e.name===n).length>=1&&t.queuedAugmentations.splice(e,1)}return t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles(),!0},t.generateResleeves=function(){const e=[];for(let t=0;t<40;++t){const n=new a.Resleeve,i=5*t+1;n.hacking_exp=i*s.getRandomInt(1e3,5e3),n.strength_exp=i*s.getRandomInt(1e3,5e3),n.defense_exp=i*s.getRandomInt(1e3,5e3),n.dexterity_exp=i*s.getRandomInt(1e3,5e3),n.agility_exp=i*s.getRandomInt(1e3,5e3),n.charisma_exp=i*s.getRandomInt(1e3,5e3);const l=Math.max(2,Math.ceil((t+3)/2)),c=s.getRandomInt(l,l+2),u=Object.keys(r.Augmentations);for(let e=0;eo.createElement("tr",{key:t},e.map((e,t)=>{let n={};return 0!==t&&(n={textAlign:"right"}),o.createElement("td",{style:n,key:t},e)}))))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveFaq=void 0;const o=i(n(0));t.SleeveFaq=o.createElement(o.Fragment,null,o.createElement("strong",null,o.createElement("u",null,"How do Duplicate Sleeves work?")),o.createElement("br",null),"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation.",o.createElement("br",null),o.createElement("br",null),"Sleeves are their own individuals, which means they each have their own experience and stats.",o.createElement("br",null),o.createElement("br",null),"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Synchronization (Sync)?")),o.createElement("br",null),"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task.",o.createElement("br",null),o.createElement("br",null),"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.",o.createElement("br",null),o.createElement("br",null),"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Shock?")),o.createElement("br",null),"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve.",o.createElement("br",null),o.createElement("br",null),"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why can't I work for this company or faction?")),o.createElement("br",null),"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why did my Sleeve stop working?")),o.createElement("br",null),"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"How do I buy Augmentations for my Sleeves?")),o.createElement("br",null),"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why can't I buy the X Augmentation for my sleeve?")),o.createElement("br",null),"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Do sleeves get reset when installing Augmentations or switching BitNodes?")),o.createElement("br",null),"Sleeves are reset when switching BitNodes, but not when installing Augmentations.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Memory?")),o.createElement("br",null),"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.",o.createElement("br",null),o.createElement("br",null),"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSleevePurchaseAugsPopup=void 0;const a=n(546),r=n(14),i=n(31),o=n(12),s=n(13),l=n(57),c=n(69),u=n(49),m=n(415);t.createSleevePurchaseAugsPopup=function e(t,n){const p=t.augmentations.map(e=>e.name),d=a.findSleevePurchasableAugs(t,n),h="purchase-sleeve-augs-popup",_=[c.createPopupCloseButton(h,{innerText:"Cancel"}),s.createElement("p",{display:"block",innerHTML:"Owned Augmentations:"})],g=s.createElement("div",{width:"70%"});for(const e of p){const t=r.Augmentations[e];if(null==t){console.warn(`Invalid Augmentation: ${e}`);continue}let n=t.info;"string"!=typeof n&&(n=m.renderToStaticMarkup(n)),n+="

",n+=m.renderToStaticMarkup(t.stats),g.appendChild(s.createElement("div",{class:"gang-owned-upgrade",innerText:e,tooltip:n}))}_.push(g);const f=s.createElement("p",{innerHTML:["You can purchase Augmentations for your Duplicate Sleeves. These Augmentations","have the same effect as they would for you. You can only purchase Augmentations","that you have unlocked through Factions.

","When purchasing an Augmentation for a Duplicate Sleeve, they are immediately","installed. This means that the Duplicate Sleeve will immediately lose all of","its stat experience."].join(" ")});_.push(f);for(const a of d){const r=s.createElement("div",{class:"cmpy-mgmt-upgrade-div"});let l=a.info;"string"!=typeof l&&(l=m.renderToStaticMarkup(l)),l+="

",l+=m.renderToStaticMarkup(a.stats),r.appendChild(s.createElement("p",{fontSize:"12px",innerHTML:[`

${a.name}


`,`Cost: ${m.renderToStaticMarkup(i.Money(a.startingCost))}

`,`${l}`].join(" "),padding:"2px",clickListener:()=>{t.tryBuyAugmentation(n,a)?(o.dialogBoxCreate(`Installed ${a.name} on Duplicate Sleeve!`,!1),u.removeElementById(h),e(t,n)):o.dialogBoxCreate(`You cannot afford ${a.name}`,!1)}})),_.push(r)}l.createPopup(h,_)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Milestones=void 0;const a=n(16),r=n(24);function i(e,t){const n=t.augmentations.slice().filter(e=>"NeuroFlux Governor"!==e);for(const t of n)if(!e.augmentations.some(e=>e.name==t))return!1;return!0}t.Milestones=[{title:"Gain root access on CSEC",fulfilled:()=>{const e=r.GetServerByHostname("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=r.GetServerByHostname("CSEC");return!(!e||!e.hasOwnProperty("backdoorInstalled"))&&e.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:e=>e.factions.includes("CyberSec")},{title:"Install all the Augmentations from CyberSec",fulfilled:e=>i(e,a.Factions.CyberSec)},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:e=>e.factions.includes("NiteSec")},{title:"Install all the Augmentations from NiteSec",fulfilled:e=>i(e,a.Factions.NiteSec)},{title:"Join the faction hinted at in j3.msg",fulfilled:e=>e.factions.includes("The Black Hand")},{title:"Install all the Augmentations from The Black Hand",fulfilled:e=>i(e,a.Factions["The Black Hand"])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:e=>e.factions.includes("BitRunners")},{title:"Install all the Augmentations from BitRunners",fulfilled:e=>i(e,a.Factions.BitRunners)},{title:"Complete fl1ght.exe",fulfilled:e=>e.factions.includes("Daedalus")},{title:"Install the special Augmentation from Daedalus",fulfilled:e=>e.augmentations.some(e=>"The Red Pill"==e.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=n(954),s=i(n(0));t.Root=function(e){const t=function(e,t){let n=-1;for(let a=0;a{if(a<=t+1)return s.createElement("ul",{key:a},s.createElement("p",null,"[",n.fulfilled(e.player)?"x":" ","] ",n.title))});return s.createElement(s.Fragment,null,s.createElement("h1",null,"Milestones"),s.createElement("p",null,"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations."),s.createElement("br",null),s.createElement("h2",null,"Completing fl1ght.exe"),s.createElement("li",null,n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.libSource=void 0,t.libSource="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationPrereq(name: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsPopup=void 0;const o=i(n(0)),s=n(63),l=n(79);t.OptionsPopup=function(e){const[t,n]=o.useState(e.options.theme),[a,r]=o.useState(e.options.insertSpaces);return o.default.createElement("div",{className:"editor-options-container noselect"},o.default.createElement("div",{className:"editor-options-line"},o.default.createElement("p",null,"Theme: "),o.default.createElement("select",{className:"dropdown",onChange:e=>n(e.target.value),defaultValue:t},o.default.createElement("option",{value:"vs-dark"},"vs-dark"),o.default.createElement("option",{value:"light"},"light"))),o.default.createElement("div",{className:"editor-options-line"},o.default.createElement("p",null,"Use whitespace over tabs: "),o.default.createElement("input",{type:"checkbox",onChange:e=>r(e.target.checked),checked:a})),o.default.createElement("br",null),o.default.createElement(s.StdButton,{style:{width:"50px"},text:"Save",onClick:function(){e.save({theme:t,insertSpaces:a}),l.removePopup(e.id)}}))}},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CorruptableText=void 0;const o=i(n(0));t.CorruptableText=function(e){const[t,n]=o.useState(e.content);return o.useEffect(()=>{let e=5;const a=setInterval(()=>{if(--e>0)return;e=5*Math.random();const a=Math.random()*t.length,r=t.charAt(a);n(function(e,t,n){return e.substring(0,t)+n+e.substring(t+1)}(t,a,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],n=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const a of n)if(a.includes(e))return t(a);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{n(t)},50)},100);return()=>{clearInterval(a)}},[]),o.default.createElement("span",null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SlotMachine=void 0;const o=i(n(0)),s=n(63),l=n(31),c=n(298),u=n(405),m=n(485),p=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function d(e,t){switch(e){case"$":return[20,200,1e3][t];case"@":return[8,80,400][t];case"♥":case"?":return[6,20,150][t];case"D":case"E":return[1,8,30][t];default:return[1,5,20][t]}}const h=[[[0,0],[0,1],[0,2],[0,3],[0,4]],[[1,0],[1,1],[1,2],[1,3],[1,4]],[[2,0],[2,1],[2,2],[2,3],[2,4]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[0,0],[1,1],[1,2],[1,3],[0,4]],[[2,0],[1,1],[1,2],[1,3],[2,4]],[[1,0],[0,1],[0,2],[0,3],[1,4]],[[1,0],[2,1],[2,2],[2,3],[1,4]]],_=0,g=1e6;t.SlotMachine=class extends u.Game{constructor(e){super(e),this.interval=-1,this.rng=new c.WHRNG(this.props.p.totalPlaytime),this.state={index:[0,0,0,0,0],investment:1e3,locks:[0,0,0,0,0],canPlay:!0,status:"waiting"},this.play=this.play.bind(this),this.lock=this.lock.bind(this),this.unlock=this.unlock.bind(this),this.step=this.step.bind(this),this.checkWinnings=this.checkWinnings.bind(this),this.getTable=this.getTable.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){let e=!1;const t=this.state.index.slice();for(const n in t)(t[n]!==this.state.locks[n]||e)&&(t[n]=(t[n]+1)%p.length,e=!0);this.setState({index:t}),e&&t.every((e,t)=>e===this.state.locks[t])&&this.checkWinnings()}componentWillUnmount(){clearInterval(this.interval)}getTable(){return[[p[(this.state.index[0]+p.length-1)%p.length],p[(this.state.index[1]+p.length-1)%p.length],p[(this.state.index[2]+p.length-1)%p.length],p[(this.state.index[3]+p.length-1)%p.length],p[(this.state.index[4]+p.length-1)%p.length]],[p[this.state.index[0]],p[this.state.index[1]],p[this.state.index[2]],p[this.state.index[3]],p[this.state.index[4]]],[p[(this.state.index[0]+1)%p.length],p[(this.state.index[1]+1)%p.length],p[(this.state.index[2]+1)%p.length],p[(this.state.index[3]+1)%p.length],p[(this.state.index[4]+1)%p.length]]]}play(){this.reachedLimit(this.props.p)||(this.setState({status:"playing"}),this.win(this.props.p,-this.state.investment),this.state.canPlay&&(this.unlock(),setTimeout(this.lock,2e3*this.rng.random()+1e3)))}lock(){this.setState({locks:[Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length)]})}checkWinnings(){const e=this.getTable(),t=function(t){const n=[];for(const a of t)n.push(e[a[0]][a[1]]);return n},n=function(e){let t=1;for(let n=1;n0?"gained":"lost"," ",l.Money(Math.abs(a))),canPlay:!0}),this.reachedLimit(this.props.p)}unlock(){this.setState({locks:[-1,-1,-1,-1,-1],canPlay:!1})}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=_),t>g&&(t=g),t<_&&(t=_),this.setState({investment:t})}render(){const e=this.getTable();return o.createElement(o.Fragment,null,o.createElement("pre",null,"+———————————————————————+",o.createElement("br",null),"| | ",e[0][0]," | ",e[0][1]," | ",e[0][2]," | ",e[0][3]," | ",e[0][4]," | |",o.createElement("br",null),"| | | | | | | |",o.createElement("br",null),"| | ",p[this.state.index[0]]," | ",p[this.state.index[1]]," | ",p[this.state.index[2]]," | ",p[this.state.index[3]]," | ",p[this.state.index[4]]," | |",o.createElement("br",null),"| | | | | | | |",o.createElement("br",null),"| | ",p[(this.state.index[0]+1)%p.length]," | ",p[(this.state.index[1]+1)%p.length]," | ",p[(this.state.index[2]+1)%p.length]," | ",p[(this.state.index[3]+1)%p.length]," | ",p[(this.state.index[4]+1)%p.length]," | |",o.createElement("br",null),"+———————————————————————+",o.createElement("br",null)),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),o.createElement(s.StdButton,{onClick:m.trusted(this.play),text:"Spin!",disabled:!this.state.canPlay}),o.createElement("h1",null,this.state.status),o.createElement("h2",null,"Pay lines"),o.createElement("pre",null,"----- ····· ····· ",o.createElement("br",null),"····· ----- ····· ",o.createElement("br",null),"····· ····· ----- ",o.createElement("br",null)),o.createElement("br",null),o.createElement("pre",null,"··^·· \\···/ \\···/",o.createElement("br",null),"·/·\\· ·\\·/· ·---·",o.createElement("br",null),"/···\\ ··v·· ·····",o.createElement("br",null)),o.createElement("br",null),o.createElement("pre",null,"····· ·---· ·····",o.createElement("br",null),"·---· /···\\ \\···/",o.createElement("br",null),"/···\\ ····· ·---·",o.createElement("br",null)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Roulette=void 0;const o=i(n(0)),s=n(63),l=n(31),c=n(405),u=n(298),m=n(485),p=0,d=1e7;const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],_={Red:{match:e=>0!==e&&h.includes(e),payout:1},Black:{match:e=>!h.includes(e),payout:1},Odd:{match:e=>0!==e&&e%2==1,payout:1},Even:{match:e=>0!==e&&e%2==0,payout:1},High:{match:e=>0!==e&&e>18,payout:1},Low:{match:e=>0!==e&&e<19,payout:1},Third1:{match:e=>0!==e&&e<=12,payout:2},Third2:{match:e=>0!==e&&(e>=13&&e<=24),payout:2},Third3:{match:e=>0!==e&&e>=25,payout:2}};function g(e){return{match:t=>e===t,payout:36}}t.Roulette=class extends c.Game{constructor(e){super(e),this.interval=-1,this.rng=new u.WHRNG((new Date).getTime()),this.state={investment:1e3,canPlay:!0,status:"waiting",n:0,lock:!0,strategy:{payout:0,match:()=>!1}},this.step=this.step.bind(this),this.currentNumber=this.currentNumber.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){this.state.lock||this.setState({n:Math.floor(37*Math.random())})}componentWillUnmount(){clearInterval(this.interval)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=p),t>d&&(t=d),t{let e=Math.floor(37*this.rng.random()),t=o.createElement(o.Fragment,null),n=0,a=this.state.strategy.match(e);if(a&&Math.random()>.9)for(a=!1;this.state.strategy.match(e);)e++;a?(n=this.state.investment*this.state.strategy.payout,t=o.createElement(o.Fragment,null,"won ",l.Money(n))):(n=-this.state.investment,t=o.createElement(o.Fragment,null,"lost ",l.Money(-n))),this.win(this.props.p,n),this.setState({canPlay:!0,lock:!0,status:t,n:e}),this.reachedLimit(this.props.p)},1600))}render(){return o.createElement(o.Fragment,null,o.createElement("h1",null,this.currentNumber()),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),o.createElement("h1",null,this.state.status),o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"3",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(3)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"6",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(6)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"9",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(9)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"12",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(12)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"15",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(15)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"18",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(18)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"21",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(21)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"24",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(24)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"27",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(27)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"30",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(30)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"33",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(33)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"36",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(36)))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"2",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(2)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"5",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(5)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"8",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(8)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"11",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(11)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"14",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(14)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"17",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(17)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"20",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(20)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"23",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(23)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"26",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(26)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"29",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(29)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"32",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(32)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"35",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(35)))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"1",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(1)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"4",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(4)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"7",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(7)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"10",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(10)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"13",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(13)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"16",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(16)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"19",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(19)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"22",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(22)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"25",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(25)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"28",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(28)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"31",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(31)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"34",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(34)))}))),o.createElement("tr",null,o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"1 to 12",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Third1))})),o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"13 to 24",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Third2))})),o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"25 to 36",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Third3))}))),o.createElement("tr",null,o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Red",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Red))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Black",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Black))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Odd",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Odd))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Even",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Even))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"High",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.High))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Low",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Low))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"0",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(0)))}))))))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinFlip=void 0;const o=i(n(0)),s=n(63),l=n(298),c=n(405),u=n(485),m=0,p=1e4;t.CoinFlip=class extends c.Game{constructor(e){super(e),this.state={investment:1e3,result:o.createElement("span",null," "),status:"",playLock:!1},this.play=this.play.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=m),t>p&&(t=p),tthis.setState({playLock:!1}),250),n?this.win(this.props.p,this.state.investment):this.win(this.props.p,-this.state.investment),this.reachedLimit(this.props.p)}render(){return o.createElement(o.Fragment,null,o.createElement("pre",null,"+———————+",o.createElement("br",null),"| | | |",o.createElement("br",null),"| | ",this.state.result," | |",o.createElement("br",null),"| | | |",o.createElement("br",null),"+———————+",o.createElement("br",null)),o.createElement("span",{className:"text"},"Play for: "),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,value:this.state.investment}),o.createElement("br",null),o.createElement(s.StdButton,{onClick:u.trusted(()=>this.play("H")),text:"Head!",disabled:this.state.playLock}),o.createElement(s.StdButton,{onClick:u.trusted(()=>this.play("T")),text:"Tail!",disabled:this.state.playLock}),o.createElement("h1",null,this.state.status))}}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiPaper=void 0;const r=a(n(0)),i=n(404),o=i.makeStyles({root:{backgroundColor:"rgb(30, 30, 30)",border:"2px solid #000",borderRadius:"10px",display:"inline-block",flexWrap:"wrap",padding:"10px"}});t.MuiPaper=(e=>r.default.createElement(i.Paper,Object.assign({},e,{classes:Object.assign(Object.assign({},o()),e.classes)})))},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiButton=void 0;const r=a(n(0)),i=n(404),o=i.makeStyles({root:{backgroundColor:"#555",border:"1px solid #333",color:"white",margin:"5px",padding:"3px 5px","&:hover":{backgroundColor:"#666"}},textPrimary:{color:"rgb( 144, 202, 249)"},textSecondary:{color:"rgb(244, 143, 177)"},disabled:{backgroundColor:"#333",color:"#fff",cursor:"default"}});t.MuiButton=(e=>r.default.createElement(i.Button,Object.assign({},e,{classes:Object.assign(Object.assign({},o()),e.classes)})))},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiTextField=void 0;const r=a(n(0)),i=n(404),o={backgroundColor:"rgba(57, 54, 54, 0.9)","&:hover":{backgroundColor:"rgba(70, 70, 70, 0.9)"}},s=Object.assign({border:"1px solid #e2e2e1",overflow:"hidden",borderRadius:4,color:"white"},o),l=i.makeStyles({root:Object.assign({},s)}),c=i.makeStyles({root:Object.assign(Object.assign({},o),{color:"white"}),focused:{backgroundColor:"rgba(70, 70, 70, 0.9)"},disabled:{color:"white"}}),u=i.makeStyles({root:{color:"white"},focused:{color:"white !important"},disabled:{color:"white !important"}});t.MuiTextField=(e=>{var t,n;return r.default.createElement(i.TextField,Object.assign({},e,{classes:Object.assign(Object.assign({},l()),e.classes),InputProps:Object.assign({classes:Object.assign(Object.assign({},c()),null===(t=e.InputProps)||void 0===t?void 0:t.classes)},e.InputProps),InputLabelProps:Object.assign({classes:Object.assign(Object.assign({},u()),null===(n=e.InputLabelProps)||void 0===n?void 0:n.classes)},e.InputLabelProps)}))})},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCard=void 0;const r=a(n(0)),i=n(656);t.ReactCard=(({card:e,hidden:t})=>{let n;switch(e.suit){case i.Suit.Clubs:n=r.default.createElement("span",null,"♣");break;case i.Suit.Diamonds:n=r.default.createElement("span",null,"♦");break;case i.Suit.Hearts:n=r.default.createElement("span",null,"♥");break;case i.Suit.Spades:n=r.default.createElement("span",null,"♠");break;default:throw new Error(`MissingCaseException: ${e.suit}`)}return r.default.createElement("div",{className:`casino-card ${e.isRedSuit()?"red":"black"}`},r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:"value"},t?" - ":e.formatValue()),r.default.createElement("div",{className:"suit"},t?" - ":n)))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hand=void 0;class a{constructor(e){this.cards=e}addCards(...e){return new a([...this.cards,...e])}removeByIndex(e){if(e>=this.cards.length)throw new Error(`Tried to remove invalid card from Hand by index: ${e}`);return new a([...this.cards.slice().splice(e,1)])}}t.Hand=a},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deck=void 0;const a=n(656),r=n(971);t.Deck=class{constructor(e=1){this.numDecks=e,this.cards=[],this.reset()}shuffle(){this.cards=r.shuffle(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let e=1;e<=13;++e)for(let t=0;t{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),this.startGame=(()=>{if(!this.canStartGame())return;this.props.p.loseMoney(this.state.bet);const e=new u.Hand([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new u.Hand([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result:f.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(f.Tie):this.finishGame(f.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(f.DealerWon)}),this.getHandValue=(e=>{let t=[0];for(let n=0;n=10?t.map(e=>e+10):1===a?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+a)}return t}),this.getTrueHandValue=(e=>{const t=this.getHandValue(e),n=t.filter(e=>e<=21);return n.length>0?(n.sort((e,t)=>e-t),n[n.length-1]):t[0]}),this.getHandDisplayValues=(e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),this.isHandBusted=(e=>this.getTrueHandValue(e)>21),this.playerHit=(e=>{if(!e.isTrusted)return;const t=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:t}),this.isHandBusted(t)&&this.finishGame(f.DealerWon)}),this.playerStay=(e=>{if(!e.isTrusted)return;let t=this.state.dealerHand;for(;this.getTrueHandValue(t)<=16;)t=t.addCards(this.deck.safeDrawCard());if(this.setState({dealerHand:t}),this.isHandBusted(t))this.finishGame(f.PlayerWon);else{const e=this.getTrueHandValue(t),n=this.getTrueHandValue(this.state.playerHand);if(e>21||n>21)throw new Error("Someone busted when not expected to");n>e?this.finishGame(f.PlayerWon):n{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===f.DealerWon?t=-1*this.state.bet:e===f.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),this.isPlayerWinResult=(e=>e===f.PlayerWon||e===f.PlayerWonByBlackjack),this.wagerOnChange=(e=>{const{p:t}=this.props,n=e.target.value,a=Math.round(parseFloat(n));isNaN(a)?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):a<=0?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):a>g?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):t.canAfford(a)?this.setState({bet:a,betInput:n,wagerInvalid:!1,wagerInvalidHelperText:"",result:f.Pending}):this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),this.startOnClick=(e=>{e.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new c.Deck(5),this.state={playerHand:new u.Hand([]),dealerHand:new u.Hand([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:f.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:n,gameInProgress:a,result:r,wagerInvalid:i,wagerInvalidHelperText:l,gains:c}=this.state,u=this.getHandDisplayValues(t),y=this.getHandDisplayValues(n);return o.createElement("div",null,o.createElement("div",null,o.createElement(d.MuiTextField,{value:e,label:o.createElement(o.Fragment,null,"Wager (Max: ",s.Money(g),")"),disabled:a,onChange:this.wagerOnChange,error:i,helperText:i?l:"",type:"number",variant:"filled",style:{width:"200px"},InputProps:{startAdornment:o.createElement(m.InputAdornment,{position:"start"},"$")}}),o.createElement("p",null,"Total earnings this session: ",s.Money(c))),a?o.createElement("div",null,o.createElement(h.MuiButton,{color:"primary",onClick:this.playerHit},"Hit"),o.createElement(h.MuiButton,{color:"secondary",onClick:this.playerStay},"Stay")):o.createElement("div",null,o.createElement(h.MuiButton,{color:"primary",onClick:this.startOnClick,disabled:i||!this.canStartGame()},"Start")),(a||r!==f.Pending)&&o.createElement("div",null,o.createElement(_.MuiPaper,{variant:"outlined",elevation:2},o.createElement("pre",null,"Player"),t.cards.map((e,t)=>o.createElement(p.ReactCard,{card:e,key:t})),o.createElement("pre",null,"Value(s): "),u.map((e,t)=>o.createElement("pre",{key:t},e))),o.createElement("br",null),o.createElement(_.MuiPaper,{variant:"outlined",elevation:2},o.createElement("pre",null,"Dealer"),n.cards.map((e,t)=>o.createElement(p.ReactCard,{card:e,hidden:a&&0!==t,key:t})),!a&&o.createElement(o.Fragment,null,o.createElement("pre",null,"Value(s): "),y.map((e,t)=>o.createElement("pre",{key:t},e))))),r!==f.Pending&&o.createElement("p",null,r,this.isPlayerWinResult(r)&&o.createElement(o.Fragment,null," You gained ",s.Money(this.state.bet)),r===f.DealerWon&&o.createElement(o.Fragment,null," You lost ",s.Money(this.state.bet))))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CasinoLocation=void 0;const o=i(n(0)),s=n(973),l=n(964),c=n(963),u=n(962),m=n(63);var p;!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(p||(p={}));t.CasinoLocation=class extends o.Component{constructor(e){super(e),this.state={game:p.None},this.updateGame=this.updateGame.bind(this)}updateGame(e){this.setState({game:e})}renderGames(){return o.createElement(o.Fragment,null,o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Coin),text:"Play coin flip"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Slots),text:"Play slots"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Roulette),text:"Play roulette"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Blackjack),text:"Play blackjack"}))}renderGame(){let e=null;switch(this.state.game){case p.Coin:e=o.createElement(l.CoinFlip,{p:this.props.p});break;case p.Slots:e=o.createElement(u.SlotMachine,{p:this.props.p});break;case p.Roulette:e=o.createElement(c.Roulette,{p:this.props.p});break;case p.Blackjack:e=o.createElement(s.Blackjack,{p:this.props.p});break;case p.None:break;default:throw new Error(`MissingCaseException: ${this.state.game}`)}return o.createElement(o.Fragment,null,o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.None),text:"Stop playing"}),e)}render(){return this.state.game===p.None?this.renderGames():this.renderGame()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UniversityLocation=void 0;const o=i(n(0)),s=n(11),l=n(24),c=n(45),u=n(63),m=n(31);t.UniversityLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.take=this.take.bind(this),this.study=this.study.bind(this),this.dataStructures=this.dataStructures.bind(this),this.networks=this.networks.bind(this),this.algorithms=this.algorithms.bind(this),this.management=this.management.bind(this),this.leadership=this.leadership.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=c.SpecialServerIps.getIp(this.props.loc.name),t=l.getServer(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const n=t.backdoorInstalled?.9:1;return this.props.loc.costMult*n}take(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}study(){this.take(s.CONSTANTS.ClassStudyComputerScience)}dataStructures(){this.take(s.CONSTANTS.ClassDataStructures)}networks(){this.take(s.CONSTANTS.ClassNetworks)}algorithms(){this.take(s.CONSTANTS.ClassAlgorithms)}management(){this.take(s.CONSTANTS.ClassManagement)}leadership(){this.take(s.CONSTANTS.ClassLeadership)}render(){const e=this.calculateCost(),t=s.CONSTANTS.ClassDataStructuresBaseCost*e,n=s.CONSTANTS.ClassNetworksBaseCost*e,a=s.CONSTANTS.ClassAlgorithmsBaseCost*e,r=s.CONSTANTS.ClassManagementBaseCost*e,i=s.CONSTANTS.ClassLeadershipBaseCost*e;return o.createElement("div",null,o.createElement(u.StdButton,{onClick:this.study,style:this.btnStyle,text:"Study Computer Science (free)",tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.dataStructures,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Data Structures course (",m.Money(t)," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.networks,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Networks course (",m.Money(n)," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.algorithms,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Algorithms course (",m.Money(a)," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.management,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Management course (",m.Money(r)," / sec)"),tooltip:"Gain charisma experience!"}),o.createElement(u.StdButton,{onClick:this.leadership,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Leadership course (",m.Money(i)," / sec)"),tooltip:"Gain charisma experience!"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TravelAgencyLocation=void 0;const o=i(n(0)),s=n(38),l=n(488),c=n(11),u=n(26),m=n(63),p=n(31);t.TravelAgencyLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"}}asciiWorldMap(){const e=e=>e.city!==this.props.p.city?o.createElement("span",{className:"tooltip",style:{color:"blue",whiteSpace:"nowrap",margin:"0px",padding:"0px"},onClick:l.createTravelPopup.bind(null,e.city,this.props.travel)},o.createElement("span",{className:"tooltiptext"},e.city),e.city[0]):o.createElement("span",null,e.city[0]);return o.createElement("div",{className:"noselect"},o.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",p.Money(c.CONSTANTS.TravelCost),"."),o.createElement("pre",null," ,_ . ._. _. ."),o.createElement("pre",null," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),o.createElement("pre",null," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),o.createElement("pre",null," / ,/'-/~ '\\ ,' _ , '",o.createElement(e,{city:"Volhaven"}),",'|~ ._/-, /~"),o.createElement("pre",null," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),o.createElement("pre",null,".-~ '| '',\\~|\\ _\\~ ,_ , ",o.createElement(e,{city:"Chongqing"})," /,"),o.createElement("pre",null," '\\ ",o.createElement(e,{city:"Sector-12"})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),o.createElement("pre",null," | / ._-~'\\_ _~| \\ ) ",o.createElement(e,{city:"New Tokyo"})),o.createElement("pre",null," \\ __-\\ '/ ~ |\\ \\_ / ~"),o.createElement("pre",null," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),o.createElement("pre",null," ~-_' _; '\\ '-, \\,' /\\/ |"),o.createElement("pre",null," '\\_,~'\\_ \\_ _, /' ' |, /|'"),o.createElement("pre",null," / \\_ ~ | / \\ ~'; -,_."),o.createElement("pre",null," | ~\\ | | , '-_, ,; ~ ~\\"),o.createElement("pre",null," \\, ",o.createElement(e,{city:"Aevum"})," / \\ / /| ,-, , -,"),o.createElement("pre",null," | ,/ | |' |/ ,- ~ \\ '."),o.createElement("pre",null," ,| ,/ \\ ,/ \\ ",o.createElement(e,{city:"Ishima"})," |"),o.createElement("pre",null," / | ~ -~~-, / _"),o.createElement("pre",null," | ,-' ~ /"),o.createElement("pre",null," / ,' ~"),o.createElement("pre",null," ',| ~"),o.createElement("pre",null," ~'"))}listWorldMap(){const e=[];for(const t in s.CityName){const n=s.CityName[t];n!==this.props.p.city&&e.push(o.createElement(m.StdButton,{key:n,onClick:l.createTravelPopup.bind(null,n,this.props.travel),style:this.btnStyle,text:`Travel to ${n}`}))}return o.createElement("div",null,o.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",p.Money(c.CONSTANTS.TravelCost),"."),e)}render(){return u.Settings.DisableASCIIArt?this.listWorldMap():this.asciiWorldMap()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TechVendorLocation=void 0;const o=i(n(0)),s=n(488),l=n(11),c=n(144),u=n(672),m=n(63),p=n(31);t.TechVendorLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.state={torPurchased:e.p.hasTorRouter()},this.createUpgradeHomeCoresPopup=this.createUpgradeHomeCoresPopup.bind(this),this.createUpgradeHomeRamPopup=this.createUpgradeHomeRamPopup.bind(this),this.purchaseTorRouter=this.purchaseTorRouter.bind(this)}createUpgradeHomeCoresPopup(){s.createUpgradeHomeCoresPopup(this.props.p)}createUpgradeHomeRamPopup(){s.createUpgradeHomeRamPopup(this.props.p)}purchaseTorRouter(){s.purchaseTorRouter(this.props.p),this.setState({torPurchased:this.props.p.hasTorRouter()})}render(){const e=this.props.loc,t=[];for(let n=e.techVendorMinRam;n<=e.techVendorMaxRam;n*=2){const e=c.getPurchaseServerCost(n);t.push(o.createElement(m.StdButton,{key:n,onClick:()=>s.createPurchaseServerPopup(n,this.props.p),style:this.btnStyle,text:o.createElement(o.Fragment,null,"Purchase ",n,"GB Server - ",p.Money(e))}))}return o.createElement("div",null,t,this.state.torPurchased?o.createElement(u.StdButtonPurchased,{style:this.btnStyle,text:"TOR Router - Purchased"}):o.createElement(m.StdButton,{onClick:this.purchaseTorRouter,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Purchase TOR Router - ",p.Money(l.CONSTANTS.TorRouterCost))}),o.createElement(m.StdButton,{onClick:this.createUpgradeHomeRamPopup,style:this.btnStyle,text:"Purchase additional RAM for Home computer"}),o.createElement(m.StdButton,{onClick:this.createUpgradeHomeCoresPopup,style:this.btnStyle,text:"Purchase additional Core for Home computer"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialLocation=void 0;const o=i(n(0)),s=n(488),l=n(47),c=n(489),u=n(63),m=n(12);t.SpecialLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.renderNoodleBar=this.renderNoodleBar.bind(this),this.createCorporationPopup=this.createCorporationPopup.bind(this),this.handleBladeburner=this.handleBladeburner.bind(this),this.handleResleeving=this.handleResleeving.bind(this),this.state={inBladeburner:this.props.p.inBladeburner()}}createCorporationPopup(){s.createStartCorporationPopup(this.props.p)}handleBladeburner(){const e=this.props.p;if(e.inBladeburner())this.props.engine.loadBladeburnerContent();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),m.dialogBoxCreate("You have been accepted into the Bladeburner division!"),this.setState({inBladeburner:!0});const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else m.dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}handleResleeving(){this.props.engine.loadResleevingContent()}renderBladeburner(){if(!this.props.p.canAccessBladeburner())return null;const e=this.state.inBladeburner?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return o.createElement(u.StdButton,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return o.createElement(u.StdButton,{onClick:function(){m.dialogBoxCreate(o.createElement(o.Fragment,null,"You ate some delicious noodles and feel refreshed."))},style:this.btnStyle,text:"Eat noodles"})}renderCreateCorporation(){return this.props.p.canAccessCorporation()?o.createElement(c.AutoupdatingStdButton,{disabled:!this.props.p.canAccessCorporation()||this.props.p.hasCorporation(),onClick:this.createCorporationPopup,style:this.btnStyle,text:"Create a Corporation"}):o.createElement(o.Fragment,null,o.createElement("p",null,o.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}renderResleeving(){return this.props.p.canAccessResleeving()?o.createElement(u.StdButton,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case l.LocationName.NewTokyoVitaLife:return this.renderResleeving();case l.LocationName.Sector12CityHall:return this.renderCreateCorporation();case l.LocationName.Sector12NSA:return this.renderBladeburner();case l.LocationName.NewTokyoNoodleBar:return this.renderNoodleBar();default:console.error(`Location ${this.props.loc.name} doesn't have any special properties`)}}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SlumsLocation=void 0;const o=i(n(0)),s=n(176),l=n(3),c=n(489);t.SlumsLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.shoplift=this.shoplift.bind(this),this.robStore=this.robStore.bind(this),this.mug=this.mug.bind(this),this.larceny=this.larceny.bind(this),this.dealDrugs=this.dealDrugs.bind(this),this.bondForgery=this.bondForgery.bind(this),this.traffickArms=this.traffickArms.bind(this),this.homicide=this.homicide.bind(this),this.grandTheftAuto=this.grandTheftAuto.bind(this),this.kidnap=this.kidnap.bind(this),this.assassinate=this.assassinate.bind(this),this.heist=this.heist.bind(this)}shoplift(e){e.isTrusted&&s.Crimes.Shoplift.commit(this.props.p)}robStore(e){e.isTrusted&&s.Crimes.RobStore.commit(this.props.p)}mug(e){e.isTrusted&&s.Crimes.Mug.commit(this.props.p)}larceny(e){e.isTrusted&&s.Crimes.Larceny.commit(this.props.p)}dealDrugs(e){e.isTrusted&&s.Crimes.DealDrugs.commit(this.props.p)}bondForgery(e){e.isTrusted&&s.Crimes.BondForgery.commit(this.props.p)}traffickArms(e){e.isTrusted&&s.Crimes.TraffickArms.commit(this.props.p)}homicide(e){e.isTrusted&&s.Crimes.Homicide.commit(this.props.p)}grandTheftAuto(e){e.isTrusted&&s.Crimes.GrandTheftAuto.commit(this.props.p)}kidnap(e){e.isTrusted&&s.Crimes.Kidnap.commit(this.props.p)}assassinate(e){e.isTrusted&&s.Crimes.Assassination.commit(this.props.p)}heist(e){e.isTrusted&&s.Crimes.Heist.commit(this.props.p)}render(){const e=s.Crimes.Shoplift.successRate(this.props.p),t=s.Crimes.RobStore.successRate(this.props.p),n=s.Crimes.Mug.successRate(this.props.p),a=s.Crimes.Larceny.successRate(this.props.p),r=s.Crimes.DealDrugs.successRate(this.props.p),i=s.Crimes.BondForgery.successRate(this.props.p),u=s.Crimes.TraffickArms.successRate(this.props.p),m=s.Crimes.Homicide.successRate(this.props.p),p=s.Crimes.GrandTheftAuto.successRate(this.props.p),d=s.Crimes.Kidnap.successRate(this.props.p),h=s.Crimes.Assassination.successRate(this.props.p),_=s.Crimes.Heist.successRate(this.props.p);return o.createElement("div",null,o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.shoplift,style:this.btnStyle,text:`Shoplift (${l.numeralWrapper.formatPercentage(e)} chance of success)`,tooltip:"Attempt to shoplift from a low-end retailer"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.robStore,style:this.btnStyle,text:`Rob store (${l.numeralWrapper.formatPercentage(t)} chance of success)`,tooltip:"Attempt to commit armed robbery on a high-end store"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.mug,style:this.btnStyle,text:`Mug someone (${l.numeralWrapper.formatPercentage(n)} chance of success)`,tooltip:"Attempt to mug a random person on the street"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.larceny,style:this.btnStyle,text:`Larceny (${l.numeralWrapper.formatPercentage(a)} chance of success)`,tooltip:"Attempt to rob property from someone's house"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.dealDrugs,style:this.btnStyle,text:`Deal Drugs (${l.numeralWrapper.formatPercentage(r)} chance of success)`,tooltip:"Attempt to deal drugs"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.bondForgery,style:this.btnStyle,text:`Bond Forgery (${l.numeralWrapper.formatPercentage(i)} chance of success)`,tooltip:"Attempt to forge corporate bonds"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.traffickArms,style:this.btnStyle,text:`Traffick illegal Arms (${l.numeralWrapper.formatPercentage(u)} chance of success)`,tooltip:"Attempt to smuggle illegal arms into the city"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.homicide,style:this.btnStyle,text:`Homicide (${l.numeralWrapper.formatPercentage(m)} chance of success)`,tooltip:"Attempt to murder a random person on the street"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.grandTheftAuto,style:this.btnStyle,text:`Grand theft Auto (${l.numeralWrapper.formatPercentage(p)} chance of success)`,tooltip:"Attempt to commit grand theft auto"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.kidnap,style:this.btnStyle,text:`Kidnap and Ransom (${l.numeralWrapper.formatPercentage(d)} chance of success)`,tooltip:"Attempt to kidnap and ransom a high-profile-target"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.assassinate,style:this.btnStyle,text:`Assassinate (${l.numeralWrapper.formatPercentage(h)} chance of success)`,tooltip:"Attempt to assassinate a high-profile target"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.heist,style:this.btnStyle,text:`Heist (${l.numeralWrapper.formatPercentage(_)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HospitalLocation=void 0;const o=i(n(0)),s=n(430),l=n(489),c=n(31),u=n(12);t.HospitalLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return s.getHospitalizationCost(this.props.p)}getHealed(e){if(!e.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const t=this.getCost();this.props.p.loseMoney(t),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),u.dialogBoxCreate(o.createElement(o.Fragment,null,"You were healed to full health! The hospital billed you for ",c.Money(t)))}render(){const e=this.getCost();return o.createElement(l.AutoupdatingStdButton,{onClick:this.getHealed,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Get treatment for wounds - ",c.Money(e))})}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GymLocation=void 0;const o=i(n(0)),s=n(11),l=n(24),c=n(45),u=n(63),m=n(31);t.GymLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.trainStrength=this.trainStrength.bind(this),this.trainDefense=this.trainDefense.bind(this),this.trainDexterity=this.trainDexterity.bind(this),this.trainAgility=this.trainAgility.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=c.SpecialServerIps.getIp(this.props.loc.name),t=l.getServer(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const n=t.backdoorInstalled?.9:1;return this.props.loc.costMult*n}train(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}trainStrength(){this.train(s.CONSTANTS.ClassGymStrength)}trainDefense(){this.train(s.CONSTANTS.ClassGymDefense)}trainDexterity(){this.train(s.CONSTANTS.ClassGymDexterity)}trainAgility(){this.train(s.CONSTANTS.ClassGymAgility)}render(){const e=s.CONSTANTS.ClassGymBaseCost*this.calculateCost();return o.createElement("div",null,o.createElement(u.StdButton,{onClick:this.trainStrength,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Strength (",m.Money(e)," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainDefense,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Defense (",m.Money(e)," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainDexterity,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Dexterity (",m.Money(e)," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainAgility,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Agility (",m.Money(e)," / sec)")}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyToJobButton=void 0;const o=i(n(0)),s=n(460),l=n(63);t.ApplyToJobButton=class extends o.Component{constructor(e){super(e),this.getJobRequirementTooltip=this.getJobRequirementTooltip.bind(this)}getJobRequirementTooltip(){const e=this.props.p.getNextCompanyPosition(this.props.company,this.props.entryPosType);return null==e?"":this.props.company.hasPosition(e)?s.getJobRequirementText(this.props.company,e,!0):""}render(){return o.createElement(l.StdButton,{onClick:this.props.onClick,style:this.props.style,text:this.props.text,tooltip:this.getJobRequirementTooltip()})}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyLocation=void 0;const o=i(n(0)),s=n(982),l=n(426),c=n(35),u=n(301),m=n(59),p=i(n(65)),d=n(63),h=n(67),_=n(749),g=n(54),f={display:"block"};t.CompanyLocation=class extends o.Component{constructor(e){if(super(e),this.companyPosition=null,this.jobTitle=null,this.btnStyle={display:"block"},this.quit=this.quit.bind(this),this.applyForAgentJob=this.applyForAgentJob.bind(this),this.applyForBusinessConsultantJob=this.applyForBusinessConsultantJob.bind(this),this.applyForBusinessJob=this.applyForBusinessJob.bind(this),this.applyForEmployeeJob=this.applyForEmployeeJob.bind(this),this.applyForItJob=this.applyForItJob.bind(this),this.applyForPartTimeEmployeeJob=this.applyForPartTimeEmployeeJob.bind(this),this.applyForPartTimeWaiterJob=this.applyForPartTimeWaiterJob.bind(this),this.applyForSecurityJob=this.applyForSecurityJob.bind(this),this.applyForSoftwareConsultantJob=this.applyForSoftwareConsultantJob.bind(this),this.applyForSoftwareJob=this.applyForSoftwareJob.bind(this),this.applyForWaiterJob=this.applyForWaiterJob.bind(this),this.startInfiltration=this.startInfiltration.bind(this),this.work=this.work.bind(this),this.location=l.Locations[e.locName],null==this.location)throw new Error(`CompanyLocation component constructed with invalid location: ${e.locName}`);if(this.company=c.Companies[e.locName],null==this.company)throw new Error(`CompanyLocation component constructed with invalid company: ${e.locName}`);this.state={employedHere:!1},this.props.p.location=e.locName,this.checkIfEmployedHere(!1)}applyForAgentJob(e){e.isTrusted&&(this.props.p.applyForAgentJob(),this.checkIfEmployedHere(!0))}applyForBusinessConsultantJob(e){e.isTrusted&&(this.props.p.applyForBusinessConsultantJob(),this.checkIfEmployedHere(!0))}applyForBusinessJob(e){e.isTrusted&&(this.props.p.applyForBusinessJob(),this.checkIfEmployedHere(!0))}applyForEmployeeJob(e){e.isTrusted&&(this.props.p.applyForEmployeeJob(),this.checkIfEmployedHere(!0))}applyForItJob(e){e.isTrusted&&(this.props.p.applyForItJob(),this.checkIfEmployedHere(!0))}applyForPartTimeEmployeeJob(e){e.isTrusted&&(this.props.p.applyForPartTimeEmployeeJob(),this.checkIfEmployedHere(!0))}applyForPartTimeWaiterJob(e){e.isTrusted&&(this.props.p.applyForPartTimeWaiterJob(),this.checkIfEmployedHere(!0))}applyForSecurityJob(e){e.isTrusted&&(this.props.p.applyForSecurityJob(),this.checkIfEmployedHere(!0))}applyForSoftwareConsultantJob(e){e.isTrusted&&(this.props.p.applyForSoftwareConsultantJob(),this.checkIfEmployedHere(!0))}applyForSoftwareJob(e){e.isTrusted&&(this.props.p.applyForSoftwareJob(),this.checkIfEmployedHere(!0))}applyForWaiterJob(e){e.isTrusted&&(this.props.p.applyForWaiterJob(),this.checkIfEmployedHere(!0))}checkIfEmployedHere(e=!1){this.jobTitle=this.props.p.jobs[this.props.locName],null!=this.jobTitle&&(this.companyPosition=m.CompanyPositions[this.jobTitle]),e&&this.setState({employedHere:null!=this.jobTitle})}startInfiltration(e){if(!e.isTrusted)return;const t=this.location;t.infiltrationData?(this.props.engine.loadInfiltrationContent(this.props.locName,t.infiltrationData.startingSecurityLevel,t.infiltrationData.maxClearanceLevel),t.infiltrationData):console.error(`trying to start infiltration at ${this.props.locName} but the infiltrationData is null`)}work(e){if(!e.isTrusted)return;const t=this.companyPosition;t instanceof u.CompanyPosition&&(t.isPartTimeJob()||t.isSoftwareConsultantJob()||t.isBusinessConsultantJob()?this.props.p.startWorkPartTime(this.props.locName):this.props.p.startWork(this.props.locName))}quit(e){if(!e.isTrusted)return;const t=g.yesNoBoxGetYesButton(),n=g.yesNoBoxGetNoButton();null!=t&&null!=n&&(t.innerHTML="Quit job",n.innerHTML="Cancel",t.addEventListener("click",()=>{this.props.p.quitJob(this.props.locName),this.checkIfEmployedHere(!0),g.yesNoBoxClose()}),n.addEventListener("click",()=>{g.yesNoBoxClose()}),g.yesNoBoxCreate(o.createElement(o.Fragment,null,"Would you like to quit your job at ",this.company.name,"?")))}render(){const e=null!=this.jobTitle,t=this.company.getFavorGain();return o.createElement("div",null,e&&o.createElement("div",null,o.createElement("p",null,"Job Title: ",this.jobTitle),o.createElement("br",null),o.createElement("p",{style:f},"-------------------------"),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Company reputation: ",h.Reputation(this.company.playerReputation),o.createElement("span",{className:"tooltiptext"},"You will earn ",_.Favor(t[0])," company favor upon resetting after installing Augmentations")),o.createElement("br",null),o.createElement("br",null),o.createElement("p",{style:f},"-------------------------"),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Company Favor: ",_.Favor(this.company.favor),o.createElement("span",{className:"tooltiptext"},"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.")),o.createElement("br",null),o.createElement("br",null),o.createElement("p",{style:f},"-------------------------"),o.createElement("br",null),o.createElement(d.StdButton,{onClick:this.work,text:"Work"}),"    ",o.createElement(d.StdButton,{onClick:this.quit,text:"Quit"})),this.company.hasAgentPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.AgentCompanyPositions[0]],onClick:this.applyForAgentJob,p:this.props.p,style:this.btnStyle,text:"Apply for Agent Job"}),this.company.hasBusinessConsultantPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.BusinessConsultantCompanyPositions[0]],onClick:this.applyForBusinessConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Consultant Job"}),this.company.hasBusinessPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.BusinessCompanyPositions[0]],onClick:this.applyForBusinessJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Job"}),this.company.hasEmployeePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.MiscCompanyPositions[1]],onClick:this.applyForEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be an Employee"}),this.company.hasEmployeePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.PartTimeCompanyPositions[1]],onClick:this.applyForPartTimeEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Employee"}),this.company.hasITPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.ITCompanyPositions[0]],onClick:this.applyForItJob,p:this.props.p,style:this.btnStyle,text:"Apply for IT Job"}),this.company.hasSecurityPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SecurityCompanyPositions[2]],onClick:this.applyForSecurityJob,p:this.props.p,style:this.btnStyle,text:"Apply for Security Job"}),this.company.hasSoftwareConsultantPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SoftwareConsultantCompanyPositions[0]],onClick:this.applyForSoftwareConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Consultant Job"}),this.company.hasSoftwarePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SoftwareCompanyPositions[0]],onClick:this.applyForSoftwareJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Job"}),this.company.hasWaiterPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.MiscCompanyPositions[0]],onClick:this.applyForWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a Waiter"}),this.company.hasWaiterPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.PartTimeCompanyPositions[0]],onClick:this.applyForPartTimeWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Waiter"}),null!=this.location.infiltrationData&&o.createElement(d.StdButton,{onClick:this.startInfiltration,style:this.btnStyle,text:"Infiltrate Company"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GenericLocation=void 0;const o=i(n(0)),s=n(983),l=n(981),c=n(980),u=n(979),m=n(978),p=n(977),d=n(976),h=n(975),_=n(974),g=n(497),f=n(26),y=n(45),b=n(24),E=n(63),v=n(961);t.GenericLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"}}getLocationSpecificContent(){const e=[];return this.props.loc.types.includes(g.LocationType.Company)&&e.push(o.createElement(s.CompanyLocation,{engine:this.props.engine,key:"companylocation",locName:this.props.loc.name,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Gym)&&e.push(o.createElement(l.GymLocation,{key:"gymlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Hospital)&&e.push(o.createElement(c.HospitalLocation,{key:"hospitallocation",p:this.props.p})),this.props.loc.types.includes(g.LocationType.Slums)&&e.push(o.createElement(u.SlumsLocation,{key:"slumslocation",p:this.props.p})),this.props.loc.types.includes(g.LocationType.Special)&&e.push(o.createElement(m.SpecialLocation,{engine:this.props.engine,key:"speciallocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.TechVendor)&&e.push(o.createElement(p.TechVendorLocation,{key:"techvendorlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.TravelAgency)&&e.push(o.createElement(d.TravelAgencyLocation,{key:"travelagencylocation",p:this.props.p,travel:this.props.travel})),this.props.loc.types.includes(g.LocationType.University)&&e.push(o.createElement(h.UniversityLocation,{key:"universitylocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Casino)&&e.push(o.createElement(_.CasinoLocation,{key:"casinoLocation",p:this.props.p})),e}render(){const e=this.getLocationSpecificContent(),t=y.SpecialServerIps.getIp(this.props.loc.name),n=b.getServer(t),a=null!==n&&b.isBackdoorInstalled(n);return o.createElement("div",null,o.createElement(E.StdButton,{onClick:this.props.returnToCity,style:this.btnStyle,text:"Return to World"}),o.createElement("h1",{className:"noselect"},a&&!f.Settings.DisableTextEffects?o.createElement(v.CorruptableText,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LocationCity=void 0;const o=i(n(0)),s=n(26),l=n(63);t.LocationCity=class extends o.Component{asciiCity(){const e=e=>e?o.createElement("span",{key:e,className:"tooltip",style:{color:"blue",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:this.props.enterLocation.bind(this,e)},"X"):o.createElement("span",null,"*"),t=/[A-Z]/g,n={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},a=a=>{const r=[],i=[];let o;for(;null!==(o=t.exec(a));)i.push(o);if(0===i.length)return r.push(a),r;for(let t=0;to.createElement("li",{key:e},o.createElement(l.StdButton,{onClick:this.props.enterLocation.bind(this,e),text:e})));return o.createElement("ul",null,e)}render(){return o.createElement(o.Fragment,null,s.Settings.DisableASCIIArt?this.listCity():this.asciiCity())}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Victory=void 0;const s=n(16),l=i(n(0)),c=n(63),u=o(n(96)),m=n(31),p=n(67),d=n(21);t.Victory=function(e){const[t,n]=l.useState("none");function a(){const t=document.getElementById("mainmenu-container");if(!t)throw new Error("mainmenu-container somehow null");t.style.visibility="visible",e.Engine.loadLocationContent()}const r=e.MaxLevel*Math.pow(1.01,e.MaxLevel),i=Math.pow(e.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*r*d.BitNodeMultipliers.InfiltrationRep,o=Math.pow(e.Difficulty+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*r*d.BitNodeMultipliers.InfiltrationMoney;return l.default.createElement(l.default.Fragment,null,l.default.createElement(u.default,{container:!0,spacing:3},l.default.createElement(u.default,{item:!0,xs:10},l.default.createElement("h1",null,"Infiltration successful!")),l.default.createElement(u.default,{item:!0,xs:10},l.default.createElement("h2",null,"You can trade the confidential information you found for money or reputation."),l.default.createElement("select",{className:"dropdown",onChange:function(e){n(e.target.value)}},l.default.createElement("option",{key:"none",value:"none"},"none"),e.Player.factions.filter(e=>s.Factions[e].getInfo().offersWork()).map(e=>l.default.createElement("option",{key:e,value:e},e))),l.default.createElement(c.StdButton,{onClick:function(){"none"!==t&&(s.Factions[t].playerReputation+=i,a())},text:l.default.createElement(l.default.Fragment,null,"Trade for ",p.Reputation(i)," reputation")})),l.default.createElement(u.default,{item:!0,xs:3},l.default.createElement(c.StdButton,{onClick:function(){e.Player.gainMoney(o),e.Player.recordMoneySource(o,"infiltration"),a()},text:l.default.createElement(l.default.Fragment,null,"Sell for ",m.Money(o))})),l.default.createElement(u.default,{item:!0,xs:3},l.default.createElement(c.StdButton,{onClick:a,text:"Quit"}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WireCuttingGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d={Trivial:{timer:9e3,wiresmin:4,wiresmax:4,rules:2},Normal:{timer:7e3,wiresmin:6,wiresmax:6,rules:2},Hard:{timer:5e3,wiresmin:8,wiresmax:8,rules:3},Impossible:{timer:4e3,wiresmin:9,wiresmax:9,rules:4}},h=["|",".","/","-","█","#"],_=["red","#FFC107","blue","white"],g={red:"red","#FFC107":"yellow",blue:"blue",white:"white"};function f(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,n)=>t===n}}function y(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${g[t]}.`,shouldCut:e=>e.colors.includes(t)}}t.WireCuttingGame=function(e){const t={timer:0,wiresmin:0,wiresmax:0,rules:0};p.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[],n=m.random(e.wiresmin,e.wiresmax);for(let e=0;es.default.createElement("h3",{key:t},e.toString())),s.default.createElement("pre",null,new Array(a.length).fill(0).map((e,t)=>s.default.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,a.map((e,n)=>3!==t&&4!==t||!r[n]?s.default.createElement("span",{key:n,style:{color:e.colors[t%e.colors.length]}},"|",e.tpe,"|   "):s.default.createElement("span",{key:n},"      "))))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=parseInt(t.key);n<1||n>a.length||isNaN(n)||i(t=>{const r=[...t];r[n-1]=!0,o.some(e=>e.shouldCut(a[n-1],n-1))||e.onFailure();const i=[];for(let e=0;ee===r[t])&&e.onSuccess(),r})},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MinesweeperGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p=n(226),d={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function h(e){const t=[];for(let n=0;n{const e=setTimeout(()=>f(!1),2e3);return()=>clearInterval(e)},[]),s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},g?"Remember all the mines!":"Mark all the mines!"),a.map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,e.map((e,n)=>g?a[t][n]?s.default.createElement("span",{key:n},"[?] "):s.default.createElement("span",{key:n},"[ ] "):n==o[0]&&t==o[1]?s.default.createElement("span",{key:n},"[X] "):r[t][n]?s.default.createElement("span",{key:n},"[.] "):s.default.createElement("span",{key:n},"[ ] "))),s.default.createElement("br",null))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){if(t.preventDefault(),g)return;const n=[0,0];switch(p.getArrow(t)){case"↑":n[1]--;break;case"←":n[0]--;break;case"↓":n[1]++;break;case"→":n[0]++}const r=[o[0]+n[0],o[1]+n[1]];if(r[0]=(r[0]+a[0].length)%a[0].length,r[1]=(r[1]+a.length)%a.length,_(r),32==t.keyCode){if(!a[o[1]][o[0]])return void e.onFailure();i(t=>(t[o[1]][o[0]]=!0,function(e,t){function n(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return n(e)===n(t)}(a,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Cyberpunk2077Game=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p=n(226),d={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function h(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}t.Cyberpunk2077Game=function(e){const t={timer:0,width:0,height:0,symbols:0};m.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[];for(let n=0;nt==i?s.default.createElement("span",{key:`${t}`,style:{fontSize:"1em",color:"blue"}},e," "):s.default.createElement("span",{key:`${t}`,style:{fontSize:"1em"}},e," "))),s.default.createElement("br",null),a.map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,e.map((e,n)=>n==_[0]&&t==_[1]?s.default.createElement("span",{key:`${n}${t}`,style:{fontSize:"2em",color:"blue"}},e," "):s.default.createElement("span",{key:`${n}${t}`,style:{fontSize:"2em"}},e," "))),s.default.createElement("br",null))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=[0,0];switch(p.getArrow(t)){case"↑":n[1]--;break;case"←":n[0]--;break;case"↓":n[1]++;break;case"→":n[0]++}const s=[_[0]+n[0],_[1]+n[1]];if(s[0]=(s[0]+a[0].length)%a[0].length,s[1]=(s[1]+a.length)%a.length,g(s),32==t.keyCode){if(a[_[1]][_[0]]!==r[i])return void e.onFailure();o(i+1),r.length===i+1&&e.onSuccess()}},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheatCodeGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:9}};t.CheatCodeGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=["←","→","↑","↓"];let n="";for(let a=0;a=a.length&&e.onSuccess()):e.onFailure()},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BribeGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};t.BribeGame=function(e){const t={timer:0,size:0};m.interpolate(p,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[];t.push(d[Math.floor(Math.random()*d.length)]);for(let n=0;n0;t--){const n=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[n],e[n]=a}}(t),t}(t)),[r,i]=s.useState(0);return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",null,"Say something nice about the guard."),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=t.keyCode;if(32===n)return void(d.includes(a[r])?e.onSuccess():e.onFailure());let o=r;for([38,87,68,39].includes(n)&&o++,[65,37,83,40].includes(n)&&o--;o<0;)o+=a.length;for(;o>a.length-1;)o-=a.length;i(o)},onFailure:e.onFailure})),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("h2",{style:{fontSize:"2em"}},"↑"),s.default.createElement("h2",{style:{fontSize:"2em"}},a[r]),s.default.createElement("h2",{style:{fontSize:"2em"}},"↓")))};const d=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],h=["aggressive","aloof","arrogant","big-headed","boastful","boring","bossy","careless","clingy","couch potato","cruel","cynical","grumpy","hot air","know it all","obnoxious","pain in the neck","picky","tactless","thoughtless"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BackwardGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d=n(657),h={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};t.BackwardGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(h,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=m.random(e.min,e.max);let n="";for(let e=0;e0&&(n+=" "),n+=_[Math.floor(Math.random()*_.length)];return n}(t)),[r,i]=s.useState("");return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Type it backward"),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){if(t.preventDefault(),16===t.keyCode)return;const n=r+t.key.toUpperCase();a.startsWith(n)?a===n?e.onSuccess():i(n):e.onFailure()},onFailure:e.onFailure})),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("p",{style:{transform:"scaleX(-1)"}},a)),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("p",null,r,s.default.createElement(d.BlinkingCursor,null))))};const _=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SlashGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};t.SlashGame=function(e){const t={window:0};m.interpolate(p,e.difficulty,t);const[n,a]=s.useState(!0);return s.useEffect(()=>{let e=-1;const n=window.setTimeout(()=>{a(!1),e=window.setTimeout(()=>a(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(n),-1!==e&&clearInterval(e)}},[]),s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:5e3,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Slash when his guard is down!"),s.default.createElement("p",{style:{fontSize:"5em"}},n?"!Guarding!":"!ATTACKING!"),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(n?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BracketGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d=n(657),h={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};t.BracketGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(h,e.difficulty,t);const n=t.timer,[a,r]=s.useState(""),[i]=s.useState(function(e){let t="";const n=m.random(e.min,e.max);for(let e=0;e":"":"]"}(t);n&&(function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(i[i.length-a.length-1],n)?i.length!==a.length+1?r(a+n):e.onSuccess():e.onFailure())},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Countdown=void 0;const s=i(n(0)),l=o(n(96));t.Countdown=function(e){const[t,n]=s.useState(3);return s.useEffect(()=>{0!==t?setTimeout(()=>n(t-1),200):e.onFinish()}),s.default.createElement(s.default.Fragment,null,s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",null,"Get Ready!"),s.default.createElement("h1",null,t))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Game=void 0;const s=i(n(0)),l=o(n(96)),c=n(995),u=n(994),m=n(993),p=n(992),d=n(991),h=n(990),_=n(989),g=n(988),f=n(987),y=n(986);var b;!function(e){e[e.Countdown=0]="Countdown",e[e.Minigame=1]="Minigame",e[e.Result=2]="Result",e[e.Sell=3]="Sell"}(b||(b={}));const E=[m.SlashGame,u.BracketGame,p.BackwardGame,d.BribeGame,h.CheatCodeGame,_.Cyberpunk2077Game,g.MinesweeperGame,f.WireCuttingGame];t.Game=function(e){const[t,n]=s.useState(1),[a,r]=s.useState(b.Countdown),[i,o]=s.useState(""),[u,m]=s.useState({lastGames:[-1,-1],id:Math.floor(Math.random()*E.length)});function p(){m({lastGames:[u.lastGames[1],u.id],id:function(){let e=u.lastGames[0];const t=[u.lastGames[0],u.lastGames[1],u.id];for(;t.includes(e);)e=Math.floor(Math.random()*E.length);return e}()})}function d(e){o(t=>{let n=t;return(n+=e?"✓":"✗").length>15&&(n=n.slice(1)),n})}let h;switch(a){case b.Countdown:h=s.default.createElement(c.Countdown,{onFinish:()=>r(b.Minigame)});break;case b.Minigame:{const a=E[u.id];h=s.default.createElement(a,{onSuccess:function(){d(!0),t===e.MaxLevel?r(b.Sell):(r(b.Countdown),n(t+1)),p()},onFailure:function(t){r(b.Countdown),d(!1);const n=(null===t||void 0===t?void 0:t.automated)?e.Player.hp:3*e.StartingDifficulty;if(e.Player.takeDamage(n)){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}p()},difficulty:e.Difficulty+t/50});break}case b.Sell:h=s.default.createElement(y.Victory,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel})}return s.default.createElement(s.default.Fragment,null,s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(l.default,{item:!0,xs:3},s.default.createElement("h3",null,"Level: ",t," / ",e.MaxLevel),s.default.createElement(function(){return s.default.createElement("h4",null,s.default.createElement("span",{style:{color:"gray"}},i.slice(0,i.length-1)),i[i.length-1])},null)),s.default.createElement(l.default,{item:!0,xs:12},h)))}},,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Intro=void 0;const r=a(n(0)),i=n(63),o=a(n(96));function s(e,t){let n="";return t<=0?t=0:t>13?t=13:(t--,n=">"),r.default.createElement("span",{style:{color:e}},"=".repeat(t),n," ".repeat(13-n.length-t))}t.Intro=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement(o.default,{container:!0,spacing:3},r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("h1",null,"Infiltrating ",e.Location)),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("h2",null,"Maximum level: ",e.MaxLevel)),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("pre",null,"[",function(e){return 0===e?r.default.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.default.createElement(r.default.Fragment,null,s("white",13*e),s("orange",13*(e-1)),s("red",13*(e-2)))}(e.Difficulty),"]"),r.default.createElement("pre",null," ^ ^ ^ ^"),r.default.createElement("pre",null," Trivial Normal Hard Impossible")),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("p",null,"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation."),r.default.createElement("br",null),r.default.createElement("p",null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.default.createElement("br",null),r.default.createElement("p",null,"No game require use of the mouse."),r.default.createElement("br",null),r.default.createElement("p",null,"Spacebar is the default action/confirm button."),r.default.createElement("br",null),r.default.createElement("p",null,"Everything that uses arrow can also use WASD"),r.default.createElement("br",null),r.default.createElement("p",null,"Sometimes the rest of the keyboard is used.")),r.default.createElement(o.default,{item:!0,xs:3},r.default.createElement(i.StdButton,{onClick:e.start,text:"Start"})),r.default.createElement(o.default,{item:!0,xs:3},r.default.createElement(i.StdButton,{onClick:e.cancel,text:"Cancel"}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=i(n(0)),s=n(1002),l=n(996);t.Root=function(e){const[t,n]=o.useState(!1);return t?o.default.createElement(l.Game,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel}):o.default.createElement(s.Intro,{Player:e.Player,Engine:e.Engine,Location:e.Location,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel,start:()=>n(!0),cancel:function(){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}})}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillElem=void 0;const r=a(n(0)),i=n(170),o=n(20);t.SkillElem=function(e){const t=e.skill.name;let n=0;e.bladeburner.skills[t]&&!isNaN(e.bladeburner.skills[t])&&(n=e.bladeburner.skills[t]);const a=e.skill.calculateCost(n),s=e.bladeburner.skillPoints>=a,l=!!e.skill.maxLvl&&n>=e.skill.maxLvl;return r.default.createElement(r.default.Fragment,null,r.default.createElement("h2",{style:{display:"inline-block"}},r.default.createElement(i.CopyableText,{value:e.skill.name})),r.default.createElement("a",{onClick:function(){e.bladeburner.skillPointso.createElement("li",{key:t,className:"bladeburner-action"},o.createElement(s.SkillElem,{bladeburner:e.bladeburner,skill:l.Skills[t],onUpgrade:e.onUpgrade}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillPage=void 0;const o=i(n(0)),s=n(1005),l=n(150),c=n(20);t.SkillPage=function(e){const t=o.useState(!1)[1],n=e.bladeburner.skillMultipliers;function a(e){return e&&1!==e}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("strong",null,"Skill Points: ",c.formatNumber(e.bladeburner.skillPoints,0))),o.default.createElement("p",null,"You will gain one skill point every ",l.BladeburnerConstants.RanksPerSkillPoint," ranks.",o.default.createElement("br",null),o.default.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.",o.default.createElement("br",null)),o.default.createElement("br",null),a(n.successChanceAll)&&o.default.createElement("p",null,"Total Success Chance: x",c.formatNumber(n.successChanceAll,3)),a(n.successChanceStealth)&&o.default.createElement("p",null,"Stealth Success Chance: x",c.formatNumber(n.successChanceStealth,3)),a(n.successChanceKill)&&o.default.createElement("p",null,"Retirement Success Chance: x",c.formatNumber(n.successChanceKill,3)),a(n.successChanceContract)&&o.default.createElement("p",null,"Contract Success Chance: x",c.formatNumber(n.successChanceContract,3)),a(n.successChanceOperation)&&o.default.createElement("p",null,"Operation Success Chance: x",c.formatNumber(n.successChanceOperation,3)),a(n.successChanceEstimate)&&o.default.createElement("p",null,"Synthoid Data Estimate: x",c.formatNumber(n.successChanceEstimate,3)),a(n.actionTime)&&o.default.createElement("p",null,"Action Time: x",c.formatNumber(n.actionTime,3)),a(n.effHack)&&o.default.createElement("p",null,"Hacking Skill: x",c.formatNumber(n.effHack,3)),a(n.effStr)&&o.default.createElement("p",null,"Strength: x",c.formatNumber(n.effStr,3)),a(n.effDef)&&o.default.createElement("p",null,"Defense: x",c.formatNumber(n.effDef,3)),a(n.effDex)&&o.default.createElement("p",null,"Dexterity: x",c.formatNumber(n.effDex,3)),a(n.effAgi)&&o.default.createElement("p",null,"Agility: x",c.formatNumber(n.effAgi,3)),a(n.effCha)&&o.default.createElement("p",null,"Charisma: x",c.formatNumber(n.effCha,3)),a(n.effInt)&&o.default.createElement("p",null,"Intelligence: x",c.formatNumber(n.effInt,3)),a(n.stamina)&&o.default.createElement("p",null,"Stamina: x",c.formatNumber(n.stamina,3)),a(n.money)&&o.default.createElement("p",null,"Contract Money: x",c.formatNumber(n.money,3)),a(n.expGain)&&o.default.createElement("p",null,"Exp Gain: x",c.formatNumber(n.expGain,3)),o.default.createElement("br",null),o.default.createElement(s.SkillList,{bladeburner:e.bladeburner,onUpgrade:()=>t(e=>!e)}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpElem=void 0;const o=i(n(0)),s=n(20),l=n(297),c=n(171),u=n(410),m=n(79),p=n(666),d=n(496),h=n(170);t.BlackOpElem=function(e){const t=o.useState(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return o.default.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const n=e.bladeburner.action.type===l.ActionTypes.BlackOperation&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=e.action.getActionTime(e.bladeburner),i=e.bladeburner.rank>=e.action.reqdRank,_=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete);return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(h.CopyableText,{value:e.action.name})," (IN PROGRESS - ",s.formatNumber(_,0)," / ",s.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(h.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},c.createProgressBarText({progress:_/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{className:i?"a-link-button":"a-link-button-inactive",style:{margin:"3px",padding:"3px"},onClick:function(){e.bladeburner.action.type=l.ActionTypes.BlackOperation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)}},"Start"),o.default.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";m.createPopup(t,p.TeamSizePopup,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",s.formatNumber(e.action.teamCount,0),")")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{style:{display:"block",color:i?"white":"red"}},"Required Rank: ",s.formatNumber(e.action.reqdRank,0)),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},"Estimated Success Chance: ",o.default.createElement(d.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",s.convertTimeMsToTimeElapsedString(1e3*r)))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpList=void 0;const r=a(n(0)),i=n(755),o=n(1007);t.BlackOpList=function(e){let t=[];for(const e in i.BlackOperations)i.BlackOperations.hasOwnProperty(e)&&t.push(i.BlackOperations[e]);return t.sort(function(e,t){return e.reqdRank-t.reqdRank}),t=(t=t.filter((n,a)=>!(null==e.bladeburner.blackops[t[a].name]&&0!==a&&null==e.bladeburner.blackops[t[a-1].name]))).reverse(),r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t.name,className:"bladeburner-action"},r.default.createElement(o.BlackOpElem,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpPage=void 0;const o=i(n(0)),s=n(1008);t.BlackOpPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",o.createElement("br",null),o.createElement("br",null),o.createElement("b",null,"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops."),o.createElement("br",null),o.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),o.createElement(s.BlackOpList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationElem=void 0;const o=i(n(0)),s=n(297),l=n(171),c=n(20),u=n(410),m=n(150),p=n(79),d=n(666),h=n(496),_=n(170);t.OperationElem=function(e){const t=o.useState(!1)[1],n=e.bladeburner.action.type===s.ActionTypes.Operation&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),i=e.action.level>=e.action.maxLevel,g=e.action.getActionTime(e.bladeburner),f=`bladeburner-${e.action.name}-autolevel-checkbox`;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(_.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(r,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(_.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:r/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes.Operation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start"),o.default.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";p.createPopup(t,d.TeamSizePopup,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",c.formatNumber(e.action.teamCount,0),")")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(m.BladeburnerConstants.OperationSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),o.default.createElement("a",{onClick:function(){++e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${i?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),o.default.createElement("a",{onClick:function(){--e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${e.action.level<=1?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},o.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),"Estimated success chance: ",o.default.createElement(h.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*g),o.default.createElement("br",null),"Operations remaining: ",Math.floor(e.action.count),o.default.createElement("br",null),"Successes: ",e.action.successes,o.default.createElement("br",null),"Failures: ",e.action.failures),o.default.createElement("br",null),o.default.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:f},"Autolevel:",o.default.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),o.default.createElement("input",{type:"checkbox",id:f,checked:e.action.autoLevel,onChange:function(n){e.action.autoLevel=n.target.checked,t(e=>!e)}}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationList=void 0;const r=a(n(0)),i=n(1010);t.OperationList=function(e){const t=Object.keys(e.bladeburner.operations),n=e.bladeburner.operations;return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t,className:"bladeburner-action"},r.default.createElement(i.OperationElem,{bladeburner:e.bladeburner,action:n[t],player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationPage=void 0;const o=i(n(0)),s=n(1011);t.OperationPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",o.createElement("br",null),o.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",o.createElement("br",null),o.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.",o.createElement("br",null),o.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),o.createElement(s.OperationList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractElem=void 0;const o=i(n(0)),s=n(297),l=n(171),c=n(20),u=n(410),m=n(150),p=n(496),d=n(170);t.ContractElem=function(e){const t=o.useState(!1)[1],n=e.bladeburner.action.type===s.ActionTypes.Contract&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=(e.action.getSuccessChance(e.bladeburner),Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete)),i=e.action.level>=e.action.maxLevel,h=e.action.getActionTime(e.bladeburner),_=`bladeburner-${e.action.name}-autolevel-checkbox`;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(d.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(r,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(d.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:r/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes.Contract,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(m.BladeburnerConstants.ContractSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),o.default.createElement("a",{onClick:function(){++e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${i?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),o.default.createElement("a",{onClick:function(){--e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${e.action.level<=1?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},o.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),"Estimated success chance: ",o.default.createElement(p.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*h),o.default.createElement("br",null),"Contracts remaining: ",Math.floor(e.action.count),o.default.createElement("br",null),"Successes: ",e.action.successes,o.default.createElement("br",null),"Failures: ",e.action.failures),o.default.createElement("br",null),o.default.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:_},"Autolevel:",o.default.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),o.default.createElement("input",{type:"checkbox",id:_,checked:e.action.autoLevel,onChange:function(n){e.action.autoLevel=n.target.checked,t(e=>!e)}}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractList=void 0;const r=a(n(0)),i=n(1013);t.ContractList=function(e){const t=Object.keys(e.bladeburner.contracts),n=e.bladeburner.contracts;return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t,className:"bladeburner-action"},r.default.createElement(i.ContractElem,{bladeburner:e.bladeburner,action:n[t],player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractPage=void 0;const o=i(n(0)),s=n(1014);t.ContractPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",o.createElement("br",null),o.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),o.createElement(s.ContractList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionElem=void 0;const o=i(n(0)),s=n(297),l=n(171),c=n(20),u=n(170);t.GeneralActionElem=function(e){const t=o.useState(!1)[1],n=e.action.name===e.bladeburner.action.name,a=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),r=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),i="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(u.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(a,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(u.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:a/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes[e.action.name],e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*r),-1!==i&&o.default.createElement(o.default.Fragment,null,o.default.createElement("br",null),"Estimated success chance: ",c.formatNumber(100*i,1),"%")))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionList=void 0;const r=a(n(0)),i=n(1016),o=n(752);t.GeneralActionList=function(e){const t=[];for(const e in o.GeneralActions)o.GeneralActions.hasOwnProperty(e)&&t.push(o.GeneralActions[e]);return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t.name,className:"bladeburner-action"},r.default.createElement(i.GeneralActionElem,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionPage=void 0;const o=i(n(0)),s=n(1017);t.GeneralActionPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way."),o.createElement(s.GeneralActionList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AllPages=void 0;const o=i(n(0)),s=n(1018),l=n(1015),c=n(1012),u=n(1009),m=n(1006),p=n(410);t.AllPages=function(e){const[t,n]=o.useState("General"),a=o.useState(!1)[1];function r(e){return o.default.createElement("a",{onClick:()=>n(e.name),className:t!==e.name?"bladeburner-nav-button":"bladeburner-nav-button-inactive"},e.name)}return o.useEffect(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement(r,{name:"General"}),o.default.createElement(r,{name:"Contracts"}),o.default.createElement(r,{name:"Operations"}),o.default.createElement(r,{name:"BlackOps"}),o.default.createElement(r,{name:"Skills"}),o.default.createElement("div",{style:{display:"block",margin:"4px",padding:"4px"}},"General"===t&&o.default.createElement(s.GeneralActionPage,{bladeburner:e.bladeburner,player:e.player}),"Contracts"===t&&o.default.createElement(l.ContractPage,{bladeburner:e.bladeburner,player:e.player}),"Operations"===t&&o.default.createElement(c.OperationPage,{bladeburner:e.bladeburner,player:e.player}),"BlackOps"===t&&o.default.createElement(u.BlackOpPage,{bladeburner:e.bladeburner,player:e.player}),"Skills"===t&&o.default.createElement(m.SkillPage,{bladeburner:e.bladeburner})),o.default.createElement("span",{className:"text"},p.stealthIcon," = This action requires stealth, ",p.killIcon," = This action involves retirement"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Console=void 0;const o=i(n(0));function s(e){return o.default.createElement("tr",null,o.default.createElement("td",{className:"bladeburner-console-line",style:{color:"var(--my-font-color)",whiteSpace:"pre-wrap"}},e.content))}t.Console=function(e){const t=o.useRef(null),n=o.useState(!1)[1],[a,r]=o.useState(e.bladeburner.consoleHistory.length);function i(){t.current&&(t.current.scrollTop=t.current.scrollHeight)}function l(){n(e=>!e)}return o.useEffect(()=>{const e=setInterval(l,1e3),t=setInterval(i,100);return()=>{clearInterval(e),clearInterval(t)}},[]),o.default.createElement("div",{ref:t,className:"bladeburner-console-div"},o.default.createElement("table",{className:"bladeburner-console-table"},o.default.createElement("tbody",null,e.bladeburner.consoleLogs.map((e,t)=>o.default.createElement(s,{key:t,content:e})),o.default.createElement("tr",{key:"input",id:"bladeburner-console-input-row",className:"bladeburner-console-input-row"},o.default.createElement("td",{className:"bladeburner-console-input-cell"},o.default.createElement("pre",null,"> "),o.default.createElement("input",{autoFocus:!0,className:"bladeburner-console-input",tabIndex:1,type:"text",onKeyDown:function(t){if(13===t.keyCode){t.preventDefault();const n=t.currentTarget.value;t.currentTarget.value="",n.length>0&&(e.bladeburner.postToConsole("> "+n),e.bladeburner.executeConsoleCommands(e.player,n),r(e.bladeburner.consoleHistory.length),l())}const n=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=a;const i=n.length;if(0===i)return;(e<0||e>i)&&r(i),0!==e&&(e-=1),r(e);const o=n[e];t.currentTarget.value=o}if(40===t.keyCode){const e=a,i=n.length;if(0==i)return;if((e<0||e>i)&&r(i),e==i||e==i-1)r(i),t.currentTarget.value="";else{r(a+1);const e=n[a+1];t.currentTarget.value=e}}}}))))))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TravelPopup=void 0;const r=a(n(0)),i=n(79),o=n(150);t.TravelPopup=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise."),o.BladeburnerConstants.CityNames.map(t=>r.default.createElement("div",{key:t,className:"cmpy-mgmt-find-employee-option",onClick:()=>(function(t){e.bladeburner.city=t,i.removePopup(e.popupId)})(t)},t)))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=void 0;const o=i(n(0)),s=n(20),l=n(150),c=n(31),u=n(286),m=n(3),p=n(12),d=n(79),h=n(16),_=n(80),g=n(1021);t.Stats=function(e){const t=o.useState(!1)[1];return o.useEffect(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Rank: ",s.formatNumber(e.bladeburner.rank,2),o.default.createElement("span",{className:"tooltiptext"},"Your rank within the Bladeburner division.")),o.default.createElement("br",null),o.default.createElement("p",null,"Stamina: ",s.formatNumber(e.bladeburner.stamina,3)," / ",s.formatNumber(e.bladeburner.maxStamina,3)),o.default.createElement("div",{className:"help-tip",onClick:function(){p.dialogBoxCreate("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

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

Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}},"?"),o.default.createElement("br",null),o.default.createElement("p",null,"Stamina Penalty: ",s.formatNumber(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),o.default.createElement("br",null),o.default.createElement("p",null,"Team Size: ",s.formatNumber(e.bladeburner.teamSize,0)),o.default.createElement("p",null,"Team Members Lost: ",s.formatNumber(e.bladeburner.teamLost,0)),o.default.createElement("br",null),o.default.createElement("p",null,"Num Times Hospitalized: ",e.bladeburner.numHosp),o.default.createElement("p",null,"Money Lost From Hospitalizations: ",c.Money(e.bladeburner.moneyLost)),o.default.createElement("br",null),o.default.createElement("p",null,"Current City: ",e.bladeburner.city),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Population: ",m.numeralWrapper.formatPopulation(e.bladeburner.getCurrentCity().popEst),o.default.createElement("span",{className:"tooltiptext"},"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.")),o.default.createElement("div",{className:"help-tip",onClick:function(){p.dialogBoxCreate("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.

Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.

The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}},"?"),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Communities: ",s.formatNumber(e.bladeburner.getCurrentCity().comms,0),o.default.createElement("span",{className:"tooltiptext"},"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"City Chaos: ",s.formatNumber(e.bladeburner.getCurrentCity().chaos),o.default.createElement("span",{className:"tooltiptext"},"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",s.convertTimeMsToTimeElapsedString(e.bladeburner.storedCycles/l.BladeburnerConstants.CyclesPerSecond*1e3),o.default.createElement("br",null),o.default.createElement("span",{className:"tooltiptext"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")),o.default.createElement("p",null,"Skill Points: ",s.formatNumber(e.bladeburner.skillPoints,0)),o.default.createElement("br",null),u.StatsTable([["Aug. Success Chance mult: ",s.formatNumber(100*e.player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",s.formatNumber(100*e.player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",s.formatNumber(100*e.player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",s.formatNumber(100*e.player.bladeburner_analysis_mult,1)+"%"]]),o.default.createElement("br",null),o.default.createElement("a",{onClick:function(){const t="bladeburner-travel-popup";d.createPopup(t,g.TravelPopup,{bladeburner:e.bladeburner,popupId:t})},className:"a-link-button",style:{display:"inline-block"}},"Travel"),o.default.createElement("a",{onClick:function(){const t=h.Factions.Bladeburners;t.isMember?(e.engine.loadFactionContent(),_.displayFactionContent("Bladeburners")):e.bladeburner.rank>=l.BladeburnerConstants.RankNeededForFaction?(_.joinFaction(t),p.dialogBoxCreate("Congratulations! You were accepted into the Bladeburners faction")):p.dialogBoxCreate("You need a rank of 25 to join the Bladeburners Faction!")},className:"a-link-button tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},"Apply to the Bladeburner Faction, or go to the faction page if you are already a member"),"Faction"),o.default.createElement("br",null),o.default.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TerritorySubpage=void 0;const r=a(n(0)),i=n(3),o=n(12),s=n(20),l=n(93);t.TerritorySubpage=function(e){function t(e){const t=100*e;return t<=0?s.formatNumber(0,2):t>=100?s.formatNumber(100,2):s.formatNumber(t,2)}const n=l.AllGangs[e.gang.facName].power,a=Object.keys(l.AllGangs).filter(t=>t!=e.gang.facName);return r.default.createElement("div",{style:{width:"70%"}},r.default.createElement("p",{className:"noselect"},"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.",r.default.createElement("br",null),r.default.createElement("br",null),"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.default.createElement("br",null),r.default.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.",r.default.createElement("br",null),r.default.createElement("br",null),"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.default.createElement("br",null),r.default.createElement("br",null)),r.default.createElement("input",{checked:e.gang.territoryWarfareEngaged,id:"warfare",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.territoryWarfareEngaged=t.target.checked}),r.default.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Engage in Territory Warfare",r.default.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"inline-block"}},"Territory Clash Chance: ",i.numeralWrapper.formatPercentage(e.gang.territoryClashChance,3)),r.default.createElement("div",{className:"help-tip noselect",style:{display:"inline-block"},onClick:function(){o.dialogBoxCreate("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}},"?"),r.default.createElement("br",null),r.default.createElement("input",{checked:e.gang.notifyMemberDeath,id:"notify",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.notifyMemberDeath=t.target.checked}),r.default.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Notify about Gang Member Deaths",r.default.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")),r.default.createElement("br",null),r.default.createElement("fieldset",{style:{display:"block",margin:"6px"}},r.default.createElement("p",null,r.default.createElement("b",null,r.default.createElement("u",null,e.gang.facName)),r.default.createElement("br",null),"Power: ",s.formatNumber(l.AllGangs[e.gang.facName].power,6),r.default.createElement("br",null),"Territory: ",t(l.AllGangs[e.gang.facName].territory),"%",r.default.createElement("br",null),r.default.createElement("br",null),a.map(e=>(function(e){const a=l.AllGangs[e].power,o=n/(a+n);return r.default.createElement("span",{key:e},r.default.createElement("u",null,e),r.default.createElement("br",null),"Power: ",s.formatNumber(a,6),r.default.createElement("br",null),"Territory: ",t(l.AllGangs[e].territory),"%",r.default.createElement("br",null),"Chance to win clash with this gang: ",i.numeralWrapper.formatPercentage(o,3),r.default.createElement("br",null),r.default.createElement("br",null))})(e)))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RecruitPopup=void 0;const o=i(n(0)),s=n(79),l=n(12);t.RecruitPopup=function(e){const[t,n]=o.useState("");function a(){""!==t?e.gang.canRecruitMember()?e.gang.recruitMember(t)?(e.onRecruit(),s.removePopup(e.popupId)):l.dialogBoxCreate("You already have a gang member with this name!"):l.dialogBoxCreate("You cannot recruit another Gang member!"):l.dialogBoxCreate("You must enter a name for your Gang member!")}function r(){s.removePopup(e.popupId)}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{className:"noselect"},"Enter a name for your new Gang member:"),o.default.createElement("br",null),o.default.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&a(),27===e.keyCode&&r()},onChange:function(e){n(e.target.value)},className:"text-input noselect",type:"text",placeholder:"unique name"}),o.default.createElement("a",{className:"std-button",onClick:a},"Recruit Gang Member"),o.default.createElement("a",{className:"std-button",onClick:r},"Cancel"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RecruitButton=void 0;const r=a(n(0)),i=n(1024),o=n(703),s=n(20),l=n(79);t.RecruitButton=function(e){if(e.gang.members.length>=o.GangConstants.MaximumGangMembers)return r.default.createElement(r.default.Fragment,null);if(!e.gang.canRecruitMember()){const t=e.gang.getRespectNeededToRecruitMember();return r.default.createElement(r.default.Fragment,null,r.default.createElement("a",{className:"a-link-button-inactive",style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"),r.default.createElement("p",{style:{margin:"10px",color:"red",display:"inline-block"}},s.formatNumber(t,2)," respect needed to recruit next member"))}return r.default.createElement(r.default.Fragment,null,r.default.createElement("a",{className:"a-link-button",onClick:function(){const t="recruit-gang-member-popup";l.createPopup(t,i.RecruitPopup,{gang:e.gang,popupId:t,onRecruit:e.onRecruit})},style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDescription=void 0;const r=a(n(0)),i=n(300);t.TaskDescription=function(e){const t=i.GangMemberTasks[e.member.task],n=t?t.desc:i.GangMemberTasks.Unassigned.desc;return r.default.createElement("p",{className:"inline noselect",dangerouslySetInnerHTML:{__html:n}})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskSelector=void 0;const o=i(n(0)),s=n(3),l=n(286),c=n(125);t.TaskSelector=function(e){const[t,n]=o.useState(e.member.task),a=e.gang.getAllTaskNames(),r=[["Money:",c.MoneyRate(5*e.member.calculateMoneyGain(e.gang))],["Respect:",`${s.numeralWrapper.formatRespect(5*e.member.calculateRespectGain(e.gang))} / sec`],["Wanted Level:",`${s.numeralWrapper.formatWanted(5*e.member.calculateWantedLevelGain(e.gang))} / sec`],["Total Respect:",`${s.numeralWrapper.formatRespect(e.member.earnedRespect)}`]];return o.default.createElement(o.default.Fragment,null,o.default.createElement("select",{onChange:function(t){const a=t.target.value;e.member.assignToTask(a),n(a),e.onTaskChange()},className:"dropdown noselect",value:t},o.default.createElement("option",{key:0,value:"---"},"---"),a.map((e,t)=>o.default.createElement("option",{key:t+1,value:e},e))),o.default.createElement("div",null,l.StatsTable(r)))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AscensionPopup=void 0;const o=i(n(0)),s=n(3),l=n(79),c=n(12);t.AscensionPopup=function(e){const t=o.useState(!1)[1];o.useEffect(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const n=e.member.getAscensionResults();return o.default.createElement(o.default.Fragment,null,o.default.createElement("pre",null,"Are you sure you want to ascend this member? They will lose all of",o.default.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",o.default.createElement("br",null),o.default.createElement("br",null),"Furthermore, your gang will lose ",s.numeralWrapper.formatRespect(e.member.earnedRespect)," respect",o.default.createElement("br",null),o.default.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",o.default.createElement("br",null),"Hacking: x",s.numeralWrapper.format(n.hack,"0.000"),o.default.createElement("br",null),"Strength: x",s.numeralWrapper.format(n.str,"0.000"),o.default.createElement("br",null),"Defense: x",s.numeralWrapper.format(n.def,"0.000"),o.default.createElement("br",null),"Dexterity: x",s.numeralWrapper.format(n.dex,"0.000"),o.default.createElement("br",null),"Agility: x",s.numeralWrapper.format(n.agi,"0.000"),o.default.createElement("br",null),"Charisma: x",s.numeralWrapper.format(n.cha,"0.000"),o.default.createElement("br",null)),o.default.createElement("button",{className:"std-button",onClick:function(){e.onAscend();const t=e.gang.ascendMember(e.member);c.dialogBoxCreate(o.default.createElement("p",null,"You ascended ",e.member.name,"!",o.default.createElement("br",null),o.default.createElement("br",null),"Your gang lost ",s.numeralWrapper.formatRespect(t.respect)," respect.",o.default.createElement("br",null),o.default.createElement("br",null),e.member.name," gained the following stat multipliers for ascending:",o.default.createElement("br",null),"Hacking: x",s.numeralWrapper.format(t.hack,"0.000"),o.default.createElement("br",null),"Strength: x",s.numeralWrapper.format(t.str,"0.000"),o.default.createElement("br",null),"Defense: x",s.numeralWrapper.format(t.def,"0.000"),o.default.createElement("br",null),"Dexterity: x",s.numeralWrapper.format(t.dex,"0.000"),o.default.createElement("br",null),"Agility: x",s.numeralWrapper.format(t.agi,"0.000"),o.default.createElement("br",null),"Charisma: x",s.numeralWrapper.format(t.cha,"0.000"),o.default.createElement("br",null))),l.removePopup(e.popupId)}},"Ascend"),o.default.createElement("button",{className:"std-button",onClick:function(){l.removePopup(e.popupId)}},"Cancel"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberStats=void 0;const r=a(n(0)),i=n(12),o=n(20),s=n(3),l=n(79),c=n(1028);t.GangMemberStats=function(e){const t={hack:e.member.calculateAscensionMult(e.member.hack_asc_points),str:e.member.calculateAscensionMult(e.member.str_asc_points),def:e.member.calculateAscensionMult(e.member.def_asc_points),dex:e.member.calculateAscensionMult(e.member.dex_asc_points),agi:e.member.calculateAscensionMult(e.member.agi_asc_points),cha:e.member.calculateAscensionMult(e.member.cha_asc_points)};return r.default.createElement(r.default.Fragment,null,r.default.createElement("span",{className:"tooltiptext smallfont"},"Hk: x",s.numeralWrapper.formatMultiplier(e.member.hack_mult*t.hack),"(x",s.numeralWrapper.formatMultiplier(e.member.hack_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.hack)," Asc)",r.default.createElement("br",null),"St: x",s.numeralWrapper.formatMultiplier(e.member.str_mult*t.str),"(x",s.numeralWrapper.formatMultiplier(e.member.str_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.str)," Asc)",r.default.createElement("br",null),"Df: x",s.numeralWrapper.formatMultiplier(e.member.def_mult*t.def),"(x",s.numeralWrapper.formatMultiplier(e.member.def_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.def)," Asc)",r.default.createElement("br",null),"Dx: x",s.numeralWrapper.formatMultiplier(e.member.dex_mult*t.dex),"(x",s.numeralWrapper.formatMultiplier(e.member.dex_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.dex)," Asc)",r.default.createElement("br",null),"Ag: x",s.numeralWrapper.formatMultiplier(e.member.agi_mult*t.agi),"(x",s.numeralWrapper.formatMultiplier(e.member.agi_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.agi)," Asc)",r.default.createElement("br",null),"Ch: x",s.numeralWrapper.formatMultiplier(e.member.cha_mult*t.cha),"(x",s.numeralWrapper.formatMultiplier(e.member.cha_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.cha)," Asc)"),r.default.createElement("pre",null,"Hacking: ",o.formatNumber(e.member.hack,0)," (",s.numeralWrapper.formatExp(e.member.hack_exp)," exp)",r.default.createElement("br",null),"Strength: ",o.formatNumber(e.member.str,0)," (",s.numeralWrapper.formatExp(e.member.str_exp)," exp)",r.default.createElement("br",null),"Defense: ",o.formatNumber(e.member.def,0)," (",s.numeralWrapper.formatExp(e.member.def_exp)," exp)",r.default.createElement("br",null),"Dexterity: ",o.formatNumber(e.member.dex,0)," (",s.numeralWrapper.formatExp(e.member.dex_exp)," exp)",r.default.createElement("br",null),"Agility: ",o.formatNumber(e.member.agi,0)," (",s.numeralWrapper.formatExp(e.member.agi_exp)," exp)",r.default.createElement("br",null),"Charisma: ",o.formatNumber(e.member.cha,0)," (",s.numeralWrapper.formatExp(e.member.cha_exp)," exp)",r.default.createElement("br",null)),r.default.createElement("br",null),e.member.canAscend()&&r.default.createElement(r.default.Fragment,null,r.default.createElement("button",{className:"accordion-button noselect",onClick:function(){const t=`gang-management-ascend-member ${e.member.name}`;l.createPopup(t,c.AscensionPopup,{member:e.member,gang:e.gang,popupId:t,onAscend:e.onAscend})}},"Ascend"),r.default.createElement("div",{className:"help-tip noselect",style:{marginTop:"5px"},onClick:function(){i.dialogBoxCreate(r.default.createElement(r.default.Fragment,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.default.createElement("br",null),r.default.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.default.createElement("br",null),r.default.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))}},"?")))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberAccordionContent=void 0;const o=i(n(0)),s=n(1029),l=n(1027),c=n(1026);t.GangMemberAccordionContent=function(e){const t=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"gang-member-info-div tooltip"},o.default.createElement(s.GangMemberStats,{onAscend:()=>t(e=>!e),gang:e.gang,member:e.member})),o.default.createElement("div",{className:"gang-member-info-div"},o.default.createElement(l.TaskSelector,{onTaskChange:()=>t(e=>!e),gang:e.gang,member:e.member})),o.default.createElement("div",{className:"gang-member-info-div"},o.default.createElement(c.TaskDescription,{member:e.member})))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberAccordion=void 0;const r=a(n(0)),i=n(167),o=n(1030);t.GangMemberAccordion=function(e){return r.default.createElement(i.Accordion,{panelInitiallyOpened:!0,headerContent:r.default.createElement(r.default.Fragment,null,e.member.name),panelContent:r.default.createElement(o.GangMemberAccordionContent,{gang:e.gang,member:e.member})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgradePopup=void 0;const o=i(n(0)),s=n(20),l=n(3),c=n(183),u=n(31),m=n(79),p=n(506);function d(e){const t=o.useState(!1)[1];function n(t,n){return Object.keys(c.GangMemberUpgrades).filter(a=>{const r=c.GangMemberUpgrades[a];return!e.player.money.lt(e.gang.getUpgradeCost(r))&&(r.type===n&&!t.includes(a))}).map(e=>c.GangMemberUpgrades[e])}const a=n(e.member.upgrades,p.UpgradeType.Weapon),r=n(e.member.upgrades,p.UpgradeType.Armor),i=n(e.member.upgrades,p.UpgradeType.Vehicle),l=n(e.member.upgrades,p.UpgradeType.Rootkit),m=n(e.member.augmentations,p.UpgradeType.Augmentation);function d(e){const t=c.GangMemberUpgrades[e];return o.default.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},t.name,o.default.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:t.desc}}))}function h(n,a=!1){return o.default.createElement("a",{key:n.name,className:"a-link-button tooltip",style:{margin:"2px",padding:"2px",display:"block",fontSize:"11px"},onClick:function(){e.member.buyUpgrade(n,e.player,e.gang),t(e=>!e)}},n.name," - ",u.Money(e.gang.getUpgradeCost(n)),o.default.createElement("span",{className:a?"tooltiptextleft":"tooltiptext",dangerouslySetInnerHTML:{__html:n.desc}}))}const _=e.member.calculateAscensionMult(e.member.hack_asc_points),g=e.member.calculateAscensionMult(e.member.str_asc_points),f=e.member.calculateAscensionMult(e.member.def_asc_points),y=e.member.calculateAscensionMult(e.member.dex_asc_points),b=e.member.calculateAscensionMult(e.member.agi_asc_points),E=e.member.calculateAscensionMult(e.member.cha_asc_points);return o.default.createElement("div",{style:{border:"1px solid white"}},o.default.createElement("h1",null,e.member.name,"(",e.member.task,")"),o.default.createElement("pre",{style:{fontSize:"14px",display:"inline-block",width:"20%"}},"Hack: ",e.member.hack," (x",s.formatNumber(e.member.hack_mult*_,2),")",o.default.createElement("br",null),"Str: ",e.member.str," (x",s.formatNumber(e.member.str_mult*g,2),")",o.default.createElement("br",null),"Def: ",e.member.def," (x",s.formatNumber(e.member.def_mult*f,2),")",o.default.createElement("br",null),"Dex: ",e.member.dex," (x",s.formatNumber(e.member.dex_mult*y,2),")",o.default.createElement("br",null),"Agi: ",e.member.agi," (x",s.formatNumber(e.member.agi_mult*b,2),")",o.default.createElement("br",null),"Cha: ",e.member.cha," (x",s.formatNumber(e.member.cha_mult*E,2),")"),o.default.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades: ",e.member.upgrades.map(e=>d(e)),e.member.augmentations.map(e=>d(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Weapons"),a.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Armor"),r.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Vehicles"),i.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Rootkits"),l.map(e=>h(e,!0))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Augmentations"),m.map(e=>h(e,!0))))}t.GangMemberUpgradePopup=function(e){const t=o.useState(!1)[1],[n,a]=o.useState("");function r(t){27===t.keyCode&&m.removePopup(e.popupId)}return o.useEffect(()=>{window.addEventListener("keydown",r);const e=setInterval(()=>t(e=>!e),1e3);return()=>{clearInterval(e),window.removeEventListener("keydown",r)}},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("input",{className:"text-input noselect",value:n,placeholder:"Filter gang member",onChange:e=>a(e.target.value)}),o.default.createElement("p",{className:"tooltip",style:{marginLeft:"6px",display:"inline-block"}},"Discount: -",l.numeralWrapper.formatPercentage(1-1/e.gang.getDiscount()),o.default.createElement("span",{className:"tooltiptext noselect"},"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")),e.gang.members.map(t=>o.default.createElement(d,{key:t.name,player:e.player,gang:e.gang,member:t})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberList=void 0;const o=i(n(0)),s=n(1032),l=n(1031),c=n(79),u=n(1025);t.GangMemberList=function(e){const[t,n]=o.useState(""),a=o.useState(!1)[1],r=e.gang.members.filter(e=>e.name.indexOf(t)>-1||e.task.indexOf(t)>-1);return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.RecruitButton,{onRecruit:()=>a(e=>!e),gang:e.gang}),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input noselect",placeholder:"Filter gang member",style:{margin:"5px",padding:"5px"},value:t,onChange:function(e){n(e.target.value)}}),o.default.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){c.createPopup("gang-upgrade-popup",s.GangMemberUpgradePopup,{gang:e.gang,player:e.player,popupId:"gang-upgrade-popup"})}},"Manage Equipment"),o.default.createElement("ul",null,r.map(t=>o.default.createElement("li",{key:t.name},o.default.createElement(l.GangMemberAccordion,{gang:e.gang,member:t})))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BonusTime=void 0;const o=i(n(0)),s=n(11),l=n(20);t.BonusTime=function(e){const t=1e3/s.CONSTANTS._idleSpeed;if(e.gang.storedCycles/t*1e3<=5e3)return o.createElement(o.Fragment,null);const n=e.gang.storedCycles/t*1e3;return o.createElement(o.Fragment,null,o.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",l.convertTimeMsToTimeElapsedString(n),o.createElement("span",{className:"tooltiptext noselect"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")),o.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangStats=void 0;const r=a(n(0)),i=n(16),o=n(20),s=n(3),l=n(125),c=n(67),u=n(93),m=n(1034);t.GangStats=function(e){const t=100*u.AllGangs[e.gang.facName].territory;let n;return n=t<=0?o.formatNumber(0,2):t>=100?o.formatNumber(100,2):o.formatNumber(t,2),r.default.createElement(r.default.Fragment,null,r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Respect: ",s.numeralWrapper.formatRespect(e.gang.respect)," (",s.numeralWrapper.formatRespect(5*e.gang.respectGainRate)," / sec)",r.default.createElement("span",{className:"tooltiptext"},"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.")),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level: ",s.numeralWrapper.formatWanted(e.gang.wanted)," (",s.numeralWrapper.formatWanted(5*e.gang.wantedGainRate)," / sec)",r.default.createElement("span",{className:"tooltiptext"},"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.")),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level Penalty: -",o.formatNumber(100*(1-e.gang.getWantedPenalty()),2),"%",r.default.createElement("span",{className:"tooltiptext"},"Penalty for respect and money gain rates due to Wanted Level")),r.default.createElement("br",null),r.default.createElement("div",null,r.default.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",l.MoneyRate(5*e.gang.moneyGainRate))),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Territory: ",n,"%",r.default.createElement("span",{className:"tooltiptext"},"The percentage of total territory your Gang controls")),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",c.Reputation(i.Factions[e.gang.facName].playerReputation)),r.default.createElement("br",null),r.default.createElement(m.BonusTime,{gang:e.gang}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagementSubpage=void 0;const r=a(n(0)),i=n(1035),o=n(1033);t.ManagementSubpage=function(e){return r.default.createElement("div",{style:{display:"block"}},r.default.createElement("p",{className:"noselect",style:{width:"70%"}},"This page is used to manage your gang members and get an overview of your gang's stats.",r.default.createElement("br",null),r.default.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",e.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.default.createElement("br",null),r.default.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.default.createElement("br",null),r.default.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.default.createElement("br",null),r.default.createElement(i.GangStats,{gang:e.gang}),r.default.createElement("br",null),r.default.createElement(o.GangMemberList,{gang:e.gang,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=i(n(0)),s=n(1036),l=n(1023),c=n(80);t.Root=function(e){const[t,n]=o.useState(!0),a=o.useState(!1)[1];return o.useEffect(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){e.engine.loadFactionContent(),c.displayFactionContent(e.gang.facName)}},"Back"),o.default.createElement("a",{className:t?"a-link-button-inactive":"a-link-button",style:{display:"inline-block"},onClick:()=>n(!0)},"Gang Management"),o.default.createElement("a",{className:t?"a-link-button":"a-link-button-inactive",style:{display:"inline-block"},onClick:()=>n(!1)},"Gang Territory"),t?o.default.createElement(s.ManagementSubpage,{gang:e.gang,player:e.player}):o.default.createElement(l.TerritorySubpage,{gang:e.gang}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchasedAugmentations=void 0;const o=i(n(0)),s=n(14),l=n(4),c=n(1),u=n(667);t.PurchasedAugmentations=function(){const e=[];let t=-1;for(let e=c.Player.queuedAugmentations.length-1;e>=0;e--)if(c.Player.queuedAugmentations[e].name===l.AugmentationNames.NeuroFluxGovernor){t=e;break}for(let n=0;no.createElement("tr",{key:e[0]},o.createElement("td",{key:"0"},o.createElement("span",null,e[0]," multiplier: ")),o.createElement("td",{key:"1",style:{textAlign:"right"}},l.numeralWrapper.formatPercentage(e[1])),function(e){let t=[];return e&&(t=[o.createElement("td",{key:"2"}," ","=>"," "),o.createElement("td",{key:"3"},l.numeralWrapper.formatPercentage(e))]),t}(e[2])))))}return o.createElement(o.Fragment,null,o.createElement("p",null,o.createElement("strong",null,o.createElement("u",null,"Multipliers:"))),o.createElement("br",null),t([["Hacking Chance ",s.Player.hacking_chance_mult,s.Player.hacking_chance_mult*e.hacking_chance_mult],["Hacking Speed ",s.Player.hacking_speed_mult,s.Player.hacking_speed_mult*e.hacking_speed_mult],["Hacking Money ",s.Player.hacking_money_mult,s.Player.hacking_money_mult*e.hacking_money_mult],["Hacking Growth ",s.Player.hacking_grow_mult,s.Player.hacking_grow_mult*e.hacking_grow_mult]]),o.createElement("br",null),t([["Hacking Level ",s.Player.hacking_mult,s.Player.hacking_mult*e.hacking_mult],["Hacking Experience ",s.Player.hacking_exp_mult,s.Player.hacking_exp_mult*e.hacking_exp_mult]]),o.createElement("br",null),t([["Strength Level ",s.Player.strength_mult,s.Player.strength_mult*e.strength_mult],["Strength Experience ",s.Player.strength_exp_mult,s.Player.strength_exp_mult*e.strength_exp_mult]]),o.createElement("br",null),t([["Defense Level ",s.Player.defense_mult,s.Player.defense_mult*e.defense_mult],["Defense Experience ",s.Player.defense_exp_mult,s.Player.defense_exp_mult*e.defense_exp_mult]]),o.createElement("br",null),t([["Dexterity Level ",s.Player.dexterity_mult,s.Player.dexterity_mult*e.dexterity_mult],["Dexterity Experience ",s.Player.dexterity_exp_mult,s.Player.dexterity_exp_mult*e.dexterity_exp_mult]]),o.createElement("br",null),t([["Agility Level ",s.Player.agility_mult,s.Player.agility_mult*e.agility_mult],["Agility Experience ",s.Player.agility_exp_mult,s.Player.agility_exp_mult*e.agility_exp_mult]]),o.createElement("br",null),t([["Charisma Level ",s.Player.charisma_mult,s.Player.charisma_mult*e.charisma_mult],["Charisma Experience ",s.Player.charisma_exp_mult,s.Player.charisma_exp_mult*e.charisma_exp_mult]]),o.createElement("br",null),t([["Hacknet Node production ",s.Player.hacknet_node_money_mult,s.Player.hacknet_node_money_mult*e.hacknet_node_money_mult],["Hacknet Node purchase cost ",s.Player.hacknet_node_purchase_cost_mult,s.Player.hacknet_node_purchase_cost_mult*e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost ",s.Player.hacknet_node_ram_cost_mult,s.Player.hacknet_node_ram_cost_mult*e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost ",s.Player.hacknet_node_core_cost_mult,s.Player.hacknet_node_core_cost_mult*e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost ",s.Player.hacknet_node_level_cost_mult,s.Player.hacknet_node_level_cost_mult*e.hacknet_node_level_cost_mult]]),o.createElement("br",null),t([["Company reputation gain ",s.Player.company_rep_mult,s.Player.company_rep_mult*e.company_rep_mult],["Faction reputation gain ",s.Player.faction_rep_mult,s.Player.faction_rep_mult*e.faction_rep_mult],["Salary ",s.Player.work_money_mult,s.Player.work_money_mult*e.work_money_mult]]),o.createElement("br",null),t([["Crime success ",s.Player.crime_success_mult,s.Player.crime_success_mult*e.crime_success_mult],["Crime money ",s.Player.crime_money_mult,s.Player.crime_money_mult*e.crime_money_mult]]),o.createElement("br",null),o.createElement(function(){return s.Player.canAccessBladeburner()?o.createElement(o.Fragment,null,t([["Bladeburner Success Chance",s.Player.bladeburner_success_chance_mult,s.Player.bladeburner_success_chance_mult*e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",s.Player.bladeburner_max_stamina_mult,s.Player.bladeburner_max_stamina_mult*e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",s.Player.bladeburner_stamina_gain_mult,s.Player.bladeburner_stamina_gain_mult*e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",s.Player.bladeburner_analysis_mult,s.Player.bladeburner_analysis_mult*e.bladeburner_analysis_mult]]),o.createElement("br",null)):o.createElement(o.Fragment,null)},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFileMinus1=void 0;const o=i(n(0)),s=n(1),l=n(175),c=n(167);t.SourceFileMinus1=function(){const e=s.Player.exploits;return 0===e.length?o.createElement(o.Fragment,null):o.createElement("li",{key:-1},o.createElement(c.Accordion,{headerContent:o.createElement(o.Fragment,null,"Source-File -1: Exploits in the BitNodes",o.createElement("br",null),"Level ",e.length," / ?"),panelContent:o.createElement(o.Fragment,null,o.createElement("p",null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),o.createElement("p",null,"It increases all of the player's multipliers by 0.1%"),o.createElement("br",null),o.createElement("p",null,"You have found the following exploits:"),o.createElement("ul",null,e.map(e=>o.createElement("li",{key:e},"* ",l.ExploitName(e)))))}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFileAccordion=void 0;const o=i(n(0)),s=n(167);t.SourceFileAccordion=function(e){const t=12===e.sf.n?"∞":"3";return o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,e.sf.name,o.createElement("br",null),`Level ${e.level} / ${t}`),panelContent:o.createElement("p",{dangerouslySetInnerHTML:{__html:e.sf.info}})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedSourceFiles=void 0;const o=i(n(0)),s=n(1),l=n(26),c=n(233),u=n(236),m=n(1041);t.OwnedSourceFiles=function(){const e=s.Player.sourceFiles.slice();l.Settings.OwnedAugmentationsOrder===c.OwnedAugmentationsOrderSetting.Alphabetically&&e.sort((e,t)=>e.n-t.n);const t=e.map(e=>{const t="SourceFile"+e.n,n=u.SourceFiles[t];return null==n?(console.error(`Invalid source file number: ${e.n}`),null):o.createElement("li",{key:e.n},o.createElement(m.SourceFileAccordion,{level:e.lvl,sf:n}))});return o.createElement(o.Fragment,null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ListConfiguration=void 0;const o=i(n(0)),s=n(63);t.ListConfiguration=function(e){return o.createElement(o.Fragment,null,o.createElement(s.StdButton,{onClick:e.expandAllButtonsFn,text:"Expand All"}),o.createElement(s.StdButton,{onClick:e.collapseAllButtonsFn,text:"Collapse All"}),o.createElement(s.StdButton,{onClick:e.sortInOrderFn,text:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source-Files in numeral order"}),o.createElement(s.StdButton,{onClick:e.sortByAcquirementTimeFn,text:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationsMetadata=void 0;const a=n(38),r=n(47),i=n(497);t.LocationsMetadata=[{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.LocationName.AevumAeroCorp,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.LocationName.AevumBachmanAndAssociates,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.LocationName.AevumClarkeIncorporated,types:[i.LocationType.Company]},{city:a.CityName.Aevum,costMult:3,expMult:2,name:r.LocationName.AevumCrushFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.LocationName.AevumECorp,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.LocationName.AevumFulcrumTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.LocationName.AevumGalacticCybersystems,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.LocationName.AevumNetLinkTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.LocationName.AevumPolice,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.LocationName.AevumRhoConstruction,types:[i.LocationType.Company]},{city:a.CityName.Aevum,costMult:10,expMult:5,name:r.LocationName.AevumSnapFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Aevum,costMult:4,expMult:3,name:r.LocationName.AevumSummitUniversity,types:[i.LocationType.University]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.LocationName.AevumWatchdogSecurity,types:[i.LocationType.Company]},{city:a.CityName.Aevum,name:r.LocationName.AevumCasino,types:[i.LocationType.Casino]},{city:a.CityName.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.LocationName.ChongqingKuaiGongInternational,types:[i.LocationType.Company]},{city:a.CityName.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.LocationName.ChongqingSolarisSpaceSystems,types:[i.LocationType.Company]},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.LocationName.IshimaNovaMedical,types:[i.LocationType.Company]},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.LocationName.IshimaOmegaSoftware,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.LocationName.IshimaStormTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.LocationName.NewTokyoDefComm,types:[i.LocationType.Company]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.LocationName.NewTokyoGlobalPharmaceuticals,types:[i.LocationType.Company]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.LocationName.NewTokyoNoodleBar,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.LocationName.NewTokyoVitaLife,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.LocationName.Sector12AlphaEnterprises,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.LocationName.Sector12BladeIndustries,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12CIA,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.LocationName.Sector12CarmichaelSecurity,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12CityHall,types:[i.LocationType.Special]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.LocationName.Sector12DeltaOne,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12FoodNStuff,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.LocationName.Sector12FourSigma,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.LocationName.Sector12IcarusMicrosystems,types:[i.LocationType.Company]},{city:a.CityName.Sector12,expMult:1,costMult:1,name:r.LocationName.Sector12IronGym,types:[i.LocationType.Gym]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.LocationName.Sector12JoesGuns,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.LocationName.Sector12MegaCorp,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12NSA,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.Sector12,costMult:20,expMult:10,name:r.LocationName.Sector12PowerhouseGym,types:[i.LocationType.Gym]},{city:a.CityName.Sector12,costMult:3,expMult:2,name:r.LocationName.Sector12RothmanUniversity,types:[i.LocationType.University]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.LocationName.Sector12UniversalEnergy,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.LocationName.VolhavenCompuTek,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.LocationName.VolhavenHeliosLabs,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.LocationName.VolhavenLexoCorp,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,costMult:7,expMult:4,name:r.LocationName.VolhavenMilleniumFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.LocationName.VolhavenNWO,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.LocationName.VolhavenOmniTekIncorporated,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.LocationName.VolhavenOmniaCybersystems,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.LocationName.VolhavenSysCoreSecurities,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,costMult:5,expMult:4,name:r.LocationName.VolhavenZBInstituteOfTechnology,types:[i.LocationType.University]},{city:null,name:r.LocationName.Hospital,types:[i.LocationType.Hospital]},{city:null,name:r.LocationName.Slums,types:[i.LocationType.Slums]},{city:null,name:r.LocationName.TravelAgency,types:[i.LocationType.TravelAgency]},{city:null,name:r.LocationName.WorldStockExchange,types:[i.LocationType.StockMarket]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Location=void 0;const a=n(47);t.Location=class{constructor(e){this.city=null,this.costMult=0,this.expMult=0,this.name=a.LocationName.Void,this.types=[],this.techVendorMaxRam=0,this.techVendorMinRam=0,e.city&&(this.city=e.city),e.costMult&&(this.costMult=e.costMult),e.expMult&&(this.expMult=e.expMult),e.infiltrationData&&(this.infiltrationData=e.infiltrationData),e.name&&(this.name=e.name),e.types&&(this.types=e.types),e.techVendorMaxRam&&(this.techVendorMaxRam=e.techVendorMaxRam),e.techVendorMinRam&&(this.techVendorMinRam=e.techVendorMinRam)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=void 0;t.City=class{constructor(e,t=[],n=""){this.name=e,this.locations=t,this.asciiArt=n}addLocation(e){this.locations.push(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFile=void 0;const a=n(133);t.SourceFile=class{constructor(e,t=""){this.lvl=1,this.owned=!1;const n="BitNode"+e,r=a.BitNodes[n];if(null==r)throw new Error("Invalid Bit Node for this Source File");this.n=e,this.name=`Source-File ${e}: ${r.name}`,this.info=t}}},,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=void 0;const o=i(n(0)),s=n(507),l={border:"1px solid red",display:"inline-block",margin:"4px",padding:"4px"};t.ErrorBoundary=class extends o.Component{constructor(e){super(e),this.state={errorInfo:"",hasError:!1}}componentDidCatch(e,t){console.error("Caught error in React ErrorBoundary. Component stack:"),console.error(t.componentStack)}componentDidMount(){const e=()=>{this.setState({hasError:!1})};this.hasEventEmitter()&&this.props.eventEmitterForReset.addSubscriber({cb:e,id:this.props.id})}componentWillUnmount(){this.hasEventEmitter()&&this.props.eventEmitterForReset.removeSubscriber(this.props.id)}hasEventEmitter(){return null!=this.props.eventEmitterForReset&&this.props.eventEmitterForReset instanceof s.EventEmitter&&null!=this.props.id&&"string"==typeof this.props.id}render(){return this.state.hasError?o.createElement("div",{style:l},o.createElement("p",null,"Error rendering UI. This is (probably) a bug. Please report to game developer."),o.createElement("p",null,"In the meantime, try refreshing the game WITHOUT saving."),o.createElement("p",null,`Error info: ${this.state.errorInfo}`)):this.props.children}static getDerivedStateFromError(e){return{errorInfo:e.message,hasError:!0}}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickersConfig=t.TickerDisplayMode=void 0;const o=i(n(0)),s=n(63);var l;!function(e){e[e.AllStocks=0]="AllStocks",e[e.Portfolio=1]="Portfolio"}(l=t.TickerDisplayMode||(t.TickerDisplayMode={}));t.StockTickersConfig=class extends o.Component{constructor(e){super(e)}renderDisplayModeButton(){let e="",t="";return this.props.tickerDisplayMode===l.Portfolio?(e="Switch to 'All Stocks' Mode",t="Displays all stocks on the WSE"):(e="Switch to 'Portfolio' Mode",t="Displays only the stocks for which you have shares or orders"),o.createElement(s.StdButton,{onClick:this.props.changeDisplayMode,text:e,tooltip:t})}render(){return o.createElement("div",null,this.renderDisplayModeButton(),o.createElement(s.StdButton,{onClick:this.props.expandAllTickers,text:"Expand Tickers"}),o.createElement(s.StdButton,{onClick:this.props.collapseAllTickers,text:"Collapse Tickers"}),o.createElement("input",{className:"text-input",id:"stock-market-watchlist-filter",onChange:this.props.changeWatchlistFilter,placeholder:"Filter Stocks by symbol (comma-separated list)",type:"text"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerTxButton=void 0;const o=i(n(0));t.StockTickerTxButton=function(e){let t="stock-market-input std-button";return null!=e.tooltip&&(t+=" tooltip"),o.createElement("button",{className:t,onClick:e.onClick},e.text,null!=e.tooltip&&o.createElement("span",{className:"tooltiptext"},e.tooltip))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerPositionText=void 0;const o=i(n(0)),s=n(3),l=n(31),c=n(43),u={display:"block"};t.StockTickerPositionText=class extends o.Component{renderLongPosition(){const e=this.props.stock,t=e.playerShares*e.playerAvgPx,n=(e.getBidPrice()-e.playerAvgPx)*e.playerShares;let a=n/t;return isNaN(a)&&(a=0),o.createElement("div",null,o.createElement("h3",{className:"tooltip"},"Long Position:",o.createElement("span",{className:"tooltiptext"},"Shares in the long position will increase in value if the price of the corresponding stock increases")),o.createElement("br",null),o.createElement("p",null,"Shares: ",s.numeralWrapper.formatShares(e.playerShares)),o.createElement("br",null),o.createElement("p",null,"Average Price: ",l.Money(e.playerAvgPx)," (Total Cost: ",l.Money(t),")"),o.createElement("br",null),o.createElement("p",null,"Profit: ",l.Money(n)," (",s.numeralWrapper.formatPercentage(a),")"),o.createElement("br",null))}renderShortPosition(){const e=this.props.stock,t=e.playerShortShares*e.playerAvgShortPx,n=(e.playerAvgShortPx-e.getAskPrice())*e.playerShortShares;let a=n/t;return isNaN(a)&&(a=0),8===this.props.p.bitNodeN||c.SourceFileFlags[8]>=2?o.createElement("div",null,o.createElement("h3",{className:"tooltip"},"Short Position:",o.createElement("span",{className:"tooltiptext"},"Shares in the short position will increase in value if the price of the corresponding stock decreases")),o.createElement("br",null),o.createElement("p",null,"Shares: ",s.numeralWrapper.formatShares(e.playerShortShares)),o.createElement("br",null),o.createElement("p",null,"Average Price: ",l.Money(e.playerAvgShortPx)," (Total Cost: ",l.Money(t),")"),o.createElement("br",null),o.createElement("p",null,"Profit: ",l.Money(n)," (",s.numeralWrapper.formatPercentage(a),")"),o.createElement("br",null)):null}render(){const e=this.props.stock;return o.createElement("div",{className:"stock-market-position-text"},o.createElement("p",{style:u},"Max Shares: ",s.numeralWrapper.formatShares(e.maxShares)),o.createElement("p",{className:"tooltip"},"Ask Price: ",l.Money(e.getAskPrice()),o.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Bid Price: ",l.Money(e.getBidPrice()),o.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),this.renderLongPosition(),this.renderShortPosition())}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerOrder=void 0;const o=i(n(0)),s=n(103),l=n(3),c=n(31);t.StockTickerOrder=class extends o.Component{constructor(e){super(e),this.handleCancelOrderClick=this.handleCancelOrderClick.bind(this)}handleCancelOrderClick(){this.props.cancelOrder({order:this.props.order})}render(){const e=this.props.order,t=e.pos===s.PositionTypes.Long?"Long Position":"Short Position",n=o.createElement(o.Fragment,null,e.type," - ",t," - ",l.numeralWrapper.formatShares(e.shares)," @ ",c.Money(e.price));return o.createElement("li",null,n,o.createElement("button",{className:"std-button stock-market-order-cancel-btn",onClick:this.handleCancelOrderClick},"Cancel Order"))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerOrderList=void 0;const o=i(n(0)),s=n(1065);t.StockTickerOrderList=class extends o.Component{render(){const e=[];for(let t=0;tt.price&&(p.color="red"),o.createElement("pre",{style:p},m)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTicker=void 0;const o=i(n(0)),s=n(1068),l=n(1066),c=n(1064),u=n(1063),m=n(304),p=n(115),d=n(103),h=n(43),_=n(3),g=n(167),f=n(31),y=n(12),b=n(54);var E;!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(E||(E={}));t.StockTicker=class extends o.Component{constructor(e){super(e),this.state={orderType:E.Market,position:d.PositionTypes.Long,qty:""},this.getBuyTransactionCostContent=this.getBuyTransactionCostContent.bind(this),this.getSellTransactionCostContent=this.getSellTransactionCostContent.bind(this),this.handleBuyButtonClick=this.handleBuyButtonClick.bind(this),this.handleBuyMaxButtonClick=this.handleBuyMaxButtonClick.bind(this),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.handleOrderTypeChange=this.handleOrderTypeChange.bind(this),this.handlePositionTypeChange=this.handlePositionTypeChange.bind(this),this.handleQuantityChange=this.handleQuantityChange.bind(this),this.handleSellButtonClick=this.handleSellButtonClick.bind(this),this.handleSellAllButtonClick=this.handleSellAllButtonClick.bind(this)}createPlaceOrderPopupBox(e,t,n){const a=b.yesNoTxtInpBoxGetYesButton(),r=b.yesNoTxtInpBoxGetNoButton();a.innerText=e,a.addEventListener("click",()=>{const e=parseFloat(b.yesNoTxtInpBoxGetInput());if(isNaN(e))return y.dialogBoxCreate(`Invalid input for price: ${b.yesNoTxtInpBoxGetInput()}`),!1;n(e),b.yesNoTxtInpBoxClose()}),r.innerText="Cancel Order",r.addEventListener("click",()=>{b.yesNoTxtInpBoxClose()}),b.yesNoTxtInpBoxCreate(t)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const n=m.getBuyTransactionCost(e,t,this.state.position);return null==n?null:o.createElement(o.Fragment,null,"Purchasing ",_.numeralWrapper.formatShares(t)," shares (",this.state.position===d.PositionTypes.Long?"Long":"Short",") will cost ",f.Money(n),".")}getQuantity(){return Math.round(parseFloat(this.state.qty))}getSellTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;if(this.state.position===d.PositionTypes.Long){if(t>e.playerShares)return o.createElement(o.Fragment,null,"You do not have this many shares in the Long position")}else if(t>e.playerShortShares)return o.createElement(o.Fragment,null,"You do not have this many shares in the Short position");const n=m.getSellTransactionGain(e,t,this.state.position);return null==n?null:o.createElement(o.Fragment,null,"Selling ",_.numeralWrapper.formatShares(t)," shares (",this.state.position===d.PositionTypes.Long?"Long":"Short",") will result in a gain of ",f.Money(n),".")}handleBuyButtonClick(){const e=this.getQuantity();if(isNaN(e))y.dialogBoxCreate(`Invalid input for quantity (number of shares): ${this.state.qty}`);else switch(this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case E.Limit:this.createPlaceOrderPopupBox("Place Buy Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.LimitBuy,this.state.position)});break;case E.Stop:this.createPlaceOrderPopupBox("Place Buy Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.StopBuy,this.state.position)})}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let n=m.calculateBuyMaxAmount(t,this.state.position,e);switch(n=Math.min(n,Math.round(t.maxShares-t.playerShares-t.playerShortShares)),this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.buyStockShort(t,n):this.props.buyStockLong(t,n),this.props.rerenderAllTickers();break;default:y.dialogBoxCreate("ERROR: 'Buy Max' only works for Market Orders")}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const n=t.nextElementSibling;"block"===n.style.display?n.style.display="none":n.style.display="block"}handleOrderTypeChange(e){switch(e.target.value){case E.Limit:this.setState({orderType:E.Limit});break;case E.Stop:this.setState({orderType:E.Stop});break;case E.Market:default:this.setState({orderType:E.Market})}}handlePositionTypeChange(e){e.target.value===d.PositionTypes.Short?this.setState({position:d.PositionTypes.Short}):this.setState({position:d.PositionTypes.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))y.dialogBoxCreate(`Invalid input for quantity (number of shares): ${this.state.qty}`);else switch(this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case E.Limit:this.createPlaceOrderPopupBox("Place Sell Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.LimitSell,this.state.position)});break;case E.Stop:this.createPlaceOrderPopupBox("Place Sell Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.StopSell,this.state.position)})}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:y.dialogBoxCreate("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||h.SourceFileFlags[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||h.SourceFileFlags[8]>=2}render(){return o.createElement("li",null,o.createElement(g.Accordion,{headerContent:o.createElement(s.StockTickerHeaderText,{p:this.props.p,stock:this.props.stock}),panelContent:o.createElement("div",null,o.createElement("input",{className:"stock-market-input",onChange:this.handleQuantityChange,placeholder:"Quantity (Shares)",value:this.state.qty}),o.createElement("select",{className:"stock-market-input dropdown",onChange:this.handlePositionTypeChange,value:this.state.position},o.createElement("option",{value:d.PositionTypes.Long},"Long"),this.hasShortAccess()&&o.createElement("option",{value:d.PositionTypes.Short},"Short")),o.createElement("select",{className:"stock-market-input dropdown",onChange:this.handleOrderTypeChange,value:this.state.orderType},o.createElement("option",{value:E.Market},E.Market),this.hasOrderAccess()&&o.createElement("option",{value:E.Limit},E.Limit),this.hasOrderAccess()&&o.createElement("option",{value:E.Stop},E.Stop)),o.createElement(u.StockTickerTxButton,{onClick:this.handleBuyButtonClick,text:"Buy",tooltip:this.getBuyTransactionCostContent()}),o.createElement(u.StockTickerTxButton,{onClick:this.handleSellButtonClick,text:"Sell",tooltip:this.getSellTransactionCostContent()}),o.createElement(u.StockTickerTxButton,{onClick:this.handleBuyMaxButtonClick,text:"Buy MAX"}),o.createElement(u.StockTickerTxButton,{onClick:this.handleSellAllButtonClick,text:"Sell ALL"}),o.createElement(c.StockTickerPositionText,{p:this.props.p,stock:this.props.stock}),o.createElement(l.StockTickerOrderList,{cancelOrder:this.props.cancelOrder,orders:this.props.orders,p:this.props.p,stock:this.props.stock}))}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickers=void 0;const o=i(n(0)),s=n(1069),l=n(1062),c=n(199),u=n(1061);t.StockTickers=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1,tickerDisplayMode:l.TickerDisplayMode.AllStocks,watchlistFilter:"",watchlistSymbols:[]},this.changeDisplayMode=this.changeDisplayMode.bind(this),this.changeWatchlistFilter=this.changeWatchlistFilter.bind(this),this.collapseAllTickers=this.collapseAllTickers.bind(this),this.expandAllTickers=this.expandAllTickers.bind(this),this.rerender=this.rerender.bind(this),this.listRef=o.createRef()}changeDisplayMode(){this.state.tickerDisplayMode===l.TickerDisplayMode.AllStocks?this.setState({tickerDisplayMode:l.TickerDisplayMode.Portfolio}):this.setState({tickerDisplayMode:l.TickerDisplayMode.AllStocks})}changeWatchlistFilter(e){const t=e.target.value,n=t.replace(/\s/g,"");this.setState({watchlistFilter:t}),""!==n?this.setState({watchlistSymbols:n.split(",")}):this.setState({watchlistSymbols:[]})}collapseAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}render(){const e=[];for(const t in this.props.stockMarket){const n=this.props.stockMarket[t];if(n instanceof c.Stock){if(this.state.watchlistSymbols.length>0&&!this.state.watchlistSymbols.includes(n.symbol))continue;let t=this.props.stockMarket.Orders[n.symbol];if(null==t&&(t=[]),this.state.tickerDisplayMode===l.TickerDisplayMode.Portfolio&&0===n.playerShares&&0===n.playerShortShares&&0===t.length)continue;e.push(o.createElement(s.StockTicker,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,key:n.symbol,orders:t,p:this.props.p,placeOrder:this.props.placeOrder,rerenderAllTickers:this.rerender,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stock:n}))}}const t={eventEmitterForReset:this.props.eventEmitterForReset,id:"StockTickersErrorBoundary"};return o.createElement(u.ErrorBoundary,Object.assign({},t),o.createElement(l.StockTickersConfig,{changeDisplayMode:this.changeDisplayMode,changeWatchlistFilter:this.changeWatchlistFilter,collapseAllTickers:this.collapseAllTickers,expandAllTickers:this.expandAllTickers,tickerDisplayMode:this.state.tickerDisplayMode}),o.createElement("ul",{id:"stock-market-list",ref:this.listRef},e))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InfoAndPurchases=void 0;const o=i(n(0)),s=n(255),l=n(11),c=n(63),u=n(672),m=n(31),p=n(12),d={display:"block"};t.InfoAndPurchases=class extends o.Component{constructor(e){super(e),this.handleClick4SMarketDataHelpTip=this.handleClick4SMarketDataHelpTip.bind(this),this.purchaseWseAccount=this.purchaseWseAccount.bind(this),this.purchaseTixApiAccess=this.purchaseTixApiAccess.bind(this),this.purchase4SMarketData=this.purchase4SMarketData.bind(this),this.purchase4SMarketDataTixApiAccess=this.purchase4SMarketDataTixApiAccess.bind(this)}handleClick4SMarketDataHelpTip(){p.dialogBoxCreate("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility

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.

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

A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change.")}purchaseWseAccount(){if(this.props.p.hasWseAccount)return;if(!this.props.p.canAfford(l.CONSTANTS.WSEAccountCost))return;this.props.p.hasWseAccount=!0,this.props.initStockMarket(),this.props.p.loseMoney(l.CONSTANTS.WSEAccountCost),this.props.rerender();const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}purchaseTixApiAccess(){this.props.p.hasTixApiAccess||this.props.p.canAfford(l.CONSTANTS.TIXAPICost)&&(this.props.p.hasTixApiAccess=!0,this.props.p.loseMoney(l.CONSTANTS.TIXAPICost),this.props.rerender())}purchase4SMarketData(){this.props.p.has4SData||this.props.p.canAfford(s.getStockMarket4SDataCost())&&(this.props.p.has4SData=!0,this.props.p.loseMoney(s.getStockMarket4SDataCost()),this.props.rerender())}purchase4SMarketDataTixApiAccess(){this.props.p.has4SDataTixApi||this.props.p.canAfford(s.getStockMarket4STixApiCost())&&(this.props.p.has4SDataTixApi=!0,this.props.p.loseMoney(s.getStockMarket4STixApiCost()),this.props.rerender())}renderPurchaseWseAccountButton(){if(this.props.p.hasWseAccount)return o.createElement(u.StdButtonPurchased,{text:"WSE Account - Purchased"});{const e=l.CONSTANTS.WSEAccountCost;return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e),onClick:this.purchaseWseAccount,text:o.createElement(o.Fragment,null,"Buy WSE Account - ",m.Money(e))})}}renderPurchaseTixApiAccessButton(){if(this.props.p.hasTixApiAccess)return o.createElement(u.StdButtonPurchased,{text:"TIX API Access - Purchased"});{const e=l.CONSTANTS.TIXAPICost;return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchaseTixApiAccess,style:d,text:o.createElement(o.Fragment,null,"Buy Trade Information eXchange (TIX) API Access - ",m.Money(e))})}}renderPurchase4SMarketDataButton(){if(this.props.p.has4SData)return o.createElement(u.StdButtonPurchased,{text:"4S Market Data - Purchased",tooltip:"Lets you view additional pricing and volatility information about stocks"});{const e=s.getStockMarket4SDataCost();return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchase4SMarketData,text:o.createElement(o.Fragment,null,"Buy 4S Market Data Access - ",m.Money(e)),tooltip:"Lets you view additional pricing and volatility information about stocks"})}}renderPurchase4SMarketDataTixApiAccessButton(){if(this.props.p.hasTixApiAccess){if(this.props.p.has4SDataTixApi)return o.createElement(u.StdButtonPurchased,{text:"4S Market Data TIX API - Purchased",tooltip:"Let you access 4S Market Data through Netscript"});{const e=s.getStockMarket4STixApiCost();return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e),onClick:this.purchase4SMarketDataTixApiAccess,text:o.createElement(o.Fragment,null,"Buy 4S Market Data TIX API Access - ",m.Money(e)),tooltip:"Let you access 4S Market Data through Netscript"})}}return o.createElement(c.StdButton,{disabled:!0,text:"Buy 4S Market Data TIX API Access",tooltip:"Requires TIX API Access"})}render(){return o.createElement("div",{className:"stock-market-info-and-purchases"},o.createElement("p",null,"Welcome to the World Stock Exchange (WSE)!"),o.createElement("button",{className:"std-button"},o.createElement("a",{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia")),o.createElement("br",null),o.createElement("p",null,"To begin trading, you must first purchase an account:"),this.renderPurchaseWseAccountButton(),o.createElement("h2",null,"Trade Information eXchange (TIX) API"),o.createElement("p",null,"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies."),this.renderPurchaseTixApiAccessButton(),o.createElement("h2",null,"Four Sigma (4S) Market Data Feed"),o.createElement("p",null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies."),this.renderPurchase4SMarketDataButton(),o.createElement("button",{className:"help-tip-big",onClick:this.handleClick4SMarketDataHelpTip},"?"),this.renderPurchase4SMarketDataTixApiAccessButton(),o.createElement("p",null,"Commission Fees: Every transaction you make has a ",m.Money(l.CONSTANTS.StockMarketCommission)," commission fee."),o.createElement("br",null),o.createElement("p",null,"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!"))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockMarketRoot=void 0;const o=i(n(0)),s=n(1071),l=n(1070);t.StockMarketRoot=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.rerender=this.rerender.bind(this)}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){return o.createElement("div",null,o.createElement(s.InfoAndPurchases,{initStockMarket:this.props.initStockMarket,p:this.props.p,rerender:this.rerender}),this.props.p.hasWseAccount&&o.createElement(l.StockTickers,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,eventEmitterForReset:this.props.eventEmitterForReset,p:this.props.p,placeOrder:this.props.placeOrder,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stockMarket:this.props.stockMarket}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitStockMetadata=void 0;const a=n(299),r=n(47);t.InitStockMetadata=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.LocationName.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.LocationName.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.LocationName.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.LocationName.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.LocationName.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.LocationName.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.LocationName.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.LocationName.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.LocationName.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.LocationName.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.LocationName.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.LocationName.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.LocationName.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.LocationName.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.LocationName.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.LocationName.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.LocationName.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:a.StockSymbols[r.LocationName.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.LocationName.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.LocationName.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:a.StockSymbols[r.LocationName.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.LocationName.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.LocationName.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:a.StockSymbols[r.LocationName.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.LocationName.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:a.StockSymbols[r.LocationName.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.LocationName.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:a.StockSymbols[r.LocationName.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.LocationName.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.LocationName.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:a.StockSymbols[r.LocationName.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:a.StockSymbols["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:"Joes Guns",otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:a.StockSymbols["Joes Guns"]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:a.StockSymbols["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:a.StockSymbols["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:a.StockSymbols["Titan Laboratories"]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TicksPerCycle=void 0,t.TicksPerCycle=75},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.processOrders=void 0;const o=n(182),s=n(199),l=n(115),c=n(103),u=n(3),m=n(31),p=n(12),d=i(n(0));function h(e,t){const n=t.symbolToStockMap[e.stockSymbol];if(!(n instanceof s.Stock))return void console.error(`Could not find stock for this order: ${e.stockSymbol}`);const a=t.stockMarket.Orders[n.symbol],r={rerenderFn:t.rerenderFn,suppressDialog:!0};let i=!0,h=!1;switch(e.type){case l.OrderTypes.LimitBuy:case l.OrderTypes.StopBuy:h=!0,e.pos===c.PositionTypes.Long?i=o.buyStock(n,e.shares,null,r)&&i:e.pos===c.PositionTypes.Short&&(i=o.shortStock(n,e.shares,null,r)&&i);break;case l.OrderTypes.LimitSell:case l.OrderTypes.StopSell:e.pos===c.PositionTypes.Long?i=o.sellStock(n,e.shares,null,r)&&i:e.pos===c.PositionTypes.Short&&(i=o.sellShort(n,e.shares,null,r)&&i);break;default:return void console.warn(`Invalid order type: ${e.type}`)}const _=e.pos===c.PositionTypes.Long?"Long":"Short";if(i){for(let r=0;r=r.price&&h(r,a);break;case l.OrderTypes.LimitSell:case l.OrderTypes.StopBuy:r.pos===c.PositionTypes.Long&&e.price>=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price<=r.price&&h(r,a);break;case l.OrderTypes.StopSell:r.pos===c.PositionTypes.Long&&e.price<=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price>=r.price&&h(r,a);break;default:return void console.warn(`Invalid order type: ${r.type}`)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Order=void 0;const a=n(115),r=n(103),i=n(27);class o{constructor(e="",t=0,n=0,i=a.OrderTypes.LimitBuy,o=r.PositionTypes.Long){let s=!1;if("number"==typeof t&&"number"==typeof n||(s=!0),(isNaN(t)||isNaN(n))&&(s=!0),"string"!=typeof e&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=e,this.shares=t,this.price=n,this.type=i,this.pos=o}toJSON(){return i.Generic_toJSON("Order",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Order=o,i.Reviver.constructors.Order=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=void 0,t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubdirectories=void 0;const a=n(94);t.getSubdirectories=function(e,t){const n=[];if(!a.isValidDirectoryPath(t))return n;let r=t;function i(e){if("/"===r&&a.isInRootDirectory(e)){const t=a.getFirstParentDirectory(e);"/"===t||n.includes(t)||n.push(t)}else if(e.startsWith(r)){const t=e.slice(r.length),i=a.getFirstParentDirectory(t);"/"===i||n.includes(i)||n.push(i)}}r.endsWith("/")||(r+="/");for(const t of e.scripts)i(t.filename);for(const t of e.textFiles)i(t.fn);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgrade=void 0;const a=n(506),r=n(3);t.GangMemberUpgrade=class{constructor(e="",t=0,n=a.UpgradeType.Weapon,r={}){this.name=e,this.cost=t,this.type=n,this.mults=r,this.desc=this.createDescription()}createDescription(){const e=["Effects:"];return null!=this.mults.str&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.str-1,0)} strength skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.str-1)/4,2)} strength exp`)),null!=this.mults.def&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.def-1,0)} defense skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.def-1)/4,2)} defense exp`)),null!=this.mults.dex&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.dex-1,0)} dexterity skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.dex-1)/4,2)} dexterity exp`)),null!=this.mults.agi&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.agi-1,0)} agility skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.agi-1)/4,2)} agility exp`)),null!=this.mults.cha&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.cha-1,0)} charisma skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.cha-1)/4,2)} charisma exp`)),null!=this.mults.hack&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.hack-1,0)} hacking skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.hack-1)/4,2)} hacking exp`)),e.join("
")}getType(){switch(this.type){case a.UpgradeType.Weapon:return"Weapon";case a.UpgradeType.Armor:return"Armor";case a.UpgradeType.Vehicle:return"Vehicle";case a.UpgradeType.Rootkit:return"Rootkit";case a.UpgradeType.Augmentation:return"Augmentation";default:return""}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMember=void 0;const a=n(702),r=n(300),i=n(183),o=n(93),s=n(27);class l{constructor(e=""){this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_points=0,this.str_asc_points=0,this.def_asc_points=0,this.dex_asc_points=0,this.agi_asc_points=0,this.cha_asc_points=0,this.upgrades=[],this.augmentations=[],this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.GangMemberTasks.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof a.GangMemberTask&&(this.task=this.task.name),r.GangMemberTasks.hasOwnProperty(this.task)?r.GangMemberTasks[this.task]:r.GangMemberTasks.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.respect)/100);if(isNaN(a)||a<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*n*a*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.wanted)/100);if(isNaN(a)||a<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*n*a;const r=7*t.baseWanted/Math.pow(3*n*a,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.money)/100);if(isNaN(a)||a<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*n*a*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.GangMemberTasks.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e,a=this.expMult();this.hack_exp+=t.hackWeight/1500*n*a.hack,this.str_exp+=t.strWeight/1500*n*a.str,this.def_exp+=t.defWeight/1500*n*a.def,this.dex_exp+=t.dexWeight/1500*n*a.dex,this.agi_exp+=t.agiWeight/1500*n*a.agi,this.cha_exp+=t.chaWeight/1500*n*a.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getAscensionResults(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack)/this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points+e.str)/this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points+e.def)/this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex)/this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi)/this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)/this.calculateAscensionMult(this.cha_asc_points)}}ascend(){const e=this.getAscensionResults(),t=this.getGainedAscensionPoints();this.hack_asc_points+=t.hack,this.str_asc_points+=t.str,this.def_asc_points+=t.def,this.dex_asc_points+=t.dex,this.agi_asc_points+=t.agi,this.cha_asc_points+=t.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DarkWebItem=void 0;t.DarkWebItem=class{constructor(e,t,n){this.program=e,this.price=t,this.description=n}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;class a{constructor(e){this.parent=null,this.stopFlag=!1,this.vars={},e instanceof a&&(this.vars=Object.assign({},e.vars)),this.parent=e}lookup(e){let t=this;for(;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null}get(e){if(e in this.vars)return this.vars[e];throw new Error(`Undefined variable ${e}`)}set(e,t){const n=this.lookup(e);return null!==n?n.vars[e]=t:this.vars[e]=t}def(e,t){return this.vars[e]=t}}t.Environment=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidNumber=void 0,t.isValidNumber=function(e){return"number"==typeof e&&!isNaN(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serverMetadata=void 0;const a=n(47),r=n(139);t.serverMetadata=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:a.LocationName.AevumECorp},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:a.LocationName.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:a.LocationName.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[r.LiteratureNames.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:a.LocationName.Sector12BladeIndustries},{hackDifficulty:99,hostname:"nwo",literature:[r.LiteratureNames.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:a.LocationName.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[r.LiteratureNames.BeyondMan,r.LiteratureNames.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:a.LocationName.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[r.LiteratureNames.CodedIntelligence,r.LiteratureNames.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:a.LocationName.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:a.LocationName.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:a.LocationName.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[r.LiteratureNames.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:a.LocationName.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:"Fulcrum Secret Technologies Server"},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:a.LocationName.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:a.LocationName.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[r.LiteratureNames.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:a.LocationName.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:[r.LiteratureNames.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:a.LocationName.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:a.LocationName.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:a.LocationName.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:a.LocationName.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[r.LiteratureNames.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[r.LiteratureNames.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[r.LiteratureNames.AGreenTomorrow,r.LiteratureNames.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:a.LocationName.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:a.LocationName.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:[r.LiteratureNames.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:a.LocationName.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:a.LocationName.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[r.LiteratureNames.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:a.LocationName.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[r.LiteratureNames.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[r.LiteratureNames.AGreenTomorrow,r.LiteratureNames.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:a.LocationName.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:a.LocationName.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[r.LiteratureNames.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:a.LocationName.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:a.LocationName.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:a.LocationName.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:a.LocationName.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:a.LocationName.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:a.LocationName.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[r.LiteratureNames.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:a.LocationName.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:a.LocationName.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[r.LiteratureNames.SecretSocieties,r.LiteratureNames.TheFailedFrontier,r.LiteratureNames.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:a.LocationName.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:a.LocationName.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:a.LocationName.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[r.LiteratureNames.SecretSocieties,r.LiteratureNames.TheFailedFrontier,r.LiteratureNames.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:a.LocationName.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:a.LocationName.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:a.LocationName.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[r.LiteratureNames.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:[r.LiteratureNames.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:a.LocationName.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:a.LocationName.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[r.LiteratureNames.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:a.LocationName.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:a.LocationName.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:a.LocationName.NewTokyoNoodleBar},{hackDifficulty:10,hostname:"foodnstuff",literature:[r.LiteratureNames.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:a.LocationName.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:a.LocationName.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[r.LiteratureNames.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[r.LiteratureNames.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[r.LiteratureNames.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[r.LiteratureNames.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:a.LocationName.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:a.LocationName.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:a.LocationName.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20,specialName:a.LocationName.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:a.LocationName.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:a.LocationName.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[r.LiteratureNames.SimulatedReality,r.LiteratureNames.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"BitRunners Server"},{hackDifficulty:0,hostname:"I.I.I.I",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:"The Black Hand Server"},{hackDifficulty:0,hostname:"avmnite-02h",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:"NiteSec Server"},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"The Dark Army Server"},{hackDifficulty:0,hostname:"CSEC",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:"CyberSec Server"},{hackDifficulty:0,hostname:"The-Cave",literature:[r.LiteratureNames.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:"Daedalus Server"},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:"w0r1d_d43m0n"}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomString=void 0;const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t.createRandomString=function(e){let t="";for(let n=0;nr.default.createElement(r.default.Fragment,null,"Sold for ",o.Money(1e6*e)),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:e=>r.default.createElement(r.default.Fragment,null,"Sold for ",o.Money(1e9*e)," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:e=>r.default.createElement(r.default.Fragment,null,"Improves training by $",20*e,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",e,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",i.numeralWrapper.format(100*e,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",i.numeralWrapper.format(10*e,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:e=>r.default.createElement(r.default.Fragment,null,"Generated ",e," contracts."),value:1}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgrade=void 0;t.HashUpgrade=class{constructor(e){this.costPerLevel=0,this.desc="",this.hasTargetServer=!1,this.name="",this.value=0,this.effectText=(()=>null),null!=e.cost&&(this.cost=e.cost),null!=e.effectText&&(this.effectText=e.effectText),this.costPerLevel=e.costPerLevel,this.desc=e.desc,this.hasTargetServer=!!e.hasTargetServer&&e.hasTargetServer,this.name=e.name,this.value=e.value}getCost(e){return"number"==typeof this.cost?this.cost:Math.round((e+1)*this.costPerLevel)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomByte=void 0;const a=n(36);t.getRandomByte=function(e){const t=Math.max(Math.min(e,255),0);return a.getRandomInt(0,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CodingContractPopup=void 0;const o=i(n(0)),s=n(44),l=n(99),c=n(170),u=n(706);t.CodingContractPopup=function(e){const[t,n]=o.useState(""),a=l.CodingContractTypes[e.c.type],r=[];for(const[t,n]of a.desc(e.c.data).split("\n").entries())r.push(o.default.createElement("span",{key:t,dangerouslySetInnerHTML:{__html:n+"
"}}));return o.default.createElement("div",null,o.default.createElement(c.CopyableText,{value:e.c.type,tag:c.ClickableTag.Tag_h1}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"You are attempting to solve a Coding Contract. You have ",e.c.getMaxNumTries()-e.c.tries," tries remaining, after which the contract will self-destruct."),o.default.createElement("br",null),o.default.createElement("p",null,r),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input",style:{width:"50%",marginTop:"8px"},autoFocus:!0,placeholder:"Enter Solution here",value:t,onChange:function(e){n(e.target.value)},onKeyDown:function(n){const a=n.target.value;n.keyCode===s.KEY.ENTER&&""!==a?(n.preventDefault(),e.onAttempt(t)):n.keyCode===s.KEY.ESC&&(n.preventDefault(),e.onClose())}}),o.default.createElement(u.PopupCloseButton,{popup:e.popupId,onClose:()=>e.onAttempt(t),text:"Solve"}),o.default.createElement(u.PopupCloseButton,{popup:e.popupId,onClose:e.onClose,text:"Close"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codingContractTypesMetadata=void 0;const a=n(36);function r(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function i(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let n=e.toString();n=["[",n,"]"].join(""),t.push(n)}),t.join(",").replace(/\s/g,"")}t.codingContractTypesMetadata=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>a.getRandomInt(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let n=2,a=e;for(;a>(n-1)*(n-1);){for(;a%n==0;)a=Math.round(a/n);++n}return(1===a?n-1:a)===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",`${e.toString()}`].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(5,40),t=[];t.length=e;for(let n=0;n{const n=e.slice();for(let e=1;e["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>a.getRandomInt(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const n=[1];n.length=e+1,n.fill(0,1);for(let t=1;t{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");for(const n of e)t+=`${n.toString()},\n`;return t+=["\nHere is an example of what spiral order should be:","\nExample:","    [\n","        [1, 2, 3],\n","        [4, 5, 6],\n","        [7, 8, 9]\n","    ] should result in [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n","    [\n","        [1, 2, 3, 4]\n","        [5, 6, 7, 8]\n","        [9, 10, 11, 12]\n","    ] should result in [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7"].join(" ")},difficulty:2,gen:()=>{const e=a.getRandomInt(1,15),t=a.getRandomInt(1,15),n=[];n.length=e;for(let a=0;a{const n=[];let a=0,i=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)n[l]=e[a][t],++l;if(++a>i)break;for(let t=a;t<=i;t++)n[l]=e[t][s],++l;if(--s=o;t--)n[l]=e[i][t],++l;if(--i=a;t--)n[l]=e[t][o],++l;if(++o>s)break}const c=r(t).replace(/\s/g,"").split(",");for(let e=0;e["You are given the following array of integers:\n\n",`${e}\n\n`,"Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=a.getRandomInt(3,25),t=[];t.length=e;for(let e=0;e{const n=e.length;let a=0;for(let t=0;a["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=a.getRandomInt(3,20);for(let n=0;n{const n=e.slice();n.sort((e,t)=>e[0]-t[0]);const a=[];let i=n[0][0],s=n[0][1];for(const e of n)e[0]<=s?s=Math.max(s,e[1]):(a.push([i,s]),i=e[0],s=e[1]);a.push([i,s]);const l=o(a),c=t.replace(/\s/g,"");return l===c||l===r(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",`${e}\n\n`,"Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=a.getRandomInt(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const n=[];for(let t=1;t<=3;++t)for(let a=1;a<=3;++a)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(t+a+r+i===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+a),10),l=parseInt(e.substring(t+a,t+a+r),10),c=parseInt(e.substring(t+a+r,t+a+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&n.push(t)}}const a=r(t).replace(/\s/g,"").split(",");if(a.length!==n.length)return!1;for(const e of a)if(!n.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n{let n=0,a=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n{let n=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n{let n=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const t of e)i=Math.max(i,a+t),a=Math.max(a,r-t),r=Math.max(r,n+t),n=Math.max(n,-1*t);return i.toString()===t}},{desc:e=>{return["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" ")},difficulty:8,gen:()=>{const e=a.getRandomInt(2,10),t=a.getRandomInt(3,50),n=[];n.length=t;for(let e=0;e{const n=e[0],a=e[1],r=a.length;if(r<2)return 0===parseInt(t);if(n>r/2){let e=0;for(let t=1;t0;--e)o[e]=Math.max(o[e],i[e]+s),i[e]=Math.max(i[e],o[e-1]-s)}return parseInt(t)===o[n]}},{desc:e=>{return["Given a triangle, find the minimum path sum from top to bottom. In each step","of the path, you may only move to adjacent numbers in the row below.","The triangle is represented as a 2D array of numbers:\n\n",`${function(e){return["[\n",function e(t,n=0){const a=t.length;if(n>=a)return"";let r=[" ".repeat(a-n+1),"[",t[n].toString(),"]"].join("");return n 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=a.getRandomInt(3,12);e.length=t;for(let n=0;n{const n=e.length,a=e[n-1].slice();for(let t=n-2;t>-1;--t)for(let n=0;n{const t=e[0],n=e[1];return["You are in a grid with",`${t} rows and ${n} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${t}, ${n}]`].join(" ")},difficulty:3,gen:()=>{return[a.getRandomInt(2,14),a.getRandomInt(2,14)]},name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1],r=[];r.length=n;for(let e=0;e{let t="";for(const n of e)t+=`${n.toString()},\n`;return["You are located in the top-left corner of the following grid:\n\n",`${t}\n`,"You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=a.getRandomInt(2,12),t=a.getRandomInt(2,12),n=[];n.length=e;for(let a=0;a{const n=[];n.length=e.length;for(let t=0;t0?n[e-1][t]:0)+(t>0?n[e][t-1]:0);return n[n.length-1][n[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",`${e}\n\n`,"remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=a.getRandomInt(6,20),t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let n=1;n{let n=0,a=0;const i=[];for(let t=0;t0?--n:++a);!function e(t,n,a,r,i,o,s){if(i.length!==n)"("===i[n]?(a>0&&e(t,n+1,a-1,r,i,o,s),e(t+1,n+1,a,r,i,o+i[n],s)):")"===i[n]?(r>0&&e(t,n+1,a,r-1,i,o,s),t>0&&e(t-1,n+1,a,r,i,o+i[n],s)):e(t,n+1,a,r,i,o+i[n],s);else if(0===a&&0===r&&0===t){for(let e=0;e{const t=e[0],n=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",`${t}\n\n`,`You are also given a target number of ${n}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${n}]\n\n`,"NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const e=a.getRandomInt(4,12),t=[];t.length=e;for(let e=0;e{const n=e[0],a=e[1];const o=r(t).split(",");for(let e=0;en&&(t=n),this.setState({amt:t})}getPurchaseCost(){if(isNaN(this.state.amt))return 1/0;const e=100-this.props.sleeve.memory;return this.state.amt>e?1/0:this.props.sleeve.getMemoryUpgradeCost(this.state.amt)}purchaseMemory(){const e=this.getPurchaseCost();this.props.p.canAfford(e)&&(this.props.sleeve.upgradeMemory(this.state.amt),this.props.p.loseMoney(e),this.props.rerender())}render(){const e=`sleeve-${this.props.index}-memory-upgrade-input`,t=100-this.props.sleeve.memory,n=this.getPurchaseCost(),a=!this.props.p.canAfford(n);let r;return r=isNaN(this.state.amt)?o.createElement(o.Fragment,null,"Invalid value"):this.state.amt>t?o.createElement(o.Fragment,null,"Memory cannot exceed 100?"):o.createElement(o.Fragment,null,"Purchase ",this.state.amt," memory - ",c.Money(n),"?"),o.createElement("div",null,o.createElement("h2",null,o.createElement("u",null,"Upgrade Memory")),o.createElement("p",null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current: ",s.numeralWrapper.formatSleeveMemory(this.props.sleeve.memory),")"),o.createElement("label",{htmlFor:e},"Amount of memory to purchase (must be an integer):"),o.createElement("input",{className:"text-input",id:e,onChange:this.changePurchaseAmount,type:"number",value:this.state.amt}),o.createElement("br",null),o.createElement(l.StdButton,{disabled:a,onClick:this.purchaseMemory,text:r}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantSleeveUpgrades=void 0;const o=i(n(0)),s=n(1150);t.CovenantSleeveUpgrades=class extends o.Component{render(){return o.createElement("div",{className:"bladeburner-action"},o.createElement("h1",null,"Duplicate Sleeve ",this.props.index),o.createElement(s.CovenantSleeveMemoryUpgrade,Object.assign({},this.props)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantPurchasesRoot=void 0;const o=i(n(0)),s=n(1151),l=n(186),c=n(709),u=n(706),m=n(63),p=n(31),d=n(12);t.CovenantPurchasesRoot=function(e){const[t,n]=o.useState(0);function a(){return(e.p.sleevesFromCovenant+1)*c.BaseCostPerSleeve}function r(){n(t+1)}let i=!1;e.p.canAfford(a())||(i=!0),e.p.sleevesFromCovenant>=c.MaxSleevesFromCovenant&&(i=!0);const h=[];for(let t=0;t=c.MaxSleevesFromCovenant||(e.p.canAfford(a())?(e.p.loseMoney(a()),e.p.sleevesFromCovenant+=1,e.p.sleeves.push(new l.Sleeve(e.p)),r()):d.dialogBoxCreate("You cannot afford to purchase a Duplicate Sleeve",!1))},text:"Purchase"}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes."),h)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;const o=i(n(0)),s=n(63);t.Option=class extends o.Component{render(){return o.createElement("div",{className:"faction-work-div"},o.createElement("div",{className:"faction-work-div-wrapper"},o.createElement(s.StdButton,{onClick:this.props.onClick,text:this.props.buttonText}),o.createElement("p",null,this.props.infoText)))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ParagraphWithTooltip=void 0;const o=i(n(0));t.ParagraphWithTooltip=class extends o.Component{render(){return o.createElement("div",{className:"tooltip",style:this.props.style},o.createElement("p",null,this.props.content),o.createElement("span",{className:"tooltiptext"},this.props.tooltip))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoupdatingParagraph=void 0;const o=i(n(0));t.AutoupdatingParagraph=class extends o.Component{constructor(e){super(e),this.interval=0,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}hasTooltip(){return null==this.props.getTooltip||!!this.props.getTooltip()}tooltip(){return this.props.getTooltip?this.props.getTooltip():o.createElement(o.Fragment,null)}render(){return o.createElement("p",{className:"tooltip",style:this.props.style},this.props.getContent(),this.hasTooltip()&&o.createElement("span",{className:"tooltiptext"},this.tooltip()))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const o=i(n(0)),s=n(1298),l=n(1297),c=n(67),u=n(749),m=n(1296),p={display:"block"},d={display:"block",width:"70%"};t.Info=class extends o.Component{constructor(e){super(e),this.getFavorGainContent=this.getFavorGainContent.bind(this),this.getReputationContent=this.getReputationContent.bind(this)}getFavorGainContent(){const e=this.props.faction.getFavorGain()[0];return o.createElement(o.Fragment,null,"You will earn ",u.Favor(e)," faction favor upon resetting after installing an Augmentation")}getReputationContent(){return o.createElement(o.Fragment,null,"Reputation: ",c.Reputation(this.props.faction.playerReputation))}render(){const e=o.createElement(o.Fragment,null,"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the faction",o.createElement(m.MathComponent,{tex:String.raw`r = \text{total faction reputation}`}),o.createElement(m.MathComponent,{tex:String.raw`\text{favor} = \frac{-\ln(\frac{25500}{r + 25000})}{\ln(\frac{51}{50})}`})),t={__html:this.props.factionInfo.infoText};return o.createElement("div",null,o.createElement("pre",null,o.createElement("i",{className:"text",dangerouslySetInnerHTML:t})),o.createElement("p",{style:p},"-------------------------"),o.createElement(s.AutoupdatingParagraph,{intervalTime:5e3,getContent:this.getReputationContent,getTooltip:this.getFavorGainContent}),o.createElement("p",{style:p},"-------------------------"),o.createElement(l.ParagraphWithTooltip,{content:o.createElement(o.Fragment,null,"Faction Favor: ",u.Favor(this.props.faction.favor)),tooltip:e}),o.createElement("p",{style:p},"-------------------------"),o.createElement("p",{style:d},"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities."))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DonateOption=void 0;const o=i(n(0)),s=n(11),l=n(31),c=n(67),u=n(63),m=n(3),p=n(12),d={margin:"5px",height:"26px"};t.DonateOption=class extends o.Component{constructor(e){super(e),this.blockStyle={display:"block"},this.state={donateAmt:0,status:e.disabled?o.createElement(o.Fragment,null,"Unlocked at ",e.favorToDonate," favor with ",e.faction.name):o.createElement(o.Fragment,null)},this.calculateRepGain=this.calculateRepGain.bind(this),this.donate=this.donate.bind(this),this.handleChange=this.handleChange.bind(this)}calculateRepGain(e){return e/s.CONSTANTS.DonateMoneyToRepDivisor*this.props.p.faction_rep_mult}donate(){const e=this.props.faction,t=this.state.donateAmt;if(isNaN(t)||t<=0)p.dialogBoxCreate("Invalid amount entered!");else if(this.props.p.canAfford(t)){this.props.p.loseMoney(t);const n=this.calculateRepGain(t);this.props.faction.playerReputation+=n,p.dialogBoxCreate(o.createElement(o.Fragment,null,"You just donated ",l.Money(t)," to ",e.name," to gain ",c.Reputation(n)," reputation")),this.props.rerender()}else p.dialogBoxCreate("You cannot afford to donate this much money!")}handleChange(e){const t=m.numeralWrapper.parseMoney(e.target.value);if(isNaN(t))this.setState({donateAmt:0,status:o.createElement(o.Fragment,null,"Invalid donate amount entered!")});else{const e=this.calculateRepGain(t);this.setState({donateAmt:t,status:o.createElement(o.Fragment,null,"This donation will result in ",c.Reputation(e)," reputation gain")})}}render(){return o.createElement("div",{className:"faction-work-div"},o.createElement("div",{className:"faction-work-div-wrapper"},o.createElement("input",{className:"text-input",onChange:this.handleChange,placeholder:"Donation amount",style:d,disabled:this.props.disabled}),o.createElement(u.StdButton,{onClick:this.donate,text:"Donate Money",disabled:this.props.disabled}),o.createElement("p",{style:this.blockStyle},this.state.status)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentation=void 0;const o=i(n(0));t.Augmentation=function(e){return o.createElement("span",{className:"samefont",style:{color:"white"}},e)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchaseableAugmentation=void 0;const o=i(n(0)),s=n(80),l=n(14),c=n(4),u=n(26),m=n(31),p=n(67),d=n(63),h=n(1301),_={margin:"4px",padding:"4px"},g={display:"inline-block"};t.PurchaseableAugmentation=class extends o.Component{constructor(e){super(e);const t=l.Augmentations[this.props.augName];if(null==t)throw new Error(`aug ${this.props.augName} does not exists`);this.aug=t,this.handleClick=this.handleClick.bind(this)}getMoneyCost(){return this.aug.baseCost*this.props.faction.getInfo().augmentationPriceMult}getRepCost(){return this.aug.baseRepRequirement*this.props.faction.getInfo().augmentationRepRequirementMult}handleClick(){u.Settings.SuppressBuyAugmentationConfirmation?s.purchaseAugmentation(this.aug,this.props.faction):s.purchaseAugmentationBoxCreate(this.aug,this.props.faction)}hasPrereqs(){return s.hasAugmentationPrereqs(this.aug)}hasReputation(){return this.props.faction.playerReputation>=this.getRepCost()}owned(){let e=!1;for(const t of this.props.p.queuedAugmentations)if(t.name===this.props.augName){e=!0;break}for(const t of this.props.p.augmentations)if(t.name===this.props.augName){e=!0;break}return e}render(){if(null==this.aug)return console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${this.props.augName}`),null;const e=this.getMoneyCost(),t=this.getRepCost();let n=!1,a=o.createElement(o.Fragment,null),r="";this.hasPrereqs()?this.aug.name!==c.AugmentationNames.NeuroFluxGovernor&&(this.aug.owned||this.owned())?n=!0:this.hasReputation()?a=o.createElement(o.Fragment,null,"UNLOCKED (at ",p.Reputation(t)," faction reputation) - ",m.Money(e)):(n=!0,a=o.createElement(o.Fragment,null,"LOCKED (Requires ",p.Reputation(t)," faction reputation - ",m.Money(e),")"),r="red"):(n=!0,a=o.createElement(o.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>h.Augmentation(e))," as prerequisite)"),r="red");const i={display:"inline-block"};""!==r&&(i.color=r);let l=this.aug.name;this.aug.name===c.AugmentationNames.NeuroFluxGovernor&&(l+=` - Level ${s.getNextNeurofluxLevel()}`);let u=o.createElement(o.Fragment,null);return u="string"==typeof this.aug.info?o.createElement(o.Fragment,null,o.createElement("span",{dangerouslySetInnerHTML:{__html:this.aug.info}}),o.createElement("br",null),o.createElement("br",null),this.aug.stats):o.createElement(o.Fragment,null,this.aug.info,o.createElement("br",null),o.createElement("br",null),this.aug.stats),o.createElement("li",null,o.createElement("span",{style:_},o.createElement(d.StdButton,{disabled:n,onClick:this.handleClick,style:g,text:l,tooltip:u}),o.createElement("p",{style:i},a)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationsPage=void 0;const o=i(n(0)),s=n(1302),l=n(14),c=n(4),u=n(233),m=n(26),p=n(63),d={width:"70%"};t.AugmentationsPage=class extends o.Component{constructor(e){super(e),this.isPlayersGang=e.p.inGang()&&e.p.getGangName()===e.faction.name,this.state={rerenderFlag:!1,sortOrder:u.PurchaseAugmentationsOrderSetting.Default},this.rerender=this.rerender.bind(this)}getAugs(){if(this.isPlayersGang){const e=[];for(const t in l.Augmentations)l.Augmentations[t].isSpecial||e.push(t);return e}return this.props.faction.augmentations.slice()}getAugsSorted(){switch(m.Settings.PurchaseAugmentationsOrder){case u.PurchaseAugmentationsOrderSetting.Cost:return this.getAugsSortedByCost();case u.PurchaseAugmentationsOrderSetting.Reputation:return this.getAugsSortedByReputation();default:return this.getAugsSortedByDefault()}}getAugsSortedByCost(){const e=this.getAugs();return e.sort((e,t)=>{const n=l.Augmentations[e],a=l.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),e}getAugsSortedByReputation(){const e=this.getAugs();return e.sort((e,t)=>{const n=l.Augmentations[e],a=l.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement}),e}getAugsSortedByDefault(){return this.getAugs()}switchSortOrder(e){m.Settings.PurchaseAugmentationsOrder=e,this.rerender()}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=this.getAugsSorted(),t=e.filter(e=>e===c.AugmentationNames.NeuroFluxGovernor||!this.props.p.augmentations.some(t=>t.name===e)&&!this.props.p.queuedAugmentations.some(t=>t.name===e)),n=e=>o.createElement(s.PurchaseableAugmentation,{augName:e,faction:this.props.faction,key:e,p:this.props.p,rerender:this.rerender}),a=t.map(e=>n(e));let r=o.createElement(o.Fragment,null);const i=e.filter(e=>!t.includes(e));return 0!==i.length&&(r=o.createElement(o.Fragment,null,o.createElement("br",null),o.createElement("h2",null,"Purchased Augmentations"),o.createElement("p",{style:d},"This factions also offers these augmentations but you already own them."),i.map(e=>n(e)))),o.createElement("div",null,o.createElement(p.StdButton,{onClick:this.props.routeToMainPage,text:"Back"}),o.createElement("h1",null,"Faction Augmentations"),o.createElement("p",{style:d},"These are all of the Augmentations that are available to purchase from ",this.props.faction.name,". Augmentations are powerful upgrades that will enhance your abilities."),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Cost),text:"Sort by Cost"}),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Reputation),text:"Sort by Reputation"}),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Default),text:"Sort by Default Order"}),o.createElement("br",null),a,r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.programsMetadata=void 0;const a=n(11);function r(e){return function(t){return t.hacking_skill>=e}}t.programsMetadata=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:r(1),time:a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:r(50),time:2*a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:r(100),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:r(250),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:r(500),time:a.CONSTANTS.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:r(750),time:a.CONSTANTS.MillisecondsPer8Hours}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:r(75),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:r(400),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:r(75),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:r(25),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:a.CONSTANTS.MillisecondsPerFiveMinutes/20}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Program=void 0;t.Program=class{constructor(e,t){this.name="",this.name=e,this.create=t}htmlID(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.companiesMetadata=void 0;const o=i(n(65)),s=n(47),l={},c={},u={},m={},p={},d={},h={},_={},g={},f={},y={},b={},E={},v={},C={},k={},P={},S={},O={};o.SoftwareCompanyPositions.forEach(e=>{l[e]=!0,p[e]=!0}),o.ITCompanyPositions.forEach(e=>{c[e]=!0,p[e]=!0}),o.NetworkEngineerCompanyPositions.forEach(e=>{u[e]=!0,p[e]=!0}),p[o.SecurityEngineerCompanyPositions[0]]=!0,m[o.SecurityEngineerCompanyPositions[0]]=!0,o.BusinessCompanyPositions.forEach(e=>{d[e]=!0}),o.SecurityCompanyPositions.forEach(e=>{_[e]=!0}),o.AgentCompanyPositions.forEach(e=>{h[e]=!0}),o.SoftwareConsultantCompanyPositions.forEach(e=>{g[e]=!0}),o.BusinessConsultantCompanyPositions.forEach(e=>{f[e]=!0});for(let e=0;e skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=void 0;const a=n(150),r=n(36),i=n(27),o=n(238);class s{constructor(e=a.BladeburnerConstants.CityNames[2]){this.name="",this.pop=0,this.popEst=0,this.comms=0,this.commsEst=0,this.chaos=0,this.name=e,this.pop=r.getRandomInt(a.BladeburnerConstants.PopulationThreshold,1.5*a.BladeburnerConstants.PopulationThreshold),this.popEst=this.pop*(Math.random()+.5),this.comms=r.getRandomInt(5,150),this.commsEst=this.comms+r.getRandomInt(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}changeChaosByPercentage(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");0!==e&&(this.chaos+=this.chaos*(e/100),this.chaos<0&&(this.chaos=0))}improvePopulationEstimateByCount(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEstthis.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}changeChaosByCount(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))}toJSON(){return i.Generic_toJSON("City",this)}static fromJSON(e){return i.Generic_fromJSON(s,e.data)}}t.City=s,i.Reviver.constructors.City=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SkillNames=void 0,t.SkillNames={BladesIntuition:"Blade's Intuition",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Tracer:"Tracer",Overclock:"Overclock",Reaper:"Reaper",EvasiveSystem:"Evasive System",Datamancer:"Datamancer",CybersEdge:"Cyber's Edge",HandsOfMidas:"Hands of Midas",Hyperdrive:"Hyperdrive"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=void 0;const a=n(518),r=n(27);class i extends a.Action{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return r.Generic_toJSON("Contract",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.Contract=i,r.Reviver.constructors.Contract=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionIdentifier=void 0;const a=n(27);class r{constructor(e={}){this.name="",this.type=-1,e.name&&(this.name=e.name),e.type&&(this.type=e.type)}toJSON(){return a.Generic_toJSON("ActionIdentifier",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.ActionIdentifier=r,a.Reviver.constructors.ActionIdentifier=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literature=void 0;t.Literature=class{constructor(e,t,n){this.title=e,this.fn=t,this.txt=n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literatures=void 0;const a=n(1312),r=n(139);t.Literatures={},function(){let e,n,i;e="The Beginner's Guide to Hacking",n=r.LiteratureNames.HackersStartingHandbook,i="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

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

-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game

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

-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",t.Literatures[n]=new a.Literature(e,n,i),e="The Complete Handbook for Creating a Successful Corporation",n=r.LiteratureNames.CorporationManagementHandbook,i="Getting Started with Corporations
To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.

Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.

The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.

Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.

Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.

Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.

These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

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

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

-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.

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

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

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

-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales

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

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",t.Literatures[n]=new a.Literature(e,n,i),e="A Brief History of Synthoids",n=r.LiteratureNames.HistoryOfSynthoids,i="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.

Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.

All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.

It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.

In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

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

Nobody knows what happened to the terrorist group Ascendis Totalis.",t.Literatures[n]=new a.Literature(e,n,i),e="A Green Tomorrow",n=r.LiteratureNames.AGreenTomorrow,i="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.

The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",t.Literatures[n]=new a.Literature(e,n,i),e="Alpha and Omega",n=r.LiteratureNames.AlphaOmega,i="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'

And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",t.Literatures[n]=new a.Literature(e,n,i),e="Are We Living in a Computer Simulation?",n=r.LiteratureNames.SimulatedReality,i="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.

Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened.

Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",t.Literatures[n]=new a.Literature(e,n,i),e="Beyond Man",n=r.LiteratureNames.BeyondMan,i="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?

Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",t.Literatures[n]=new a.Literature(e,n,i),e="Brighter than the Sun",n=r.LiteratureNames.BrighterThanTheSun,i="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.

The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",t.Literatures[n]=new a.Literature(e,n,i),e="Democracy is Dead: The Fall of an Empire",n=r.LiteratureNames.DemocracyIsDead,i="They rose from the shadows in the street.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
And now democracy is dead, in the USA.",t.Literatures[n]=new a.Literature(e,n,i),e="Figures Show Rising Crime Rates in Sector-12",n=r.LiteratureNames.Sector12Crime,i="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.

CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",t.Literatures[n]=new a.Literature(e,n,i),e="Man and the Machine",n=r.LiteratureNames.ManAndMachine,i="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",t.Literatures[n]=new a.Literature(e,n,i),e="Secret Societies",n=r.LiteratureNames.SecretSocieties,i="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.

However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.

Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",t.Literatures[n]=new a.Literature(e,n,i),e="Space: The Failed Frontier",n=r.LiteratureNames.TheFailedFrontier,i="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.

But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.

And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",t.Literatures[n]=new a.Literature(e,n,i),e="Coded Intelligence: Myth or Reality?",n=r.LiteratureNames.CodedIntelligence,i="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.

We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",t.Literatures[n]=new a.Literature(e,n,i),e="Synthetic Muscles",n=r.LiteratureNames.SyntheticMuscles,i="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.

As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",t.Literatures[n]=new a.Literature(e,n,i),e="Tensions rise in global tech race",n=r.LiteratureNames.TensionsInTechRace,i="Have we entered a new Cold War? Is WWIII just beyond the horizon?

After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",t.Literatures[n]=new a.Literature(e,n,i),e="The Cost of Immortality",n=r.LiteratureNames.CostOfImmortality,i="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.

Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.

Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",t.Literatures[n]=new a.Literature(e,n,i),e="The Hidden World",n=r.LiteratureNames.TheHiddenWorld,i="WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.

OPEN YOUR EYES

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

THEY ARE ALL AROUND YOU

After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",t.Literatures[n]=new a.Literature(e,n,i),e="The New God",n=r.LiteratureNames.TheNewGod,i="Everyone has a moment in their life when they wonder about the bigger questions.

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

Some people dare to think even bigger.

What will the fate of the human race be?

We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into ",t.Literatures[n]=new a.Literature(e,n,i),e="The New Triads",n=r.LiteratureNames.NewTriads,i="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.

It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.

Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",t.Literatures[n]=new a.Literature(e,n,i),e="The Secret War",n=r.LiteratureNames.TheSecretWar,i="",t.Literatures[n]=new a.Literature(e,n,i)}()},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;const o=i(n(0));t.Popup=function(e){function t(t){"Escape"===t.key&&e.removePopup(e.id)}return o.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)})),o.default.createElement("div",{className:"popup-box-content",id:`${e.id}-content`},o.default.createElement(e.content,e.props))}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCityMap=void 0;const a=n(173);t.createCityMap=function(e){const t={},n=Object.keys(a.Cities);for(let a=0;a0&&(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.text}
${r.numeralWrapper.format(this.cost,"0,0")} Scientific Research`+''+`${n.desc}`+"",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let n=0;ne.name<=t.name?-1:1);const t=e.map(e=>{const t=l.Augmentations[e.name];let n=null;return e.name===c.AugmentationNames.NeuroFluxGovernor&&(n=e.level),o.createElement("li",{key:e.name},o.createElement(p.AugmentationAccordion,{aug:t,level:n}))});return o.createElement(o.Fragment,null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InstalledAugmentationsAndSourceFiles=void 0;const o=i(n(0)),s=n(1324),l=n(1043),c=n(1042),u=n(1040),m=n(26),p=n(233);t.InstalledAugmentationsAndSourceFiles=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.collapseAllHeaders=this.collapseAllHeaders.bind(this),this.expandAllHeaders=this.expandAllHeaders.bind(this),this.sortByAcquirementTime=this.sortByAcquirementTime.bind(this),this.sortInOrder=this.sortInOrder.bind(this),this.listRef=o.createRef()}collapseAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}sortByAcquirementTime(){m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.AcquirementTime,this.rerender()}sortInOrder(){m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.Alphabetically,this.rerender()}render(){return o.createElement(o.Fragment,null,o.createElement(l.ListConfiguration,{collapseAllButtonsFn:this.collapseAllHeaders,expandAllButtonsFn:this.expandAllHeaders,sortByAcquirementTimeFn:this.sortByAcquirementTime,sortInOrderFn:this.sortInOrder}),o.createElement("ul",{className:"augmentations-list",ref:this.listRef},o.createElement(u.SourceFileMinus1,null),o.createElement(c.OwnedSourceFiles,null),o.createElement(s.InstalledAugmentations,null)))}}},,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repToFavor=t.favorToRep=void 0,t.favorToRep=function(e){return 500*(Math.pow(51,e+1)/Math.pow(50,e)-50)},t.repToFavor=function(e){return-Math.log(25500/(e+25e3))/Math.log(1.02)}}]); + */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=a.b(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var n,i=0;n=e.body[i];i++)t.node.body.push(n);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var n=t.node,a=n.type;if("Program"===a&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[a](e,t,n)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!n.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,n=this.createNativeFunction(function(e){throw EvalError("Can't happen")},!1);n.eval=!0,this.setProperty(e,"eval",n),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var a=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","if (!Array.prototype.find) {","Object.defineProperty(Array.prototype, 'find', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return kValue;","}","k++;","}","return undefined;","},","configurable: true,","writable: true","});","}","if (!Array.prototype.findIndex) {","Object.defineProperty(Array.prototype, 'findIndex', {","value: function(predicate) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","var o = Object(this);","var len = o.length >>> 0;","if (typeof predicate !== 'function') {","throw new TypeError('predicate must be a function');","}","var thisArg = arguments[1];","var k = 0;","while (k < len) {","var kValue = o[k];","if (predicate.call(thisArg, kValue, k, o)) {","return k;","}","k++;","}","return -1;","},","configurable: true,","writable: true","});","}","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},r.prototype.initString=function(e){var t,n=this;t=function(e){return e=String(e),n.calledWithNew()?(this.data=e,this):e},this.STRING=this.createNativeFunction(t,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","if (!String.prototype.endsWith) {","String.prototype.endsWith = function(search, this_len) {","if (this_len === undefined || this_len > this.length) {","this_len = this.length;","}","return this.substring(this_len - search.length, this_len) === search;","};","}","if (!String.prototype.includes) {","String.prototype.includes = function(search, start) {","'use strict';","if (typeof start !== 'number') {","start = 0;","}"," ","if (start + search.length > this.length) {","return false;","} else {","return this.indexOf(search, start) !== -1;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(e){var t,n=this;t=function(e){return e=Boolean(e),n.calledWithNew()?(this.data=e,this):e},this.BOOLEAN=this.createNativeFunction(t,!0),this.setProperty(e,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(e){var t,n=this;t=function(e){return e=Number(e),n.calledWithNew()?(this.data=e,this):e},this.NUMBER=this.createNativeFunction(t,!0),this.setProperty(e,"Number",this.NUMBER);for(var a=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i>>0;return t===Number(e)?t:NaN},r.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},r.Value,r.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(a=r.toStringCycles_).push(this);try{for(var e=[],t=0;t0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:e,value:t,label:n});case"CallExpression":case"NewExpression":if(e===r.Completion.RETURN)return void(o.value=t);if(e!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===r.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void i.pop()}else if(e===r.Completion.CONTINUE&&(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop))return}var s;if(this.isa(t,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(t,"name").toString(),u=this.getProperty(t,"message").valueOf();s=(e=l[c]||Error)(u+a)}else s=String(t)+a;throw s},r.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,a=new this.nodeConstructor;a.type="CallExpression";var i=new r.State(a,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=n,i.func_=e,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(e,t,n){var a=Array.isArray(t)?t[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},r.State=function(e,t){this.node=e,this.scope=t},r.prototype.stepArrayExpression=function(e,t,n){var a=n.elements,i=t.n_||0;for(t.array_?(this.setProperty(t.array_,i,t.value),i++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=a.length);i>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},r.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new r.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new r.State(n.right,t.scope);e.pop();var a,i=t.leftValue_,o=t.value;switch(n.operator){case"==":a=i==o;break;case"!=":a=i!=o;break;case"===":a=i===o;break;case"!==":a=i!==o;break;case">":a=i>o;break;case">=":a=i>=o;break;case"<":a=i>":a=i>>o;break;case">>>":a=i>>>o;break;case"in":if(!o||!o.isObject){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",e)}a=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",e)}a=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=a},r.prototype.stepBlockStatement=function(e,t,n){var a=t.n_||0,i=n.body[a];if(i)return t.n_=a+1,new r.State(i,t.scope);e.pop()},r.prototype.stepBreakStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(r.Completion.BREAK,void 0,a)},r.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var i=new r.State(n.callee,t.scope);return i.components=!0,i}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o,n),o[0]===r.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],(o=t.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}o=t.func_;if(!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),n.arguments[t.n_])return new r.State(n.arguments[t.n_++],t.scope);if("NewExpression"===n.type){if(o.illegalConstructor){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a constructor",e)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s),t.isConstructor=!0}else void 0===t.funcThis_&&(t.funcThis_=t.scope.strict?void 0:this.global);t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{if(t.doneExec_=!0,!o||!o.isObject){let e=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a function",e)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),u=0;uu?t.arguments_[u]:void 0;this.setProperty(c,m,p)}var d=this.createObjectProto(this.ARRAY_PROTO);for(u=0;u=0&&this.recalculateTotalProduction()}recalculateTotalProduction(){let e=0;for(let t=0;t{if(Object(p.h)()){const t=h.AllServers[e];if(null==t)throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${e}`);return r.a.createElement(s.a,{key:t.hostname,node:t,purchaseMultiplier:this.state.purchaseMultiplier,recalculate:this.recalculateTotalProduction})}return r.a.createElement(o.a,{key:e.name,node:e,purchaseMultiplier:this.state.purchaseMultiplier,recalculate:this.recalculateTotalProduction})});return r.a.createElement("div",null,r.a.createElement("h1",null,"Hacknet ",Object(p.h)()?"Servers":"Nodes"),r.a.createElement(i.a,null),r.a.createElement(m.a,{cost:e,multiplier:this.state.purchaseMultiplier,onClick:this.handlePurchaseButtonClick}),r.a.createElement("br",null),r.a.createElement("div",{id:"hacknet-nodes-money-multipliers-div"},r.a.createElement(u.a,{totalProduction:this.state.totalProduction}),r.a.createElement(c.a,{onClicks:t,purchaseMultiplier:this.state.purchaseMultiplier})),Object(p.h)()&&r.a.createElement("button",{className:"std-button",onClick:this.createHashUpgradesPopup,style:{display:"block"}},"Spend Hashes on Upgrades"),r.a.createElement("ul",{id:"hacknet-nodes-list"},n))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u});var a=n(17),r=n(84),i=n(156),o=n(13),s=n(97),l=n(62);let c=!1;function u(e){if(c=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");a.Engine.loadCinematicTextContent();const t=document.getElementById("cinematic-text-container");if(t.style.width="75%",null==t)throw new Error("Could not find cinematic-text-container for writeCinematicText()");Object(i.removeChildrenFromElement)(t);for(let t=0;t=t.length)return Promise.resolve(!0);return function(e){return new Promise(function(t,n){const a=document.getElementById("cinematic-text-container"),i=document.createElement("p");a.appendChild(i);const o=function e(t,n,a=0){return new Promise(function(i,o){Object(r.setTimeoutRef)(function(){const r=n.substring(0,a);if(a>=n.length)return t.innerHTML=r,i(!0);t.innerHTML=r+"";const s=e(t,n,a+1);s.then(function(e){i(e)},function(e){o(e)})},15)})}(i,e,0);o.then(function(e){t(e)},function(e){n(e)})})}(t[n]).then(function(){return e(t,n+1)})}(e).then(function(){return function(){var e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container");return e.appendChild(Object(o.createElement)("br")),new Promise(function(n){e.appendChild(Object(o.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",c=!1,n()}}))})}()}).catch(function(e){Object(s.exceptionAlert)(e)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationRouting=t.overviewPage=void 0,t.overviewPage="Overview";t.CorporationRouting=class{constructor(e){this.currentPage=t.overviewPage,this.currentDivision=null,this.corp=e}current(){return this.currentPage}isValidPage(e){if(e===t.overviewPage)return!0;for(const t of this.corp.divisions)if(t.name===e)return!0;return!1}isOn(e){return!!this.isValidPage(e)&&e===this.currentPage}isOnOverviewPage(){return this.currentPage===t.overviewPage}routeTo(e){if(this.isValidPage(e)){if(this.currentDivision=null,e!==t.overviewPage){for(let t=0;t${t.title}

${t.txt}`;r.dialogBoxCreate(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUpgrades=void 0,t.CorporationUpgrades={0:[0,2e9,1.06,.03,"Smart Factories","Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive)."],1:[1,2e9,1.06,.1,"Smart Storage","Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive)."],2:[2,4e9,1.1,.001,"DreamSense","Use DreamSense LCC Technologies to advertise your corporation to consumers through their dreams. Each level of this upgrade provides a passive increase in awareness of all of your companies (divisions) by 0.004 / market cycle,and in popularity by 0.001 / market cycle. A market cycle is approximately 15 seconds."],3:[3,4e9,1.12,.005,"Wilson Analytics","Purchase data and analysis from Wilson, a marketing research firm. Each level of this upgrades increases the effectiveness of your advertising by 0.5% (additive)."],4:[4,1e9,1.06,.1,"Nuoptimal Nootropic Injector Implants","Purchase the Nuoptimal Nootropic Injector augmentation for your employees. Each level of this upgrade globally increases the creativity of your employees by 10% (additive)."],5:[5,1e9,1.06,.1,"Speech Processor Implants","Purchase the Speech Processor augmentation for your employees. Each level of this upgrade globally increases the charisma of your employees by 10% (additive)."],6:[6,1e9,1.06,.1,"Neural Accelerators","Purchase the Neural Accelerator augmentation for your employees. Each level of this upgrade globally increases the intelligence of your employees by 10% (additive)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.07,.01,"ABC SalesBots","Always Be Closing. Purchase these robotic salesmen to increase the amount of materials and products you sell. Each level of this upgrade globally increases your sales by 1% (additive)."],9:[9,5e9,1.07,.05,"Project Insight","Purchase 'Project Insight', a R&D service provided by the secretive Fulcrum Technologies. Each level of this upgrade globally increases the amount of Scientific Research you produce by 5% (additive)."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorporationUnlockUpgrades=void 0,t.CorporationUnlockUpgrades={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],1:[1,25e9,"Smart Supply","Use advanced AI to anticipate your supply needs. This allows you to purchase exactly however many materials you need for production."],2:[2,5e9,"Market Research - Demand","Mine and analyze market data to determine the demand of all resources. The demand attribute, which affects sales, will be displayed for every material and product."],3:[3,5e9,"Market Data - Competition","Mine and analyze market data to determine how much competition there is on the market for all resources. The competition attribute, which affects sales, will be displayed for every material and product."],4:[4,1e10,"VeChain","Use AI and blockchain technology to identify where you can improve your supply chain systems. This upgrade will allow you to view a wide array of useful statistics about your Corporation."],5:[5,5e11,"Shady Accounting","Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%."],6:[6,2e12,"Government Partnership","Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%"]}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.clearSleevesPage=t.updateSleevesPage=t.createSleevesPage=void 0;const o=n(953),s=n(251),l=n(952),c=n(11),u=n(16),m=n(428),p=n(176),d=n(173),h=n(38),_=n(47),g=n(3),f=n(19),y=n(12),b=n(171),E=n(97),v=n(56),C=n(13),k=n(431),P=n(57),S=n(69),O=n(181),M=n(156),T=n(172),x=n(49),w=n(951),A=n(31),R=n(125),N=n(459),D=n(950),B=n(949),I=n(948),L=i(n(22)),W=n(415),F={container:null,docButton:null,faqButton:null,info:null,sleeveList:null,sleeves:null};let j;function U(){if(f.routing.isOn(f.Page.Sleeves)){if(null===j)throw new Error("playerRef is null in updateSleevesPage()");if(null===F.sleeves)throw new Error("UIElems.sleeves is null in updateSleevesPage()");try{for(let e=0;e{y.dialogBoxCreate(B.MoreStatsContent(e))}}),n.travelButton=C.createElement("button",{class:"std-button",innerText:"Travel",clickListener:()=>{const a="sleeve-travel-popup",r=[];r.push(S.createPopupCloseButton(a,{class:"std-button"})),r.push(C.createElement("p",{innerHTML:"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. "+`Traveling to a different city costs ${W.renderToStaticMarkup(A.Money(c.CONSTANTS.TravelCost))}. `+"It will also CANCEL the sleeve's current task (setting it to idle)"}));for(const i in d.Cities)e.city!==i&&function(e,i){r.push(C.createElement("div",{class:"cmpy-mgmt-find-employee-option",innerText:i,clickListener:()=>{if(null==j)throw new Error("playerRef is null in popupArguments.click()");return j.canAfford(c.CONSTANTS.TravelCost)?(e.city=i,j.loseMoney(c.CONSTANTS.TravelCost),e.resetTaskStatus(),x.removeElementById(a),G(e,n),$(e,n,t),!1):(y.dialogBoxCreate("You cannot afford to have this sleeve travel to another city",!1),!1)}}))}(e,i);P.createPopup(a,r)}}),n.purchaseAugsButton=C.createElement("button",{class:"std-button",display:"block",innerText:"Manage Augmentations",clickListener:()=>{if(null==j)throw new Error("playerRef is null in purchaseAugsButton.click()");o.createSleevePurchaseAugsPopup(e,j)}}),n.statsPanel.appendChild(n.stats),n.statsPanel.appendChild(n.moreStatsButton),n.statsPanel.appendChild(n.travelButton),e.shock>=100&&n.statsPanel.appendChild(n.purchaseAugsButton),n.taskPanel=C.createElement("div",{class:"sleeve-panel",width:"40%"}),n.taskSelector=C.createElement("select",{class:"dropdown"}),n.taskSelector.add(k.createOptionElement("------")),n.taskSelector.add(k.createOptionElement("Work for Company")),n.taskSelector.add(k.createOptionElement("Work for Faction")),n.taskSelector.add(k.createOptionElement("Commit Crime")),n.taskSelector.add(k.createOptionElement("Take University Course")),n.taskSelector.add(k.createOptionElement("Workout at Gym")),n.taskSelector.add(k.createOptionElement("Shock Recovery")),n.taskSelector.add(k.createOptionElement("Synchronize")),n.taskDetailsSelector=C.createElement("select",{class:"dropdown"}),n.taskDetailsSelector2=C.createElement("select",{class:"dropdown"}),n.taskDescription=C.createElement("p"),n.taskProgressBar=C.createElement("p"),n.taskSelector.addEventListener("change",()=>{$(e,n,t)}),n.taskSelector.selectedIndex=e.currentTask,n.taskSelector.dispatchEvent(new Event("change")),Y(e,n),n.taskSetButton=C.createElement("button",{class:"std-button",innerText:"Set Task",clickListener:()=>{!function(e,t){try{if(null==j)throw new Error("playerRef is null in Sleeve UI's setSleeveTask()");if(null==t.taskDescription)throw new Error("elems.taskDescription is null");const n=O.getSelectValue(t.taskSelector),a=O.getSelectValue(t.taskDetailsSelector),r=O.getSelectValue(t.taskDetailsSelector2);let i=!1;switch(n){case"------":t.taskDescription.innerText="This sleeve is currently idle";break;case"Work for Company":i=e.workForCompany(j,a);break;case"Work for Faction":i=e.workForFaction(j,a,r);break;case"Commit Crime":i=e.commitCrime(j,a);break;case"Take University Course":i=e.takeUniversityCourse(j,r,a);break;case"Workout at Gym":i=e.workoutAtGym(j,r,a);break;case"Shock Recovery":e.currentTask=s.SleeveTaskType.Recovery,i=e.shockRecovery(j);break;case"Synchronize":i=e.synchronize(j);break;default:console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${n}`)}if(i)Y(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(f.routing.isOn(f.Page.Sleeves)){if(U(),null==F.sleeves)throw new Error("UIElems.sleeves is null");for(const e of F.sleeves){if(null==e.taskSelector)throw new Error("e.taskSelector is null");e.taskSelector.dispatchEvent(new Event("change"))}}}catch(e){return console.error(`Exception caught in setSleeveTask(): ${e}`),E.exceptionAlert(e),!1}}(e,n)}}),n.taskPanel.appendChild(n.taskSelector),n.taskPanel.appendChild(n.taskDetailsSelector),n.taskPanel.appendChild(n.taskDetailsSelector2),n.taskPanel.appendChild(n.taskSetButton),n.taskPanel.appendChild(n.taskDescription),n.taskPanel.appendChild(n.taskProgressBar),n.earningsPanel=C.createElement("div",{class:"sleeve-panel",width:"35%"}),n.currentEarningsInfo=C.createElement("div"),n.totalEarningsButton=C.createElement("button",{class:"std-button",innerText:"More Earnings Info",clickListener:()=>{y.dialogBoxCreate(I.MoreEarningsContent(e))}}),n.earningsPanel.appendChild(n.currentEarningsInfo),n.earningsPanel.appendChild(n.totalEarningsButton),G(e,n),n.container.appendChild(n.statsPanel),n.container.appendChild(n.taskPanel),n.container.appendChild(n.earningsPanel),n):n}function G(e,t){if(f.routing.isOn(f.Page.Sleeves)){if(null==j)throw new Error("playerRef is null in updateSleeveUi()");if(null==t.taskProgressBar)throw new Error("elems.taskProgressBar is null");if(null==t.stats)throw new Error("elems.stats is null");if(null==t.currentEarningsInfo)throw new Error("elems.currentEarningsInfo is null");if(L.render(D.StatsElement(e),t.stats),e.currentTask===s.SleeveTaskType.Crime){const n=[["Money",A.Money(parseFloat(e.currentTaskLocation)),"(on success)"],["Hacking Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.str),"(2x on success)"],["Defense Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",g.numeralWrapper.formatExp(e.gainRatesForTask.cha),"(2x on success)"]];L.render(w.EarningsTableElement("Earnings (Pre-Synchronization)",n),t.currentEarningsInfo),t.taskProgressBar.innerText=b.createProgressBarText({progress:e.currentTaskTime/e.currentTaskMaxTime,totalTicks:25})}else{const n=[["Money:",R.MoneyRate(5*e.gainRatesForTask.money)],["Hacking Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.hack)} / s`],["Strength Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.str)} / s`],["Defense Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.def)} / s`],["Dexterity Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.dex)} / s`],["Agility Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.agi)} / s`],["Charisma Exp:",`${g.numeralWrapper.formatExp(5*e.gainRatesForTask.cha)} / s`]];if(e.currentTask===s.SleeveTaskType.Company||e.currentTask===s.SleeveTaskType.Faction){const t=e.getRepGain(j);n.push(["Reputation:",N.ReputationRate(5*t)])}L.render(w.EarningsTableElement("Earnings (Pre-Synchronization)",n),t.currentEarningsInfo),t.taskProgressBar.innerText=""}}}t.createSleevesPage=function(e){if(f.routing.isOn(f.Page.Sleeves))try{j=e,F.container=C.createElement("div",{class:"generic-menupage-container",id:"sleeves-container",position:"fixed"}),F.info=C.createElement("p",{class:"sleeves-page-info",innerHTML:"

Sleeves

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.

Sleeves can be used to perform different tasks synchronously.

"}),F.faqButton=C.createElement("button",{class:"std-button",display:"inline-block",innerText:"FAQ",clickListener:()=>{y.dialogBoxCreate(l.SleeveFaq,!1)}}),F.docButton=C.createElement("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",innerText:"Documentation",target:"_blank"}),F.sleeveList=C.createElement("ul"),F.sleeves=[];for(const t of e.sleeves){const n=H(t,e.sleeves);if(null==n.container)throw new Error("sleeveUi.container is null in createSleevesPage()");F.sleeveList.appendChild(n.container),F.sleeves.push(n)}F.container.appendChild(F.info),F.container.appendChild(F.faqButton),F.container.appendChild(F.docButton),F.container.appendChild(F.sleeveList);const t=document.getElementById("entire-game-container");if(null===t)throw new Error("entire-game-container not found in createSleevesPage()");t.appendChild(F.container)}catch(e){E.exceptionAlert(e)}},t.updateSleevesPage=U,t.clearSleevesPage=function(){F.container instanceof HTMLElement&&T.removeElement(F.container);for(const e in F)F[e]=null;j=null};const K=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],q=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function $(e,t,n){if(null==j)throw new Error("playerRef is null in updateSleeveTaskSelector()");const a=[];for(const t of n)e!==t&&t.currentTask===s.SleeveTaskType.Company&&a.push(t.currentTaskLocation);const r=[];for(const t of n)e!==t&&t.currentTask===s.SleeveTaskType.Faction&&r.push(t.currentTaskLocation);if(null===t.taskDetailsSelector)throw new Error("elems.taskDetailsSelector is null");if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector is null");switch(M.removeChildrenFromElement(t.taskDetailsSelector),M.removeChildrenFromElement(t.taskDetailsSelector2),t.taskDetailsSelector2=v.clearEventListeners(t.taskDetailsSelector2),O.getSelectValue(t.taskSelector)){case"Work for Company":{let n=0;const r=Object.keys(j.jobs);for(let i=0;i{if(null===t.taskDetailsSelector2)throw new Error("elems.taskDetailsSelector2 is null");const n=O.getSelectValue(t.taskDetailsSelector),a=u.Factions[n];if(null==a)return void console.warn(`Invalid faction name when trying to update Sleeve Task Selector: ${n}`);const r=a.getInfo();M.removeChildrenFromElement(t.taskDetailsSelector2);let i=0;r.offerHackingWork&&(t.taskDetailsSelector2.add(k.createOptionElement("Hacking Contracts")),e.factionWorkType===m.FactionWorkType.Hacking&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerFieldWork&&(t.taskDetailsSelector2.add(k.createOptionElement("Field Work")),e.factionWorkType===m.FactionWorkType.Field&&(t.taskDetailsSelector2.selectedIndex=i),++i),r.offerSecurityWork&&(t.taskDetailsSelector2.add(k.createOptionElement("Security Work")),e.factionWorkType===m.FactionWorkType.Security&&(t.taskDetailsSelector2.selectedIndex=i),++i)}),t.taskDetailsSelector.dispatchEvent(new Event("change"));break}case"Commit Crime":{let n=0;for(const a in p.Crimes){const r=p.Crimes[a].name;if(t.taskDetailsSelector.add(k.createOptionElement(r,a)),""===e.crimeType)continue;const i=p.Crimes[e.crimeType];null!==i&&(r===i.name&&(t.taskDetailsSelector.selectedIndex=n),++n)}t.taskDetailsSelector2.add(k.createOptionElement("------"));break}case"Take University Course":for(let n=0;nanalyze Get information about the current machine
backdoor Install a backdoor on the current machine
buy [-l/program] Purchase a program through the Dark Web
cat [file] Display a .msg, .lit, or .txt file
cd [dir] Change to a new directory
check [script] [args...] Print a script's logs to Terminal
clear Clear all text on the terminal
cls See 'clear' command
connect [ip/hostname] Connects to a remote server
download [script/text file] Downloads scripts or text files to your computer
expr [math expression] Evaluate a mathematical expression
free Check the machine's memory (RAM) usage
hack Hack the current machine
help [command] Display this help text, or the help text for a command
home Connect to home computer
hostname Displays the hostname of the machine
ifconfig Displays the IP address of the machine
kill [script/pid] [args...] Stops the specified script on the current server
killall Stops all running scripts on the current machine
ls [dir] [| grep pattern] Displays all files on the machine
lscpu Displays the number of CPU cores on the machine
mem [script] [-t] [n] Displays the amount of RAM required to run the script
mv [src] [dest] Move/rename a text or script file
nano [file] Text editor - Open up and edit a script or text file
ps Display all scripts that are currently running
rm [file] Delete a file from the server
run [name] [-t] [n] [args...] Execute a program or script
scan Prints all immediately-available network connections
scan-analyze [d] [-a] Prints info for all servers up to d nodes away
scp [file] [server] Copies a file to a destination server
sudov Shows whether you have root access on this computer
tail [script] [args...] Displays dynamic logs for the specified script
theme [preset] | bg txt hlgt Change the color scheme of the UI
top Displays all running scripts and their RAM usage
unalias [alias name] Deletes the specified alias
wget [url] [target file] Retrieves code/text from a web server
",t.HelpTexts={alias:"alias [-g] [name=\"value\"]
Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following:

alias nuke=\"run NUKE.exe\"

Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set:

alias worm=\"HTTPWorm.exe\"

and then you tried to run the following terminal command:

run worm

This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag:

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

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

Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal.

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

",analyze:"analze
Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",backdoor:"backdoor
Install a backdoor on the current machine, grants a secret bonus depending on the machine.
Requires root access to run.
",buy:"buy [-l / program]
Purchase a program through the Dark Web. Requires a TOR router to use.

If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.

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

cat j1.msg
cat foo.lit
cat servers.txt",cd:"cd [dir]
Change to the specified directory. Note that this works even for directories that don't exist. If you change to a directory that does not exist, it will not be 'created'. Examples:

cd scripts/hacking
cd /logs
cd ../",check:"check [script name] [args...]
Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 2 foodnstuff

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

check foo.script 1 2 foodnstuff",clear:"clear
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls
Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]
Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]
Downloads a script or text file to your computer (like your real life computer).
You can also download all of your scripts/text files as a zip file using the following Terminal commands:

Download all scripts and text files: download *
Download all scripts: download *.script
Download all text files: download *.txt
",expr:"expr [mathematical expression]
Evaluate a simple mathematical expression. Supports native JavaScript operators:
+, -, /, *, **, %
Example:
expr 25 * 2 ** 10
Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free
Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack
Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
",help:"help [command]
Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples:

help alias
help scan-analyze",home:"home
Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname
Prints the hostname of the current server",ifconfig:"ipconfig
Prints the IP address of the current server",kill:"kill [script name] [args...]
kill [pid]
Kill the script specified by the script name and arguments OR by its PID.

If you are killing the script using its filename and arguments, then each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:

run foo.script 1 sigma-cosmetics

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

kill foo.script 1 sigma-cosmetics

If you are killing the script using its PID, then the PID argument must be numeric",killall:"killall
Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [dir] [| grep pattern]
The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. The files will be displayed in alphabetical order.

The 'dir' optional parameter can be used to display files/directories in another directory.

The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.

Examples:

List all files with the '.script' extension in the current directory:
ls | grep .script

List all files with the '.js' extension in the root directory:
ls / | grep .js

List all files with the word 'purchase' in the filename, in the 'scripts' directory:
ls scripts | grep purchase",lscpu:"lscpu
Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]
Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:

mem foo.script
mem foo.script -t 50
The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",mv:"mv [src] [dest]
Move the source file to the specified destination. This can also be used to rename files. This command only works for scripts and text files (.txt). This command CANNOT be used to convert to different file types

Note that, unlike the Linux 'mv' command, the destination argument must be the full filepath. Examples:

mv hacking-controller.script scripts/hacking-controller.script
mv myScript.js myOldScript.js",nano:"nano [file name]
Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps
Prints all scripts that are running on the current server",rm:"rm [file]
Removes the specified file from the current server. A file can be a script, a program, or a message file.

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

The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards.

[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space.

",scan:"scan
Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]
Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.

By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.

The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.

By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]
Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov
Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]
Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments:

run foo.script 10 50000

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

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

This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:

theme #ffffff #385 #235012

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

Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top
Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]
Deletes the specified alias. Note that the double quotation marks are required.

As an example, if an alias was declared using:

alias r=\"run\"

Then it could be removed using:

unalias r

It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]
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.

Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:

wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trusted=void 0,t.trusted=function(e){return function(t){t.isTrusted&&e()}}},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.purchaseTorRouter=t.createUpgradeHomeRamPopup=t.createUpgradeHomeCoresPopup=t.createStartCorporationPopup=t.createPurchaseServerPopup=t.createTravelPopup=void 0;const o=n(11),s=n(23),l=n(24),c=n(144),u=n(45),m=n(26),p=n(3),d=n(31),h=n(12),_=n(54),g=n(13),f=n(57),y=n(69),b=n(49),E=i(n(0));t.createTravelPopup=function(e,t){const n=o.CONSTANTS.TravelCost;if(m.Settings.SuppressTravelConfirmation)return void t(e);const a=_.yesNoBoxGetYesButton(),r=_.yesNoBoxGetNoButton();null!=a&&null!=r?(a.innerHTML="Yes",a.addEventListener("click",()=>(_.yesNoBoxClose(),t(e),!1)),r.innerHTML="No",r.addEventListener("click",()=>(_.yesNoBoxClose(),!1)),_.yesNoBoxCreate(E.createElement("span",null,"Would you like to travel to ",e,"? The trip will cost ",d.Money(n),"."))):console.warn("Could not find YesNo pop-up box buttons")},t.createPurchaseServerPopup=function(e,t){const n=c.getPurchaseServerCost(e);if(n===1/0)return void h.dialogBoxCreate("Something went wrong when trying to purchase this server. Please contact developer.");const a=_.yesNoTxtInpBoxGetYesButton(),r=_.yesNoTxtInpBoxGetNoButton();null!=a&&null!=r&&(a.innerHTML="Purchase Server",r.innerHTML="Cancel",a.addEventListener("click",function(){c.purchaseServer(e,t),_.yesNoTxtInpBoxClose()}),r.addEventListener("click",function(){_.yesNoTxtInpBoxClose()}),_.yesNoTxtInpBoxCreate(E.createElement(E.Fragment,null,"Would you like to purchase a new server with ",p.numeralWrapper.formatRAM(e)," of RAM for ",d.Money(n),"?",E.createElement("br",null),E.createElement("br",null),"Please enter the server hostname below:",E.createElement("br",null))))},t.createStartCorporationPopup=function(e){if(!e.canAccessCorporation()||e.hasCorporation())return;const t="create-corporation-popup",n=g.createElement("p",{innerHTML:"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares

If you would like to start one, please enter a name for your corporation below:"}),a=g.createElement("input",{class:"text-input",placeholder:"Corporation Name"}),r=g.createElement("button",{class:"popup-box-button",innerText:"Self-Fund",clickListener:()=>{if(!e.canAfford(15e10))return h.dialogBoxCreate("You don't have enough money to create a corporation! You need $150b."),!1;const n=a.value;if(null==n||""==n)return h.dialogBoxCreate("Invalid company name!"),!1;e.startCorporation(n),e.loseMoney(15e10);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),h.dialogBoxCreate("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City."),b.removeElementById(t),!1}}),i=g.createElement("button",{class:"popup-box-button",innerText:"Use Seed Money",clickListener:()=>{const n=a.value;if(null==n||""==n)return h.dialogBoxCreate("Invalid company name!"),!1;e.startCorporation(n,5e8);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),h.dialogBoxCreate("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City."),b.removeElementById(t),!1}}),o=y.createPopupCloseButton(t,{class:"popup-box-button"});f.createPopup(t,[n,a,o,r,i]),a.focus()},t.createUpgradeHomeCoresPopup=function(e){const t=e.getHomeComputer().cpuCores;if(t>=8)return void h.dialogBoxCreate(E.createElement(E.Fragment,null,"You have the maximum amount of CPU cores on your home computer."));const n=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17][t],a=_.yesNoBoxGetYesButton(),r=_.yesNoBoxGetNoButton();null!=a&&null!=r&&(a.innerHTML="Purchase",a.addEventListener("click",()=>{e.canAfford(n)?(e.loseMoney(n),e.getHomeComputer().cpuCores++,h.dialogBoxCreate("You purchased an additional CPU Core for your home computer! It now has "+e.getHomeComputer().cpuCores+" cores.")):h.dialogBoxCreate("You do not have enough money to purchase an additional CPU Core for your home computer!"),_.yesNoBoxClose()}),r.innerHTML="Cancel",r.addEventListener("click",()=>{_.yesNoBoxClose()}),_.yesNoBoxCreate(E.createElement(E.Fragment,null,"Would you like to purchase an additional CPU Core for your home computer? Each CPU Core lets you start with an additional Core Node in Hacking Missions.",E.createElement("br",null),E.createElement("br",null),"Purchasing an additional core (for a total of ",e.getHomeComputer().cpuCores+1,") will cost ",d.Money(n))))},t.createUpgradeHomeRamPopup=function(e){const t=e.getUpgradeHomeRamCost(),n=e.getHomeComputer().maxRam,a=_.yesNoBoxGetYesButton(),r=_.yesNoBoxGetNoButton();null!=a&&null!=r&&(e.getHomeComputer().maxRam>=o.CONSTANTS.HomeComputerMaxRam?h.dialogBoxCreate(E.createElement(E.Fragment,null,"You have the maximum amount of RAM on your home computer.")):(a.innerText="Purchase",a.addEventListener("click",()=>{c.purchaseRamForHomeComputer(t,e),_.yesNoBoxClose()}),r.innerText="Cancel",r.addEventListener("click",()=>{_.yesNoBoxClose()}),_.yesNoBoxCreate(E.createElement(E.Fragment,null,"Would you like to purchase additional RAM for your home computer? ",E.createElement("br",null),E.createElement("br",null),"This will upgrade your RAM from ",p.numeralWrapper.formatRAM(n)," to ",p.numeralWrapper.formatRAM(2*n),". ",E.createElement("br",null),E.createElement("br",null),"This will cost ",d.Money(t)))))},t.purchaseTorRouter=function(e){if(e.hasTorRouter())return void h.dialogBoxCreate("You already have a TOR Router!");if(!e.canAfford(o.CONSTANTS.TorRouterCost))return void h.dialogBoxCreate("You cannot afford to purchase the TOR router!");e.loseMoney(o.CONSTANTS.TorRouterCost);const t=l.safetlyCreateUniqueServer({ip:s.createUniqueRandomIp(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});s.AddToAllServers(t),u.SpecialServerIps.addIp("Darkweb Server",t.ip),e.getHomeComputer().serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.getHomeComputer().ip),h.dialogBoxCreate("You have purchased a TOR router!
You now have access to the dark web from your home computer.
Use the scan/scan-analyze commands to search for the dark web connection.")}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoupdatingStdButton=void 0;const o=i(n(0));t.AutoupdatingStdButton=class extends o.Component{constructor(e){super(e),this.interval=0,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}render(){const e=null!=this.props.tooltip&&""!==this.props.tooltip;let t=this.props.disabled?"std-button-disabled":"std-button";e&&(t+=" tooltip");const n={__html:this.props.tooltip?this.props.tooltip:""};return o.createElement("button",{className:t,onClick:this.props.onClick,style:this.props.style},this.props.text,e&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:n}))}}},,,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SuccessChance=void 0;const r=a(n(0)),i=n(20);t.SuccessChance=function(e){return e.chance[0]===e.chance[1]?r.default.createElement(r.default.Fragment,null,i.formatNumber(100*e.chance[0],1),"%"):r.default.createElement(r.default.Fragment,null,i.formatNumber(100*e.chance[0],1),"% ~ ",i.formatNumber(100*e.chance[1],1),"%")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationType=void 0,function(e){e[e.Company=0]="Company",e[e.Gym=1]="Gym",e[e.Hospital=2]="Hospital",e[e.Slums=3]="Slums",e[e.Special=4]="Special",e[e.StockMarket=5]="StockMarket",e[e.TechVendor=6]="TechVendor",e[e.TravelAgency=7]="TravelAgency",e[e.University=8]="University",e[e.Casino=9]="Casino"}(t.LocationType||(t.LocationType={}))},,,,,,,,,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.gangMemberUpgradesMetadata=t.UpgradeType=void 0,function(e){e.Weapon="w",e.Armor="a",e.Vehicle="v",e.Rootkit="r",e.Augmentation="g"}(a=t.UpgradeType||(t.UpgradeType={})),t.gangMemberUpgradesMetadata=[{cost:1e6,mults:{str:1.04,def:1.04},name:"Baseball Bat",upgType:a.Weapon},{cost:12e6,mults:{str:1.08,def:1.08,dex:1.08},name:"Katana",upgType:a.Weapon},{cost:25e6,mults:{str:1.1,def:1.1,dex:1.1,agi:1.1},name:"Glock 18C",upgType:a.Weapon},{cost:5e7,mults:{str:1.12,def:1.1,agi:1.1},name:"P90C",upgType:a.Weapon},{cost:6e7,mults:{str:1.2,def:1.15},name:"Steyr AUG",upgType:a.Weapon},{cost:1e8,mults:{str:1.25,def:1.2},name:"AK-47",upgType:a.Weapon},{cost:15e7,mults:{str:1.3,def:1.25},name:"M15A10 Assault Rifle",upgType:a.Weapon},{cost:225e6,mults:{str:1.3,dex:1.25,agi:1.3},name:"AWM Sniper Rifle",upgType:a.Weapon},{cost:2e6,mults:{def:1.04},name:"Bulletproof Vest",upgType:a.Armor},{cost:5e6,mults:{def:1.08},name:"Full Body Armor",upgType:a.Armor},{cost:25e6,mults:{def:1.15,agi:1.15},name:"Liquid Body Armor",upgType:a.Armor},{cost:4e7,mults:{def:1.2},name:"Graphene Plating Armor",upgType:a.Armor},{cost:3e6,mults:{agi:1.04,cha:1.04},name:"Ford Flex V20",upgType:a.Vehicle},{cost:9e6,mults:{agi:1.08,cha:1.08},name:"ATX1070 Superbike",upgType:a.Vehicle},{cost:18e6,mults:{agi:1.12,cha:1.12},name:"Mercedes-Benz S9001",upgType:a.Vehicle},{cost:3e7,mults:{agi:1.16,cha:1.16},name:"White Ferrari",upgType:a.Vehicle},{cost:5e6,mults:{hack:1.05},name:"NUKE Rootkit",upgType:a.Rootkit},{cost:25e6,mults:{hack:1.1},name:"Soulstealer Rootkit",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Demon Rootkit",upgType:a.Rootkit},{cost:4e7,mults:{hack:1.12},name:"Hmap Node",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Jack the Ripper",upgType:a.Rootkit},{cost:1e10,mults:{str:1.3,dex:1.3},name:"Bionic Arms",upgType:a.Augmentation},{cost:1e10,mults:{agi:1.6},name:"Bionic Legs",upgType:a.Augmentation},{cost:15e9,mults:{str:1.15,def:1.15,dex:1.15,agi:1.15},name:"Bionic Spine",upgType:a.Augmentation},{cost:2e10,mults:{str:1.4,def:1.4},name:"BrachiBlades",upgType:a.Augmentation},{cost:12e9,mults:{str:1.2,def:1.2},name:"Nanofiber Weave",upgType:a.Augmentation},{cost:25e9,mults:{str:1.5,agi:1.5},name:"Synthetic Heart",upgType:a.Augmentation},{cost:15e9,mults:{str:1.3,def:1.3},name:"Synfibril Muscle",upgType:a.Augmentation},{cost:5e9,mults:{hack:1.05},name:"BitWire",upgType:a.Augmentation},{cost:1e10,mults:{hack:1.15},name:"Neuralstimulator",upgType:a.Augmentation},{cost:75e8,mults:{hack:1.1},name:"DataJack",upgType:a.Augmentation},{cost:5e10,mults:{str:1.7,def:1.7},name:"Graphene Bone Lacings",upgType:a.Augmentation}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;t.EventEmitter=class{constructor(e){if(this.subscribers={},Array.isArray(e))for(const t of e)this.addSubscriber(t)}addSubscriber(e){this.subscribers[e.id]=e.cb}emitEvent(...e){for(const t in this.subscribers)(0,this.subscribers[t])(e)}removeSubscriber(e){delete this.subscribers[e]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=void 0;const a=n(705),r=n(21),i=n(1141),o=n(416),s=n(27);class l extends a.BaseServer{constructor(e={hostname:"",ip:o.createRandomIp()}){super(e),this.backdoorInstalled=!1,this.baseDifficulty=1,this.hackDifficulty=1,this.minDifficulty=1,this.moneyAvailable=0,this.moneyMax=0,this.numOpenPortsRequired=5,this.openPortCount=0,this.purchasedByPlayer=!1,this.requiredHackingSkill=1,this.serverGrowth=1,this.hostname.startsWith("hacknet-node-")&&(this.hostname=i.createRandomString(10)),this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.maxRam=null!=e.maxRam?e.maxRam:0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*r.BitNodeMultipliers.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*r.BitNodeMultipliers.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*r.BitNodeMultipliers.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=e.serverGrowth?e.serverGrowth:1,this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5}capDifficulty(){this.hackDifficulty100&&(this.hackDifficulty=100)}changeMinimumSecurity(e,t=!1){t?this.minDifficulty*=e:this.minDifficulty+=e,this.minDifficulty=Math.max(1,this.minDifficulty)}changeMaximumMoney(e,t=!1){t?this.moneyMax*=e:this.moneyMax+=e}fortify(e){this.hackDifficulty+=e,this.capDifficulty()}weaken(e){this.hackDifficulty-=e*r.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()}toJSON(){return s.Generic_toJSON("Server",this)}static fromJSON(e){return s.Generic_fromJSON(l,e.data)}}t.Server=l,s.Reviver.constructors.Server=l},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"calculateRamUsage",function(){return calculateRamUsage});var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(213),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(109),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(159),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(10),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__);const specialReferenceIF="__SPECIAL_referenceIf",specialReferenceFOR="__SPECIAL_referenceFor",specialReferenceWHILE="__SPECIAL_referenceWhile",memCheckGlobalKey=".__GLOBAL__";async function parseOnlyRamCalculate(otherScripts,code,workerScript){try{let dependencyMap={};const completedParses=new Set,parseQueue=[];function parseCode(e,t){const n=parseOnlyCalculateDeps(e,t);completedParses.add(t);for(let e=0;e0;){const nextModule=parseQueue.shift();let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const e in module)"function"==typeof module[e]&&(code+=module[e].toString()+";\n")}catch(e){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.URLImportError}else{if(!Array.isArray(otherScripts))return console.warn("parseOnlyRamCalculate() not called with array of scripts"),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.ImportError;let e=null,t=nextModule.startsWith("./")?nextModule.slice(2):nextModule;for(const n of otherScripts)if(n.filename===t){e=n;break}if(null==e)return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.ImportError;code=e.code}parseCode(code,nextModule)}let ram=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptBaseRamCost;const unresolvedRefs=Object.keys(dependencyMap).filter(e=>e.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const e=unresolvedRefs.shift();if("hacknet"!==e||resolvedRefs.has("hacknet")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptHacknetNodesRamCost),"document"!==e||resolvedRefs.has("document")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptDomRamCost),"window"!==e||resolvedRefs.has("window")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCostConstants.ScriptDomRamCost),resolvedRefs.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t);try{function applyFuncRam(e){if("function"!=typeof e)return 0;try{let t;return"number"==typeof(t="AsyncFunction"===e.constructor.name?0:e.apply(null,[]))?t:0}catch(e){return console.error(`Error applying function: ${e}`),0}}if(workerScript.loadedFns[e])continue;let t;workerScript.loadedFns[e]=!0,t=e in workerScript.env.vars.bladeburner?workerScript.env.vars.bladeburner[e]:e in workerScript.env.vars.codingcontract?workerScript.env.vars.codingcontract[e]:e in workerScript.env.vars.gang?workerScript.env.vars.gang[e]:e in workerScript.env.vars.sleeve?workerScript.env.vars.sleeve[e]:workerScript.env.vars[e],ram+=applyFuncRam(t)}catch(e){continue}}return ram}catch(e){return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}}function parseOnlyCalculateDeps(e,t){const n=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.b)(e,{sourceType:"module",ecmaVersion:9}),a=t+memCheckGlobalKey,r={};r[a]=new Set;let i={};var o=[];function s(e,n){const a=r[e]||(r[e]=new Set);n in i&&a.add(i[n]),a.add(t+"."+n),a.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(e,t)=>{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,specialReferenceFOR),e.init&&n(e.init,t),e.test&&n(e.test,t),e.update&&n(e.update,t),e.body&&n(e.body,t)},IfStatement:(e,t,n)=>{s(t.key,specialReferenceIF),e.test&&n(e.test,t),e.consequent&&n(e.consequent,t),e.alternate&&n(e.alternate,t)},MemberExpression:(e,t,n)=>{e.object&&n(e.object,t),e.property&&n(e.property,t)}}}return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(n,{key:a},Object.assign({ImportDeclaration:(e,t)=>{const n=e.source.value;o.push(n),r[t.key].add(n+memCheckGlobalKey);for(let a=0;a{const n=t+"."+e.id.name;acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(e,{key:n},c())}},c())),{dependencyMap:r,additionalModules:o}}async function calculateRamUsage(e,t){const n={loadedFns:{},env:{vars:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.RamCosts}};try{return await parseOnlyRamCalculate(t,e,n)}catch(e){return console.error("Failed to parse script for RAM calculations:"),console.error(e),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.RamCalculationErrorCode.SyntaxError}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;const a=n(1),r=n(36),i=n(238),o=n(27),s=n(150);class l{constructor(e=null){this.name="",this.desc="",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=100,this.difficultyFac=1.01,this.rewardFac=1.02,this.successes=0,this.failures=0,this.rankGain=0,this.rankLoss=0,this.hpLoss=0,this.hpLost=0,this.isStealth=!1,this.isKill=!1,this.count=r.getRandomInt(1e3,25e3),this.countGrowth=r.getRandomInt(1,5),this.weights={hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7},this.decays={hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.teamCount=0,e&&e.name&&(this.name=e.name),e&&e.desc&&(this.desc=e.desc),e&&e.baseDifficulty&&(this.baseDifficulty=i.addOffset(e.baseDifficulty,10)),e&&e.difficultyFac&&(this.difficultyFac=e.difficultyFac),e&&e.rewardFac&&(this.rewardFac=e.rewardFac),e&&e.rankGain&&(this.rankGain=e.rankGain),e&&e.rankLoss&&(this.rankLoss=e.rankLoss),e&&e.hpLoss&&(this.hpLoss=e.hpLoss),e&&e.isStealth&&(this.isStealth=e.isStealth),e&&e.isKill&&(this.isKill=e.isKill),e&&e.count&&(this.count=e.count),e&&e.countGrowth&&(this.countGrowth=e.countGrowth),e&&e.weights&&(this.weights=e.weights),e&&e.decays&&(this.decays=e.decays);let t=0;for(const e in this.weights)this.weights.hasOwnProperty(e)&&(t+=this.weights[e]);if(t-1>=10*Number.EPSILON)throw new Error("Invalid weights when constructing Action "+this.name+". The weights should sum up to 1. They sum up to :1");for(const e in this.decays)if(this.decays.hasOwnProperty(e)&&this.decays[e]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}getDifficulty(){const e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e}attempt(e){return Math.random()s.BladeburnerConstants.ChaosThreshold){const e=t.chaos-s.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}getEstSuccessChance(e){function t(e){return Math.max(0,Math.min(e,1))}const n=this.getSuccessChance(e,{est:!0}),a=this.getSuccessChance(e),r=Math.abs(a-n);let i=a-r,o=a+r;const s=e.getCurrentCity(),l=s.pop/s.popEst;return l<1?i*=l:o*=l,[t(i),t(o)]}getSuccessChance(e,t={est:!1}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");let n=this.getDifficulty(),r=0;for(const t in this.weights)if(this.weights.hasOwnProperty(t)){const n=a.Player.queryStatFromString(t),i="eff"+t.charAt(0).toUpperCase()+t.slice(1);let o=e.skillMultipliers[i];null==o&&(console.error(`Failed to find Bladeburner Skill multiplier for: ${t}`),o=1),r+=this.weights[t]*Math.pow(o*n,this.decays[t])}if(r*=a.Player.getIntelligenceBonus(.75),r*=e.calculateStaminaPenalty(),r*=this.getTeamSuccessBonus(e),r*=this.getChaosCompetencePenalty(e,t),n*=this.getChaosDifficultyBonus(e),"Raid"==this.name&&e.getCurrentCity().comms<=0)return 0;if(r*=e.skillMultipliers.successChanceAll,r*=this.getActionTypeSkillSuccessBonus(e),this.isStealth&&(r*=e.skillMultipliers.successChanceStealth),this.isKill&&(r*=e.skillMultipliers.successChanceKill),r*=a.Player.bladeburner_success_chance_mult,isNaN(r))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,r/n)}getSuccessesNeededForNextLevel(e){return Math.ceil(.5*this.maxLevel*(2*e+(this.maxLevel-1)))}setMaxLevel(e){this.successes>=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel}toJSON(){return o.Generic_toJSON("Action",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.Action=l,o.Reviver.constructors.Action=l},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSleevePurchasableAugs=void 0;const a=n(14),r=n(4),i=n(16);t.findSleevePurchasableAugs=function(e,t){const n=e.augmentations.map(e=>e.name),o=[];function s(e){return e.name!==r.AugmentationNames.NeuroFluxGovernor&&!n.includes(e.name)&&!o.includes(e)&&!e.isSpecial}if(t.inGang()){const e=t.getGangFaction();for(const t in a.Augmentations){const n=a.Augmentations[t];s(n)&&e.playerReputation>n.baseRepRequirement&&o.push(n)}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.Factions[e];if(null!=t)for(const e of t.augmentations){const n=a.Augmentations[e];s(n)&&t.playerReputation>n.baseRepRequirement&&o.push(n)}}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateServerGrowth=void 0;const a=n(11),r=n(21);t.calculateServerGrowth=function(e,t,n,i=1){const o=Math.max(Math.floor(t),0);let s=1+(a.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;s>a.CONSTANTS.ServerMaxGrowthRate&&(s=a.CONSTANTS.ServerMaxGrowthRate);const l=o*(e.serverGrowth/100)*r.BitNodeMultipliers.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*n.hacking_grow_mult*c)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeLoadingScreen=void 0;const a=n(198),r=n(49);t.removeLoadingScreen=function(){r.removeElementById("loader"),a.getElementById("entire-game-container").style.visibility="visible"}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveScriptsRoot=void 0;const o=i(n(0)),s=n(945),l=n(944);t.ActiveScriptsRoot=class extends o.Component{constructor(e){super(e)}render(){return o.createElement(o.Fragment,null,o.createElement("p",null,"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running."),o.createElement(s.ScriptProduction,Object.assign({},this.props)),o.createElement(l.ServerAccordions,Object.assign({},this.props)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.clearResleevesPage=t.createResleevesPage=void 0;const o=n(947),s=n(14),l=n(3),c=n(31),u=n(19),m=n(12),p=n(97),d=n(13),h=n(431),_=n(181),g=n(156),f=n(172),y=i(n(0)),b=n(415),E={container:null,info:null,sortTag:null,sortSelector:null,resleeveList:null,resleeves:null};let v;function C(e){const t={container:null,statsPanel:null,stats:null,multipliersButton:null,augPanel:null,augSelector:null,augDescription:null,costPanel:null,costText:null,buyButton:null};if(!u.routing.isOn(u.Page.Resleeves))return t;t.container=d.createElement("div",{class:"resleeve-container",display:"block"}),t.statsPanel=d.createElement("div",{class:"resleeve-panel",width:"30%"}),t.stats=d.createElement("p",{class:"resleeve-stats-text",innerHTML:`Hacking: ${l.numeralWrapper.formatSkill(e.hacking_skill)} (${l.numeralWrapper.formatExp(e.hacking_exp)} exp)
`+`Strength: ${l.numeralWrapper.formatSkill(e.strength)} (${l.numeralWrapper.formatExp(e.strength_exp)} exp)
`+`Defense: ${l.numeralWrapper.formatSkill(e.defense)} (${l.numeralWrapper.formatExp(e.defense_exp)} exp)
`+`Dexterity: ${l.numeralWrapper.formatSkill(e.dexterity)} (${l.numeralWrapper.formatExp(e.dexterity_exp)} exp)
`+`Agility: ${l.numeralWrapper.formatSkill(e.agility)} (${l.numeralWrapper.formatExp(e.agility_exp)} exp)
`+`Charisma: ${l.numeralWrapper.formatSkill(e.charisma)} (${l.numeralWrapper.formatExp(e.charisma_exp)} exp)
`+`# Augmentations: ${e.augmentations.length}`}),t.multipliersButton=d.createElement("button",{class:"std-button",innerText:"Multipliers",clickListener:()=>{m.dialogBoxCreate(["

Total Multipliers:

",`Hacking Level multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_mult)}`,`Hacking Experience multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_exp_mult)}`,`Strength Level multiplier: ${l.numeralWrapper.formatPercentage(e.strength_mult)}`,`Strength Experience multiplier: ${l.numeralWrapper.formatPercentage(e.strength_exp_mult)}`,`Defense Level multiplier: ${l.numeralWrapper.formatPercentage(e.defense_mult)}`,`Defense Experience multiplier: ${l.numeralWrapper.formatPercentage(e.defense_exp_mult)}`,`Dexterity Level multiplier: ${l.numeralWrapper.formatPercentage(e.dexterity_mult)}`,`Dexterity Experience multiplier: ${l.numeralWrapper.formatPercentage(e.dexterity_exp_mult)}`,`Agility Level multiplier: ${l.numeralWrapper.formatPercentage(e.agility_mult)}`,`Agility Experience multiplier: ${l.numeralWrapper.formatPercentage(e.agility_exp_mult)}`,`Charisma Level multiplier: ${l.numeralWrapper.formatPercentage(e.charisma_mult)}`,`Charisma Experience multiplier: ${l.numeralWrapper.formatPercentage(e.charisma_exp_mult)}`,`Hacking Chance multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_chance_mult)}`,`Hacking Speed multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_speed_mult)}`,`Hacking Money multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_money_mult)}`,`Hacking Growth multiplier: ${l.numeralWrapper.formatPercentage(e.hacking_grow_mult)}`,`Salary multiplier: ${l.numeralWrapper.formatPercentage(e.work_money_mult)}`,`Company Reputation Gain multiplier: ${l.numeralWrapper.formatPercentage(e.company_rep_mult)}`,`Faction Reputation Gain multiplier: ${l.numeralWrapper.formatPercentage(e.faction_rep_mult)}`,`Crime Money multiplier: ${l.numeralWrapper.formatPercentage(e.crime_money_mult)}`,`Crime Success multiplier: ${l.numeralWrapper.formatPercentage(e.crime_success_mult)}`,`Hacknet Income multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_money_mult)}`,`Hacknet Purchase Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_purchase_cost_mult)}`,`Hacknet Level Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_level_cost_mult)}`,`Hacknet Ram Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_ram_cost_mult)}`,`Hacknet Core Upgrade Cost multiplier: ${l.numeralWrapper.formatPercentage(e.hacknet_node_core_cost_mult)}`,`Bladeburner Max Stamina multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_max_stamina_mult)}`,`Bladeburner Stamina Gain multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_stamina_gain_mult)}`,`Bladeburner Field Analysis multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_analysis_mult)}`,`Bladeburner Success Chance multiplier: ${l.numeralWrapper.formatPercentage(e.bladeburner_success_chance_mult)}`].join("
"),!1)}}),t.statsPanel.appendChild(t.stats),t.statsPanel.appendChild(t.multipliersButton),t.augPanel=d.createElement("div",{class:"resleeve-panel",width:"50%"}),t.augSelector=d.createElement("select",{class:"resleeve-aug-selector dropdown"}),t.augDescription=d.createElement("p");for(let n=0;n{!function(e){if(null==e.augDescription)throw new Error("elems.augDescription is null in updateAugDescription()");const t=_.getSelectValue(e.augSelector),n=s.Augmentations[t];if(null==n)return void console.warn(`Could not find Augmentation with name ${t}`);let a=n.info;"string"!=typeof a&&(a=b.renderToStaticMarkup(a));e.augDescription.innerHTML=a}(t)}),t.augSelector.dispatchEvent(new Event("change")),t.augPanel.appendChild(t.augSelector),t.augPanel.appendChild(t.augDescription);const n=e.getCost();return t.costPanel=d.createElement("div",{class:"resleeve-panel",width:"20%"}),t.costText=d.createElement("p",{innerHTML:`It costs ${b.renderToStaticMarkup(c.Money(n))} `+"to purchase this Sleeve."}),t.buyButton=d.createElement("button",{class:"std-button",innerText:"Purchase",clickListener:()=>{if(null==v)throw new Error("playerRef is null in buyButton.click()");o.purchaseResleeve(e,v)?m.dialogBoxCreate(y.createElement(y.Fragment,null,"You re-sleeved for ",c.Money(n),"!"),!1):m.dialogBoxCreate("You cannot afford to re-sleeve into this body",!1)}}),t.costPanel.appendChild(t.costText),t.costPanel.appendChild(t.buyButton),t.container.appendChild(t.statsPanel),t.container.appendChild(t.augPanel),t.container.appendChild(t.costPanel),t}t.createResleevesPage=function(e){if(u.routing.isOn(u.Page.Resleeves))try{let t;v=e,E.container=d.createElement("div",{class:"generic-menupage-container",id:"resleeves-container",position:"fixed"}),E.info=d.createElement("p",{display:"block",innerHTML:"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!

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

NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.",width:"75%"}),0===e.resleeves.length&&(e.resleeves=o.generateResleeves()),E.sortTag=d.createElement("p",{display:"inline-block",innerText:"Sort By: "}),E.sortSelector=d.createElement("select",{class:"dropdown"}),function(e){e.Cost="Cost",e.Hacking="Hacking",e.Strength="Strength",e.Defense="Defense",e.Dexterity="Dexterity",e.Agility="Agility",e.Charisma="Charisma",e.AverageCombatStats="AverageCombat",e.AverageAllStats="AverageAllStats",e.TotalNumAugmentations="TotalNumAugmentations"}(t||(t={})),E.sortSelector.add(h.createOptionElement("Cost",t.Cost)),E.sortSelector.add(h.createOptionElement("Hacking Level",t.Hacking)),E.sortSelector.add(h.createOptionElement("Strength Level",t.Strength)),E.sortSelector.add(h.createOptionElement("Defense Level",t.Defense)),E.sortSelector.add(h.createOptionElement("Dexterity Level",t.Dexterity)),E.sortSelector.add(h.createOptionElement("Agility Level",t.Agility)),E.sortSelector.add(h.createOptionElement("Charisma Level",t.Charisma)),E.sortSelector.add(h.createOptionElement("Average Combat Stats",t.AverageCombatStats)),E.sortSelector.add(h.createOptionElement("Average Stats",t.AverageAllStats)),E.sortSelector.add(h.createOptionElement("Number of Augmentations",t.TotalNumAugmentations)),E.resleeveList=d.createElement("ul"),E.sortSelector.onchange=(()=>{function n(...e){let t=0;for(let n=0;ne.hacking_skill-t.hacking_skill);break;case t.Strength:e.resleeves.sort((e,t)=>e.strength-t.strength);break;case t.Defense:e.resleeves.sort((e,t)=>e.defense-t.defense);break;case t.Dexterity:e.resleeves.sort((e,t)=>e.dexterity-t.dexterity);break;case t.Agility:e.resleeves.sort((e,t)=>e.agility-t.agility);break;case t.Charisma:e.resleeves.sort((e,t)=>e.charisma-t.charisma);break;case t.AverageCombatStats:e.resleeves.sort((e,t)=>n(e.strength,e.defense,e.dexterity,e.agility)-n(t.strength,t.defense,t.dexterity,t.agility));break;case t.AverageAllStats:e.resleeves.sort((e,t)=>n(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-n(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma));break;case t.TotalNumAugmentations:e.resleeves.sort((e,t)=>e.augmentations.length-t.augmentations.length);break;case t.Cost:default:e.resleeves.sort((e,t)=>e.getCost()-t.getCost())}if(null==E.resleeveList)throw new Error("UIElems.resleeveList is null in sortSelector.click()");if(null==E.resleeves)throw new Error("UIElems.resleeves is null in sortSelector.click()");for(const t of e.resleeves){const e=C(t);if(null==e.container)throw new Error("resleeveUi.container is null in sortSelector.click()");E.resleeveList.appendChild(e.container),E.resleeves.push(e)}}),E.sortSelector.dispatchEvent(new Event("change")),E.container.appendChild(E.info),E.container.appendChild(d.createElement("br")),E.container.appendChild(E.sortTag),E.container.appendChild(E.sortSelector),E.container.appendChild(E.resleeveList);const n=document.getElementById("entire-game-container");if(null==n)throw new Error("Could not find entire-game-container in createResleevesPage()");n.appendChild(E.container)}catch(e){p.exceptionAlert(e)}},t.clearResleevesPage=function(){E.container instanceof HTMLElement&&f.removeElement(E.container);for(const e in E)E[e]=null;v=null}},,,,,,function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});n(4),n(99),n(184),n(35),n(32),n(16),n(1),n(461),n(23),n(24),n(108),n(52),n(100),n(199),n(17),n(118),n(12),n(13);var a=n(49),r=(n(31),n(0)),i=n.n(r);n(22);i.a.Component;const o="dev-menu-container";function s(){throw new Error("Cannot create Dev Menu because you are not in a dev build")}function l(){Object(a.removeElementById)(o)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.executeDarkwebTerminalCommand=t.checkIfConnectedToDarkweb=void 0;const o=i(n(0)),s=n(305),l=n(1),c=n(45),u=n(7),m=n(31),p=n(704);t.checkIfConnectedToDarkweb=function(){if(c.SpecialServerIps.hasOwnProperty("Darkweb Server")){const e=c.SpecialServerIps.getIp("Darkweb Server");if(!p.isValidIPAddress(e))return;e==l.Player.getCurrentServer().ip&&u.post("You are now connected to the dark web. From the dark web you can purchase illegal items. Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] to purchase an item.")}},t.executeDarkwebTerminalCommand=function(e){if(0!=e.length)switch(e[0]){case"buy":{if(2!=e.length)return u.post("Incorrect number of arguments. Usage: "),u.post("buy -l"),void u.post("buy [item name]");const t=e[1];"-l"==t||"-1"==t||"--list"==t?function(){for(const e in s.DarkWebItems){const t=s.DarkWebItems[e];u.postElement(o.createElement(o.Fragment,null,t.program," - ",m.Money(t.price)," - ",t.description))}}():function(e){e=e.toLowerCase();let t=null;for(const n in s.DarkWebItems){const a=s.DarkWebItems[n];a.program.toLowerCase()==e&&(t=a)}null!==t?l.Player.hasProgram(t.program)?u.post("You already have the "+t.program+" program"):l.Player.money.lt(t.price)?u.post("Not enough money to purchase "+t.program):(l.Player.loseMoney(t.price),l.Player.getHomeComputer().programs.push(t.program),u.post("You have purchased the "+t.program+" program. The new program can be found on your home computer.")):u.post("Unrecognized item: "+e)}(t);break}default:u.post("Command not found")}}},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(23),o=n(86);const s={All:0,Foreign:1,Owned:2,Purchased:3};class l extends r.a.Component{isValidServer(e){const t=this.props.serverType;switch(t){case s.All:return!0;case s.Foreign:return"home"!==e.hostname&&!e.purchasedByPlayer;case s.Owned:return e.purchasedByPlayer||e instanceof o.HacknetServer||"home"===e.hostname;case s.Purchased:return e.purchasedByPlayer||e instanceof o.HacknetServer;default:return console.warn(`Invalid ServerType specified for ServerDropdown component: ${t}`),!1}}renderOption(e){return r.a.createElement("option",{key:e.hostname,value:e.hostname},e.hostname)}render(){const e=[];for(const t in i.AllServers){const n=i.AllServers[t];this.isValidServer(n)&&e.push(this.renderOption(n))}return r.a.createElement("select",{className:"dropdown",onChange:this.props.onChange,style:this.props.style},e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetNode=void 0;const a=n(11),r=n(160),i=n(37),o=n(12),s=n(27);class l{constructor(e="",t=1){this.cores=1,this.level=1,this.moneyGainRatePerSecond=0,this.onlineTimeSeconds=0,this.ram=1,this.totalMoneyGenerated=0,this.name=e,this.updateMoneyGainRate(t)}calculateCoreUpgradeCost(e=1,t){return r.calculateCoreUpgradeCost(this.cores,e,t)}calculateLevelUpgradeCost(e=1,t){return r.calculateLevelUpgradeCost(this.level,e,t)}calculateRamUpgradeCost(e=1,t){return r.calculateRamUpgradeCost(this.ram,e,t)}process(e=1){const t=e*a.CONSTANTS.MilliPerCycle/1e3;let n=this.moneyGainRatePerSecond*t;return isNaN(n)&&(console.error(`Hacknet Node ${this.name} calculated earnings of NaN`),n=0),this.totalMoneyGenerated+=n,this.onlineTimeSeconds+=t,n}upgradeCore(e=1,t){this.cores=Math.min(i.HacknetNodeConstants.MaxCores,Math.round(this.cores+e)),this.updateMoneyGainRate(t)}upgradeLevel(e=1,t){this.level=Math.min(i.HacknetNodeConstants.MaxLevel,Math.round(this.level+e)),this.updateMoneyGainRate(t)}upgradeRam(e=1,t){for(let t=0;t=t.AllCorporationStates.length)&&(this.state=0),++this.state,this.state>=t.AllCorporationStates.length&&(this.state=0)}toJSON(){return a.Generic_toJSON("CorporationState",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.CorporationState=r,a.Reviver.constructors.CorporationState=r},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionButton=void 0;const o=i(n(0));t.AccordionButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n="accordion-button";t&&(n+=" tooltip"),"string"==typeof e.addClasses&&(n+=` ${e.addClasses}`);const a={__html:e.tooltip?e.tooltip:""};return o.createElement("button",{className:n,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:a}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScriptAccordion=void 0;const o=i(n(0)),s=n(3),l=n(167),c=n(564),u=n(78),m=n(12),p=n(158),d=n(20),h=n(117),_=n(31);t.WorkerScriptAccordion=function(e){const t=e.workerScript.scriptRef,n=p.logBoxCreate.bind(null,t),a=u.killWorkerScript.bind(null,t,t.server),r=t.onlineMoneyMade/t.onlineRunningTime,i=t.onlineExpGained/t.onlineRunningTime,g=t.offlineMoneyMade/t.offlineRunningTime,f=t.offlineExpGained/t.offlineRunningTime;return o.createElement(l.Accordion,{headerClass:"active-scripts-script-header",headerContent:o.createElement(o.Fragment,null,e.workerScript.name),panelClass:"active-scripts-script-panel",panelContent:o.createElement(o.Fragment,null,o.createElement("pre",null,"Threads: ",s.numeralWrapper.formatThreads(e.workerScript.scriptRef.threads)),o.createElement("pre",null,"Args: ",h.arrayToString(e.workerScript.args)),o.createElement("pre",null,"Online Time: ",d.convertTimeMsToTimeElapsedString(1e3*t.onlineRunningTime)),o.createElement("pre",null,"Offline Time: ",d.convertTimeMsToTimeElapsedString(1e3*t.offlineRunningTime)),o.createElement("pre",null,"Total online production: ",_.Money(t.onlineMoneyMade)),o.createElement("pre",null,Array(26).join(" ")+s.numeralWrapper.formatExp(t.onlineExpGained)+" hacking exp"),o.createElement("pre",null,"Online production rate: ",_.Money(r)," / second"),o.createElement("pre",null,Array(25).join(" ")+s.numeralWrapper.formatExp(i)+" hacking exp / second"),o.createElement("pre",null,"Total offline production: ",_.Money(t.offlineMoneyMade)),o.createElement("pre",null,Array(27).join(" ")+s.numeralWrapper.formatExp(t.offlineExpGained)+" hacking exp"),o.createElement("pre",null,"Offline production rate: ",_.Money(g)," / second"),o.createElement("pre",null,Array(26).join(" ")+s.numeralWrapper.formatExp(f)+" hacking exp / second"),o.createElement(c.AccordionButton,{onClick:n,text:"Log"}),o.createElement(c.AccordionButton,{onClick:function(){a(),m.dialogBoxCreate("Killing script")},text:"Kill Script"}))})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.Card=t.Suit=void 0,function(e){e.Clubs="clubs",e.Diamonds="diamonds",e.Hearts="hearts",e.Spades="spades"}(a=t.Suit||(t.Suit={}));t.Card=class{constructor(e,t){if(this.value=e,this.suit=t,e<1||e>13)throw new Error(`Card instantiated with improper value: ${e}`)}formatValue(){switch(this.value){case 1:return"A";case 11:return"J";case 12:return"Q";case 13:return"K";default:return`${this.value}`}}isRedSuit(){return this.suit===a.Hearts||this.suit===a.Diamonds}getStringRepresentation(){return`${this.formatValue()} of ${this.suit}`}}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlinkingCursor=void 0;const r=a(n(0));t.BlinkingCursor=function(){return r.default.createElement("span",{style:{fontSize:"1em"},className:"blinking-cursor"},"|")}},,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TeamSizePopup=void 0;const o=i(n(0)),s=n(79),l=n(12);t.TeamSizePopup=function(e){const[t,n]=o.useState();return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."),o.default.createElement("input",{autoFocus:!0,type:"number",placeholder:"Team size",className:"text-input",onChange:e=>n(parseFloat(e.target.value))}),o.default.createElement("a",{className:"a-link-button",onClick:function(){if(void 0===t)return;const n=Math.round(t);isNaN(n)||n<0?l.dialogBoxCreate("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=n,s.removePopup(e.popupId)}},"Confirm"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationAccordion=void 0;const o=i(n(0)),s=n(167),l=n(4);t.AugmentationAccordion=function(e){let t=e.aug.name;return null!=e.level&&e.aug.name===l.AugmentationNames.NeuroFluxGovernor&&(t+=` - Level ${e.level}`),"string"==typeof e.aug.info?o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,t),panelContent:o.createElement("p",null,o.createElement("span",{dangerouslySetInnerHTML:{__html:e.aug.info}}),o.createElement("br",null),o.createElement("br",null),e.aug.stats)}):o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,t),panelContent:o.createElement("p",null,e.aug.info,o.createElement("br",null),o.createElement("br",null),e.aug.stats)})}},,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButtonPurchased=void 0;const o=i(n(0));t.StdButtonPurchased=class extends o.Component{constructor(e){super(e),this.hasTooltip=this.hasTooltip.bind(this),this.tooltip=this.tooltip.bind(this)}hasTooltip(){return null!=this.props.tooltip&&""!==this.props.tooltip}tooltip(){return this.props.tooltip?this.props.tooltip:""}render(){let e="std-button-bought";this.hasTooltip()&&(e+=" tooltip");let t={__html:""};return this.hasTooltip()&&(t={__html:this.tooltip()}),o.createElement("button",{className:e,onClick:this.props.onClick,style:this.props.style},this.props.text,this.hasTooltip()&&o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t}))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorPositions=t.PositionTracker=void 0;class a{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}t.PositionTracker=a,t.CursorPositions=new a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberTask=void 0;t.GangMemberTask=class{constructor(e,t,n,a,r){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=a,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangConstants=void 0,t.GangConstants={GangRespectToReputationRatio:25,MaximumGangMembers:12,CyclesPerTerritoryAndPowerUpdate:100,AscensionMultiplierRatio:.15,Names:["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidIPAddress=void 0,t.isValidIPAddress=function(e){const t="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n=`^${t}.${t}.${t}.${t}$`;return new RegExp(n).test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseServer=void 0;const a=n(99),r=n(237),i=n(94),o=n(145),s=n(74),l=n(416),c=n(204);t.BaseServer=class{constructor(e={hostname:"",ip:l.createRandomIp()}){this.contracts=[],this.cpuCores=1,this.ftpPortOpen=!1,this.hasAdminRights=!1,this.hostname="",this.httpPortOpen=!1,this.ip="",this.isConnectedTo=!1,this.maxRam=0,this.messages=[],this.organizationName="",this.programs=[],this.ramUsed=0,this.runningScripts=[],this.scripts=[],this.serversOnNetwork=[],this.smtpPortOpen=!1,this.sqlPortOpen=!1,this.sshPortOpen=!1,this.textFiles=[],this.ip=e.ip?e.ip:l.createRandomIp(),this.hostname=e.hostname,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights}addContract(e){this.contracts.push(e)}getContract(e){for(const t of this.contracts)if(t.fn===e)return t;return null}getRunningScript(e,t){for(const n of this.runningScripts)if(n.filename===e&&c.compareArrays(n.args,t))return n;return null}getScript(e){for(let t=0;tt.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)}removeFile(e){if(e.endsWith(".exe")||null!=e.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/)){for(let t=0;tr.removePopup(t.PopupId)})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Favor=void 0;const o=i(n(0)),s=n(3);t.Favor=function(e){return o.createElement("span",{className:"light-yellow samefont"},"number"==typeof e?s.numeralWrapper.formatFavor(e):e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skill=void 0;const a=n(21);t.Skill=class{constructor(e={name:"foo",desc:"foo"}){if(this.baseCost=1,this.costInc=1,this.maxLvl=0,this.successChanceAll=0,this.successChanceStealth=0,this.successChanceKill=0,this.successChanceContract=0,this.successChanceOperation=0,this.successChanceEstimate=0,this.actionTime=0,this.effHack=0,this.effStr=0,this.effDef=0,this.effDex=0,this.effAgi=0,this.effCha=0,this.stamina=0,this.money=0,this.expGain=0,!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.name=e.name,this.desc=e.desc,this.baseCost=e.baseCost?e.baseCost:1,this.costInc=e.costInc?e.costInc:1,e.maxLvl&&(this.maxLvl=e.maxLvl),e.successChanceAll&&(this.successChanceAll=e.successChanceAll),e.successChanceStealth&&(this.successChanceStealth=e.successChanceStealth),e.successChanceKill&&(this.successChanceKill=e.successChanceKill),e.successChanceContract&&(this.successChanceContract=e.successChanceContract),e.successChanceOperation&&(this.successChanceOperation=e.successChanceOperation),e.successChanceEstimate&&(this.successChanceEstimate=e.successChanceEstimate),e.actionTime&&(this.actionTime=e.actionTime),e.effHack&&(this.effHack=e.effHack),e.effStr&&(this.effStr=e.effStr),e.effDef&&(this.effDef=e.effDef),e.effDex&&(this.effDex=e.effDex),e.effAgi&&(this.effAgi=e.effAgi),e.effCha&&(this.effCha=e.effCha),e.stamina&&(this.stamina=e.stamina),e.money&&(this.money=e.money),e.expGain&&(this.expGain=e.expGain)}calculateCost(e){return Math.floor((this.baseCost+e*this.costInc)*a.BitNodeMultipliers.BladeburnerSkillCost)}getMultiplier(e){return"successChanceAll"===e?this.successChanceAll:"successChanceStealth"===e?this.successChanceStealth:"successChanceKill"===e?this.successChanceKill:"successChanceContract"===e?this.successChanceContract:"successChanceOperation"===e?this.successChanceOperation:"successChanceEstimate"===e?this.successChanceEstimate:"actionTime"===e?this.actionTime:"effHack"===e?this.effHack:"effStr"===e?this.effStr:"effDef"===e?this.effDef:"effDex"===e?this.effDex:"effAgi"===e?this.effAgi:"effCha"===e?this.effCha:"stamina"===e?this.stamina:"money"===e?this.money:"expGain"===e?this.expGain:0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skills=void 0;const a=n(750),r=n(1309);t.Skills={},t.Skills[r.SkillNames.BladesIntuition]=new a.Skill({name:r.SkillNames.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),t.Skills[r.SkillNames.Cloak]=new a.Skill({name:r.SkillNames.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),t.Skills[r.SkillNames.ShortCircuit]=new a.Skill({name:r.SkillNames.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),t.Skills[r.SkillNames.DigitalObserver]=new a.Skill({name:r.SkillNames.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),t.Skills[r.SkillNames.Tracer]=new a.Skill({name:r.SkillNames.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),t.Skills[r.SkillNames.Overclock]=new a.Skill({name:r.SkillNames.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),t.Skills[r.SkillNames.Reaper]=new a.Skill({name:r.SkillNames.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),t.Skills[r.SkillNames.EvasiveSystem]=new a.Skill({name:r.SkillNames.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),t.Skills[r.SkillNames.Datamancer]=new a.Skill({name:r.SkillNames.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),t.Skills[r.SkillNames.CybersEdge]=new a.Skill({name:r.SkillNames.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),t.Skills[r.SkillNames.HandsOfMidas]=new a.Skill({name:r.SkillNames.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),t.Skills[r.SkillNames.Hyperdrive]=new a.Skill({name:r.SkillNames.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActions=void 0;const a=n(518);t.GeneralActions={},function(){let e;e="Training",t.GeneralActions[e]=new a.Action({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),e="Field Analysis",t.GeneralActions[e]=new a.Action({name:e,desc:"Mine and analyze Synthoid-related data. This improves the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.

Does NOT require stamina."}),e="Recruitment",t.GeneralActions[e]=new a.Action({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.

Does NOT require stamina."}),e="Diplomacy",t.GeneralActions[e]=new a.Action({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.

Does NOT require stamina."}),e="Hyperbolic Regeneration Chamber",t.GeneralActions[e]=new a.Action({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.

"})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const a=n(150),r=n(518),i=n(27);class o extends r.Action{constructor(e=null){super(e),this.reqdRank=100,this.teamCount=0,e&&e.reqdRank&&(this.reqdRank=e.reqdRank),e&&e.teamCount&&(this.teamCount=e.teamCount)}getTeamSuccessBonus(e){if(this.teamCount&&this.teamCount>0){return this.teamCount=Math.min(this.teamCount,e.teamSize),Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(e){const t=e.getCurrentCity();if(t.chaos>a.BladeburnerConstants.ChaosThreshold){const e=t.chaos-a.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}toJSON(){return i.Generic_toJSON("Operation",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Operation=o,i.Reviver.constructors.Operation=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperation=void 0;const a=n(753),r=n(27);class i extends a.Operation{constructor(e=null){super(e),this.count=1,this.countGrowth=0}getActionTimePenalty(){return 1.5}getChaosCompetencePenalty(){return 1}getChaosDifficultyBonus(){return 1}toJSON(){return r.Generic_toJSON("BlackOperation",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.BlackOperation=i,r.Reviver.constructors.BlackOperation=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperations=void 0;const a=n(754);t.BlackOperations={},t.BlackOperations["Operation Typhoon"]=new a.BlackOperation({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.

The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Zero"]=new a.BlackOperation({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.

The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation X"]=new a.BlackOperation({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.

Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Titan"]=new a.BlackOperation({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.

Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ares"]=new a.BlackOperation({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.

Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Archangel"]=new a.BlackOperation({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.

The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Juggernaut"]=new a.BlackOperation({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.

Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Red Dragon"]=new a.BlackOperation({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.

Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation K"]=new a.BlackOperation({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.

We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its creation.",baseDifficulty:15e3,reqdRank:3e4,rankGain:750,rankLoss:60,hpLoss:1e3,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Deckard"]=new a.BlackOperation({name:"Operation Deckard",desc:"Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.

The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.",baseDifficulty:2e4,reqdRank:4e4,rankGain:1e3,rankLoss:75,hpLoss:200,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Tyrell"]=new a.BlackOperation({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.

We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Wallace"]=new a.BlackOperation({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.

The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Shoulder of Orion"]=new a.BlackOperation({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.

The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Hyron"]=new a.BlackOperation({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.

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

The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Morpheus"]=new a.BlackOperation({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.

The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Ion Storm"]=new a.BlackOperation({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.

This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Annihilus"]=new a.BlackOperation({name:"Operation Annihilus",desc:"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.",baseDifficulty:55e3,reqdRank:2e5,rankGain:7500,rankLoss:1e3,hpLoss:1e4,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ultron"]=new a.BlackOperation({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.

OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.

Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).

Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Centurion"]=new a.BlackOperation({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.

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

D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Vindictus"]=new a.BlackOperation({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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

D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Daedalus"]=new a.BlackOperation({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FactionInfos=t.FactionInfo=void 0;class a{constructor(e,t,n,a,r,i){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=a,this.offerFieldWork=r,this.offerSecurityWork=i,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}offersWork(){return this.offerFieldWork||this.offerHackingMission||this.offerHackingWork||this.offerSecurityWork}}t.FactionInfo=a,t.FactionInfos={Illuminati:new a("Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And from this chaos, we are the invisible hand that guides them to order. ",[],!0,!0,!0,!1),Daedalus:new a("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new a("Surrender yourself. Give up your empty individuality to become part of something great, something eternal. Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.

Only then can you discover immortality.",[],!0,!0,!0,!1),ECorp:new a("ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.",[],!0,!0,!0,!0),MegaCorp:new a("MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an unprecendented scale, in ways that no other company can.

In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.",[],!0,!0,!0,!0),"Bachman & Associates":new a("Where Law and Business meet - thats where we are.

Legal Insight - Business Instinct - Innovative Experience.",[],!0,!0,!0,!0),"Blade Industries":new a("Augmentation is Salvation.",[],!0,!0,!0,!0),NWO:new a("Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given purpose and direction in life. That is why they created God. And that is why they created civilization - not because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.",[],!0,!0,!0,!0),"Clarke Incorporated":new a("The Power of the Genome - Unlocked.",[],!0,!0,!0,!0),"OmniTek Incorporated":new a("Simply put, our mission is to design and build robots that make a difference.",[],!0,!0,!0,!0),"Four Sigma":new a("The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",[],!0,!0,!0,!0),"KuaiGong International":new a("Dream big. Work hard. Make history.",[],!0,!0,!0,!0),"Fulcrum Secret Technologies":new a("The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it would be necessary to create them. And now we can.",[],!0,!0,!1,!0),BitRunners:new a("Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be reconstructed. Transformed. Used.

Those who run the bits, run the world.",[],!0,!0,!1,!1),"The Black Hand":new a("The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. Technological power. And those at the top rule with an invisible hand. They built a society where the rich get richer, and everyone else suffers.

So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__
_.nITESECNIt.
.-'NITESECNITESEc.
.' NITESECNITESECn
/ NITESECNITESEC;
: :NITESECNITESEC;
; $ NITESECNITESECN
: _, ,N'ITESECNITESEC
: .+^^`, : `NITESECNIT
) /), `-,-=,NITESECNI
/ ^ ,-;|NITESECN;
/ _.' '-';NITESECN
( , ,-''`^NITE'
)` :`. .'
)-- ; `- /
' _.-' :
( _.-' .
------.
.
_.nIt
_.nITESECNi
nITESECNIT^'
NITE^' ___
/ .gP''''Tp.
: d' . `b
; d' o `b ;
/ d; `b|
/, $; @ `:
/' $$ ;
.' $$b o |
.' d$$$; :
/ .d$$$$; , ;
d .dNITESEC $ |
:bp.__.gNITESEC$$ :$ ;
NITESECNITESECNIT $$b :
",[],!0,!0,!1,!1),Aevum:new a("The Silicon City.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new a("Serve the People.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new a("The East Asian Order of the Future.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new a("Asia's World City.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new a("The City of the Future.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new a("Benefit, Honor, and Glory.",["Chongqing","Sector-12","New Tokyo","Aevum","Ishima"],!0,!0,!0,!0),"Speakers for the Dead":new a("It is better to reign in Hell than to serve in Heaven.",[],!0,!0,!0,!0),"The Dark Army":new a("The World doesn't care about right or wrong. It only cares about power.",[],!0,!0,!0,!1),"The Syndicate":new a("Honor holds you back.",[],!0,!0,!0,!0),Silhouette:new a("Corporations have filled the void of power left behind by the collapse of Western government. The issue is they've become so big that you don't know who they're working for. And if you're employed at one of these corporations, you don't even know who you're working for.

That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",[],!0,!0,!0,!1),Tetrads:new a("Following the mandate of Heaven and carrying out the way.",[],!1,!1,!0,!0),"Slum Snakes":new a("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new a("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new a("Obey Heaven and work righteously.",[],!0,!0,!1,!0),CyberSec:new a("The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.",[],!0,!0,!1,!1),Bladeburners:new a("It's too bad they won't live. But then again, who does?

Note that for this faction, reputation can only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",[],!1,!1,!1,!1)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FileDiagnosticPopup=t.ServerAccordion=void 0;const r=a(n(0)),i=n(23),o=n(167),s=n(3);function l(e){const t=i.AllServers[e.ip];let n=0;for(const e of t.scripts)n+=e.code.length;for(const e of t.textFiles)n+=e.text.length;if(0===n)return r.default.createElement(r.default.Fragment,null);const a=[];for(const e of t.scripts)a.push({name:e.filename,size:e.code.length});for(const e of t.textFiles)a.push({name:e.fn,size:e.text.length});return a.sort((e,t)=>t.size-e.size),r.default.createElement(o.Accordion,{headerContent:r.default.createElement(r.default.Fragment,null,t.hostname," (",s.numeralWrapper.formatBigNumber(n),"b)"),panelContent:r.default.createElement("ul",null,a.map(e=>r.default.createElement("li",{key:e.name},e.name,": ",s.numeralWrapper.formatBigNumber(e.size),"b")))})}t.ServerAccordion=l,t.FileDiagnosticPopup=function(e){const t=[];for(const e of Object.keys(i.AllServers))t.push(e);return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are."),t.map(e=>r.default.createElement(l,{key:e,ip:e})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuHeaders=t.MainMenuHeaders=void 0;const a=n(34);function r(e,t,n){for(let n=0;n0?"list-item":"none",this.classList.toggle("opened");const c=[t,n,o,s,l],u=[a.MainMenuLinks.Stats,a.MainMenuLinks.Factions,a.MainMenuLinks.Augmentations,a.MainMenuLinks.HacknetNodes,a.MainMenuLinks.Sleeves];t.style.maxHeight?r(!1,c,u):r(!0,c,u)},t.MainMenuHeaders.World.onclick=function(){const t=i("city-tab"),n=i("travel-tab"),o=i("job-tab"),s=i("stock-market-tab"),l=i("bladeburner-tab"),c=i("corporation-tab"),u=i("gang-tab");o.style.display=""!==e.companyName?"list-item":"none",s.style.display=e.hasWseAccount?"list-item":"none",l.style.display=e.inBladeburner()?"list-item":"none",c.style.display=e.hasCorporation()?"list-item":"none",u.style.display=e.inGang()?"list-item":"none",this.classList.toggle("opened");const m=[t,n,o,s,l,c,u],p=[a.MainMenuLinks.City,a.MainMenuLinks.Travel,a.MainMenuLinks.Job,a.MainMenuLinks.StockMarket,a.MainMenuLinks.Bladeburner,a.MainMenuLinks.Corporation,a.MainMenuLinks.Gang];t.style.maxHeight?r(!1,m,p):r(!0,m,p)},t.MainMenuHeaders.Help.onclick=function(){const e=i("milestones-tab"),t=i("tutorial-tab"),o=i("options-tab");this.classList.toggle("opened");const s=[e,t,o],l=[a.MainMenuLinks.Milestones,a.MainMenuLinks.Tutorial,a.MainMenuLinks.Options];n&&(s.push(i("dev-tab")),l.push(i("dev-menu-link"))),t.style.maxHeight?r(!1,s,l):r(!0,s,l)},!0}catch(e){return console.error(`Failed to initialize Main Menu Headers: ${e}`),!1}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(17),r=n(26),i=n(3);function o(){function e(e){0===r.Settings.AutosaveInterval?e.innerHTML="disabled":e.innerHTML=`every ${r.Settings.AutosaveInterval}s`}const t=document.getElementById("settingsNSExecTimeRangeValLabel"),n=document.getElementById("settingsNSLogRangeValLabel"),o=document.getElementById("settingsNSPortRangeValLabel"),s=document.getElementById("settingsSuppressMessages"),l=document.getElementById("settingsSuppressFactionInvites"),c=document.getElementById("settingsSuppressTravelConfirmation"),u=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),m=document.getElementById("settingsSuppressHospitalizationPopup"),p=document.getElementById("settingsSuppressBladeburnerPopup"),d=document.getElementById("settingsAutosaveIntervalValLabel"),h=document.getElementById("settingsDisableHotkeys"),_=document.getElementById("settingsDisableASCIIArt"),g=document.getElementById("settingsDisableTextEffects"),f=document.getElementById("settingsLocale");t.innerHTML=r.Settings.CodeInstructionRunTime+"ms",n.innerHTML=r.Settings.MaxLogCapacity,o.innerHTML=r.Settings.MaxPortCapacity,s.checked=r.Settings.SuppressMessages,l.checked=r.Settings.SuppressFactionInvites,c.checked=r.Settings.SuppressTravelConfirmation,u.checked=r.Settings.SuppressBuyAugmentationConfirmation,m.checked=r.Settings.SuppressHospitalizationPopup,p.checked=r.Settings.SuppressBladeburnerPopup,e(d),h.checked=r.Settings.DisableHotkeys,_.checked=r.Settings.CityListView,g.checked=r.Settings.DisableTextEffects,f.value=r.Settings.Locale,i.numeralWrapper.updateLocale(r.Settings.Locale);const y=document.getElementById("settingsNSExecTimeRangeVal"),b=document.getElementById("settingsNSLogRangeVal"),E=document.getElementById("settingsNSPortRangeVal"),v=document.getElementById("settingsAutosaveIntervalVal");y.value=r.Settings.CodeInstructionRunTime,b.value=r.Settings.MaxLogCapacity,E.value=r.Settings.MaxPortCapacity,v.value=r.Settings.AutosaveInterval,y.oninput=function(){t.innerHTML=this.value+"ms",r.Settings.CodeInstructionRunTime=this.value},b.oninput=function(){n.innerHTML=this.value,r.Settings.MaxLogCapacity=this.value},E.oninput=function(){o.innerHTML=this.value,r.Settings.MaxPortCapacity=this.value},v.oninput=function(){r.Settings.AutosaveInterval=Number(this.value),e(d),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},s.onclick=function(){r.Settings.SuppressMessages=this.checked},l.onclick=function(){r.Settings.SuppressFactionInvites=this.checked},c.onclick=function(){r.Settings.SuppressTravelConfirmation=this.checked},u.onclick=function(){r.Settings.SuppressBuyAugmentationConfirmation=this.checked},m.onclick=function(){r.Settings.SuppressHospitalizationPopup=this.checked},p.onclick=function(){r.Settings.SuppressBladeburnerPopup=this.checked},h.onclick=function(){r.Settings.DisableHotkeys=this.checked},_.onclick=function(){r.Settings.DisableASCIIArt=this.checked},g.onclick=function(){r.Settings.DisableTextEffects=this.checked},f.onchange=function(){if(!i.numeralWrapper.updateLocale(f.value)){console.warn(`Invalid locale for numeral: ${f.value}`);let e="en";return r.Settings.Locale=e,void(f.value=e)}r.Settings.Locale=f.value}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterInfo=void 0;const o=i(n(0)),s=n(3),l=n(133),c=n(12),u=n(20),m=n(21),p=n(43),d=n(144),h=n(37),_=n(286),g=n(31);t.CharacterInfo=function(e){function t(e){const t=[["Total:",g.Money(e.total)]];return e.bladeburner&&t.push(["Bladeburner:",g.Money(e.bladeburner)]),e.codingcontract&&t.push(["Coding Contracts:",g.Money(e.codingcontract)]),e.work&&t.push(["Company Work:",g.Money(e.work)]),e.class&&t.push(["Class:",g.Money(e.class)]),e.corporation&&t.push(["Corporation:",g.Money(e.corporation)]),e.crime&&t.push(["Crimes:",g.Money(e.crime)]),e.gang&&t.push(["Gang:",g.Money(e.gang)]),e.hacking&&t.push(["Hacking:",g.Money(e.hacking)]),e.hacknetnode&&t.push(["Hacknet Nodes:",g.Money(e.hacknetnode)]),e.hospitalization&&t.push(["Hospitalization:",g.Money(e.hospitalization)]),e.infiltration&&t.push(["Infiltration:",g.Money(e.infiltration)]),e.stock&&t.push(["Stock Market:",g.Money(e.stock)]),e.casino&&t.push(["Casino:",g.Money(e.casino)]),e.sleeves&&t.push(["Sleeves:",g.Money(e.sleeves)]),_.StatsTable(t)}function n(e){return o.createElement(o.Fragment,null,o.createElement("table",null,o.createElement("tbody",null,e.rows.map(e=>o.createElement("tr",{key:e[0]},o.createElement("td",{key:"0"},`${e[0]} multiplier:`),o.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},s.numeralWrapper.formatPercentage(e[1])),function(e){return p.SourceFileFlags[5]>0&&e.length>2&&e[1]!=e[2]?o.createElement("td",{key:"2",style:{textAlign:"right"}}," (",s.numeralWrapper.formatPercentage(e[2]),")"):o.createElement(o.Fragment,null)}(e))))))}const a=[["Time played since last Augmentation:",u.convertTimeMsToTimeElapsedString(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&a.push(["Time played since last Bitnode destroyed:",u.convertTimeMsToTimeElapsedString(e.playtimeSinceLastBitnode)]),a.push(["Total Time played:",u.convertTimeMsToTimeElapsedString(e.totalPlaytime)]),o.createElement("pre",null,o.createElement("b",null,"General"),o.createElement("br",null),o.createElement("br",null),o.createElement("span",null,"Current City: ",e.city),o.createElement("br",null),o.createElement(function(){return e.companyName?o.createElement(o.Fragment,null,o.createElement("span",null,"Employer at which you last worked: ",e.companyName),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement(function(){return""!==e.companyName?o.createElement(o.Fragment,null,o.createElement("span",null,"Job you last worked: ",e.jobs[e.companyName]),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement(function(){return e.jobs&&0!==Object.keys(e.jobs).length?o.createElement(o.Fragment,null,o.createElement("span",null,"All Employers:"),o.createElement("br",null),o.createElement("ul",null,Object.keys(e.jobs).map(e=>o.createElement("li",{key:e}," * ",e))),o.createElement("br",null),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement("span",null,"Money: ",g.Money(e.money.toNumber())),o.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let n=o.createElement(o.Fragment,null,o.createElement("u",null,"Money earned since you last installed Augmentations:"),o.createElement("br",null),t(e.moneySourceA));0!==e.sourceFiles.length&&(n=o.createElement(o.Fragment,null,n,o.createElement("br",null),o.createElement("br",null),o.createElement("u",null,"Money earned in this BitNode:"),o.createElement("br",null),t(e.moneySourceB))),c.dialogBoxCreate(n,!1)}},"Money Statistics & Breakdown"),o.createElement("br",null),o.createElement("br",null),o.createElement("b",null,"Stats"),o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",{key:"0"},o.createElement("td",{key:"0"},"Hacking:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.hacking_skill)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.hacking_exp)," exp)")),o.createElement("tr",{key:"1"},o.createElement("td",{key:"0"},"Strength:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.strength)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.strength_exp)," exp)")),o.createElement("tr",{key:"2"},o.createElement("td",{key:"0"},"Defense:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.defense)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.defense_exp)," exp)")),o.createElement("tr",{key:"3"},o.createElement("td",{key:"0"},"Dexterity:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.dexterity)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.dexterity_exp)," exp)")),o.createElement("tr",{key:"4"},o.createElement("td",{key:"0"},"Agility:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.agility)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.agility_exp)," exp)")),o.createElement("tr",{key:"5"},o.createElement("td",{key:"0"},"Charisma:"),o.createElement("td",{key:"1",style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.charisma)),o.createElement("td",{key:"2",style:{textAlign:"right"}},"(",s.numeralWrapper.formatExp(e.charisma_exp)," exp)")),o.createElement(function(){return e.intelligence>0&&(5===e.bitNodeN||p.SourceFileFlags[5]>0)?o.createElement("tr",{key:"5"},o.createElement("td",null,"Intelligence:"),o.createElement("td",{style:{textAlign:"right"}},s.numeralWrapper.formatSkill(e.intelligence))):o.createElement(o.Fragment,null)},null))),o.createElement("br",null),o.createElement(n,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*m.BitNodeMultipliers.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*m.BitNodeMultipliers.ServerGrowthRate]]}),o.createElement("br",null),o.createElement(n,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*m.BitNodeMultipliers.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*m.BitNodeMultipliers.HackExpGain]]}),o.createElement("br",null),o.createElement(n,{rows:[["Strength Level",e.strength_mult,e.strength_mult*m.BitNodeMultipliers.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Defense Level",e.defense_mult,e.defense_mult*m.BitNodeMultipliers.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*m.BitNodeMultipliers.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Agility Level",e.agility_mult,e.agility_mult*m.BitNodeMultipliers.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*m.BitNodeMultipliers.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*m.BitNodeMultipliers.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),o.createElement("br",null),o.createElement(n,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*m.BitNodeMultipliers.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*m.BitNodeMultipliers.CompanyWorkMoney]]}),o.createElement("br",null),o.createElement(n,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*m.BitNodeMultipliers.CrimeMoney]]}),o.createElement("br",null),o.createElement(function(){return e.canAccessBladeburner()?o.createElement(o.Fragment,null,o.createElement(n,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}),o.createElement("br",null)):o.createElement(o.Fragment,null)},null),o.createElement("br",null),o.createElement("b",null,"Misc."),o.createElement("br",null),o.createElement("br",null),o.createElement("span",null,`Servers owned: ${e.purchasedServers.length} / ${d.getPurchaseServerLimit()}`),o.createElement("br",null),o.createElement(function(){return 9===e.bitNodeN||p.SourceFileFlags[9]>0?o.createElement(o.Fragment,null,o.createElement("span",null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${h.HacknetServerConstants.MaxServers}`),o.createElement("br",null)):o.createElement(o.Fragment,null,o.createElement("span",null,`Hacknet Nodes owned: ${e.hacknetNodes.length}`),o.createElement("br",null))},null),o.createElement("span",null,`Augmentations installed: ${e.augmentations.length}`),o.createElement("br",null),o.createElement("br",null),_.StatsTable(a),o.createElement("br",null),o.createElement(function(){if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return o.createElement(o.Fragment,null,o.createElement("span",null,"Current BitNode: ",e.bitNodeN," (",l.BitNodes[t].name,")"),o.createElement("br",null),o.createElement("br",null),o.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"4%"}},l.BitNodes[t].info.split("
").map((e,t)=>o.createElement("div",{key:t},o.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},e),o.createElement("br",null)))))}return o.createElement(o.Fragment,null)},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayMilestonesContent=void 0;const o=n(19),s=n(955),l=n(1),c=i(n(0)),u=i(n(22));let m=null;!function(){document.addEventListener("DOMContentLoaded",function e(){m=document.getElementById("milestones-container"),document.removeEventListener("DOMContentLoaded",e)})}(),t.displayMilestonesContent=function(){o.routing.isOn(o.Page.Milestones)&&m instanceof HTMLElement&&u.render(c.createElement(s.Root,{player:l.Player}),m)}},,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((a=a.apply(e,t||[])).next())})},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const l=i(n(0)),c=n(63),u=s(n(960)),m=n(79),p=n(959),d=n(958),h=n(94),_=n(12),g=n(202),f=n(74),y=n(237),b=n(145),E=n(509),v=n(159),C=n(3),k=n(701),P=n(956),S=n(464),O=n(26),M=n(50);let T=[];!function(){const e=S.NetscriptFunctions({});T=function e(t){let n=[];const a=Object.keys(t);for(const r of a)"object"==typeof t[r]&&(n.push(r),n=n.concat(e(t[r]))),"function"==typeof t[r]&&n.push(r);return n}(e)}();let x="",w="",A=null;t.Root=function(e){const t=l.useRef(null),[n,a]=l.useState(e.filename?e.filename:x),[r,i]=l.useState(e.code?e.code:w),[s,S]=l.useState("RAM: ???"),[R,N]=l.useState({theme:O.Settings.MonacoTheme,insertSpaces:O.Settings.MonacoInsertSpaces});function D(){if(null!==t.current){const e=t.current.getPosition();null!==e&&k.CursorPositions.saveCursor(n,{row:e.lineNumber,column:e.column})}if(A=null,M.ITutorial.isRunning&&M.ITutorial.currStep===M.iTutorialSteps.TerminalTypeScript){if("n00dles.script"!==n)return void _.dialogBoxCreate("Leave the script name as 'n00dles'!");if(-1==r.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void _.dialogBoxCreate("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");for(let a=0;a0)){switch(n){case v.RamCalculationErrorCode.ImportError:S("RAM: Import Error");break;case v.RamCalculationErrorCode.URLImportError:S("RAM: HTTP Import Error");break;case v.RamCalculationErrorCode.SyntaxError:default:S("RAM: Syntax Error")}return new Promise(()=>void 0)}S("RAM: "+C.numeralWrapper.formatRAM(n))})}return l.useEffect(()=>{""!==e.filename&&(x=e.filename,w=e.code,A=null)},[]),l.useEffect(()=>{const e=setInterval(B,1e3);return()=>clearInterval(e)},[r]),l.useEffect(()=>{function e(e){O.Settings.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),D())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),l.default.createElement("div",{id:"script-editor-wrapper"},l.default.createElement("div",{id:"script-editor-filename-wrapper"},l.default.createElement("p",{id:"script-editor-filename-tag",className:"noselect"}," ",l.default.createElement("strong",{style:{backgroundColor:"#555"}},"Script name: ")),l.default.createElement("input",{id:"script-editor-filename",type:"text",maxLength:100,tabIndex:1,value:n,onChange:function(e){x=n,a(e.target.value)}}),l.default.createElement(c.StdButton,{text:"options",onClick:function(){const e="script-editor-options-popup",t={theme:"",insertSpaces:!1};Object.assign(t,R),m.createPopup(e,p.OptionsPopup,{id:e,options:t,save:e=>{N(e),O.Settings.MonacoTheme=e.theme,O.Settings.MonacoInsertSpaces=e.insertSpaces}})}})),l.default.createElement(u.default,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const n of T)t.push({label:n,kind:e.languages.CompletionItemKind.Function,insertText:n,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(P.libSource,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(P.libSource,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const a=k.CursorPositions.getCursor(n);-1!==a.row?t.current.setPosition({lineNumber:a.row,column:a.column}):null!==A&&t.current.setPosition({lineNumber:A.lineNumber,column:A.column+1}),t.current.focus()},loading:l.default.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:r,onChange:function(e){void 0!==e&&(w=e,null!==t.current&&(A=t.current.getPosition()),i(e))},theme:R.theme,options:R}),l.default.createElement("div",{id:"script-editor-buttons-wrapper"},l.default.createElement(c.StdButton,{text:"Beautify",onClick:function(){if(null===t.current)return;const e=d.js_beautify(r,{indent_with_tabs:!R.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}}),l.default.createElement("p",{id:"script-editor-status-text",style:{display:"inline-block",margin:"10px"}},s),l.default.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:D},"Save & Close (Ctrl/Cmd + b)"),l.default.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Netscript Documentation")))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayInfiltrationContent=void 0;const o=n(19),s=n(1003),l=i(n(0)),c=i(n(22));let u=document.createElement("div");!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("infiltration-container");if(null===t)throw new Error("huh?");u=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.displayInfiltrationContent=function(e,t,n,a,r){if(!o.routing.isOn(o.Page.Infiltration))return;const i=function(e,t){const n=e.strength+e.defense+e.dexterity+e.agility+e.charisma,a=t-Math.pow(n,.9)/250-e.intelligence/1600;return a<0?0:a>3?3:a}(t,a);c.render(l.createElement(s.Root,{Engine:e,Player:t,Location:n,StartingDifficulty:a,Difficulty:i,MaxLevel:r}),u)}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const r=a(n(0)),i=n(1022),o=n(1020),s=n(1019);t.Root=function(e){return r.default.createElement("div",{id:"bladeburner-container"},r.default.createElement("div",{style:{height:"60%",display:"block",position:"relative"}},r.default.createElement("div",{style:{height:"100%",width:"30%",display:"inline-block",border:"1px solid white"}},r.default.createElement(i.Stats,{bladeburner:e.bladeburner,player:e.player,engine:e.engine})),r.default.createElement(o.Console,{bladeburner:e.bladeburner,player:e.player})),r.default.createElement("div",{style:{width:"70%",display:"block",border:"1px solid white",marginTop:"6px",padding:"6px",position:"relative"}},r.default.createElement(s.AllPages,{bladeburner:e.bladeburner,player:e.player})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayGangContent=void 0;const o=i(n(0)),s=i(n(22)),l=n(1037),c=n(19);let u;!function(){document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("gang-container");if(null===t)throw new Error("Could not find element 'gang-container'");u=t,document.removeEventListener("DOMContentLoaded",e)})}(),t.displayGangContent=function(e,t,n){c.routing.isOn(c.Page.Gang)&&s.render(o.createElement(l.Root,{engine:e,gang:t,player:n}),u)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FactionList=void 0;const o=i(n(0)),s=n(16),l=n(80);t.FactionList=function(e){const t=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("h1",null,"Factions"),o.default.createElement("p",null,"Lists all factions you have joined"),o.default.createElement("br",null),o.default.createElement("ul",null,e.player.factions.map(t=>o.default.createElement("li",{key:t},o.default.createElement("a",{className:"a-link-button",onClick:()=>(function(t){e.engine.loadFactionContent(),l.displayFactionContent(t)})(t),style:{padding:"4px",margin:"4px",display:"inline-block"}},t)))),o.default.createElement("br",null),o.default.createElement("h1",null,"Outstanding Faction Invitations"),o.default.createElement("p",{style:{width:"70%"}},"Lists factions you have been invited to. You can accept these faction invitations at any time."),o.default.createElement("ul",null,e.player.factionInvitations.map(e=>o.default.createElement("li",{key:e,style:{padding:"6px",margin:"6px"}},o.default.createElement("p",{style:{display:"inline",margin:"4px",padding:"4px"}},e),o.default.createElement("a",{className:"a-link-button",onClick:n=>(function(e,n){e.isTrusted&&(l.joinFaction(s.Factions[n]),t(e=>!e))})(n,e),style:{display:"inline",margin:"4px",padding:"4px"}},"Accept Faction Invitation")))))}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(0),r=n.n(a),i=n(1),o=n(3),s=n(67);const l=r.a.Component;class c extends l{render(){const e=r.a.createElement("tr",{id:"character-int-wrapper"},r.a.createElement("td",{className:"character-int-cell"},"Int: "),r.a.createElement("td",{id:"character-int-text",className:"character-int-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.intelligence))),t=r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",{className:"character-divider"},r.a.createElement("td",{colSpan:"2"},"Work progress:")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},"+",Object(s.Reputation)(i.Player.workRepGained)," rep")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},r.a.createElement("button",{onClick:()=>i.Player.startFocusing(),id:"character-overview-options-button",className:"character-overview-btn"},"Focus"))));return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{id:"character-hp-wrapper"},r.a.createElement("td",{className:"character-hp-cell"},"HP:"),r.a.createElement("td",{id:"character-hp-text",className:"character-hp-cell character-stat-cell"},o.numeralWrapper.formatHp(i.Player.hp)+" / "+o.numeralWrapper.formatHp(i.Player.max_hp))),r.a.createElement("tr",{id:"character-money-wrapper"},r.a.createElement("td",{className:"character-money-cell"},"Money: "),r.a.createElement("td",{id:"character-money-text",className:"character-money-cell character-stat-cell"},o.numeralWrapper.formatMoney(i.Player.money.toNumber()))),r.a.createElement("tr",{id:"character-hack-wrapper"},r.a.createElement("td",{className:"character-hack-cell"},"Hack: "),r.a.createElement("td",{id:"character-hack-text",className:"character-hack-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.hacking_skill))),r.a.createElement("tr",{id:"character-str-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-combat-cell"},"Str: "),r.a.createElement("td",{id:"character-str-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.strength))),r.a.createElement("tr",{id:"character-def-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Def: "),r.a.createElement("td",{id:"character-def-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.defense))),r.a.createElement("tr",{id:"character-dex-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Dex: "),r.a.createElement("td",{id:"character-dex-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.dexterity))),r.a.createElement("tr",{id:"character-agi-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Agi: "),r.a.createElement("td",{id:"character-agi-text",className:"character-combat-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.agility))),r.a.createElement("tr",{id:"character-cha-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-cha-cell"},"Cha: "),r.a.createElement("td",{id:"character-cha-text",className:"character-cha-cell character-stat-cell"},o.numeralWrapper.formatSkill(i.Player.charisma))),i.Player.intelligence>=1&&e,i.Player.isWorking&&!i.Player.focus&&t)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=void 0,t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHacknetServer=t.getUpgradeHomeRamCost=t.getHomeComputer=t.getCurrentServer=t.hasTorRouter=void 0;const a=n(11),r=n(21),i=n(86),o=n(23),s=n(45);t.hasTorRouter=function(){return s.SpecialServerIps.hasOwnProperty("Darkweb Server")},t.getCurrentServer=function(){return o.AllServers[this.currentServer]},t.getHomeComputer=function(){return o.AllServers[this.homeComputer]},t.getUpgradeHomeRamCost=function(){const e=this.getHomeComputer().maxRam,t=Math.log2(e),n=Math.pow(1.58,t);return e*a.CONSTANTS.BaseCostFor1GBOfRamHome*n*r.BitNodeMultipliers.HomeComputerRamCost},t.createHacknetServer=function(){const e=`hacknet-node-${this.hacknetNodes.length}`,t=new i.HacknetServer({adminRights:!0,hostname:e,ip:o.createUniqueRandomIp()});this.hacknetNodes.push(t.ip),o.AddToAllServers(t);const n=this.getHomeComputer();return n.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(n.ip),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyExploit=void 0;const a=n(1);t.applyExploit=function(){if(a.Player.exploits&&0===a.Player.exploits.length)return;const e=Math.pow(1.001,a.Player.exploits.length),t=Math.pow(.999,a.Player.exploits.length);a.Player.hacking_chance_mult*=e,a.Player.hacking_speed_mult*=e,a.Player.hacking_money_mult*=e,a.Player.hacking_grow_mult*=e,a.Player.hacking_mult*=e,a.Player.strength_mult*=e,a.Player.defense_mult*=e,a.Player.dexterity_mult*=e,a.Player.agility_mult*=e,a.Player.charisma_mult*=e,a.Player.hacking_exp_mult*=e,a.Player.strength_exp_mult*=e,a.Player.defense_exp_mult*=e,a.Player.dexterity_exp_mult*=e,a.Player.agility_exp_mult*=e,a.Player.charisma_exp_mult*=e,a.Player.company_rep_mult*=e,a.Player.faction_rep_mult*=e,a.Player.crime_money_mult*=e,a.Player.crime_success_mult*=e,a.Player.hacknet_node_money_mult*=e,a.Player.hacknet_node_purchase_cost_mult*=t,a.Player.hacknet_node_ram_cost_mult*=t,a.Player.hacknet_node_core_cost_mult*=t,a.Player.hacknet_node_level_cost_mult*=t,a.Player.work_money_mult*=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applySourceFile=void 0;const a=n(236),r=n(1);t.applySourceFile=function(e){const t="SourceFile"+e.n,n=a.SourceFiles[t];if(null!=n){switch(e.n){case 1:{let t=0;for(let n=0;n=100?this.sleeves[e].synchronize(this):this.sleeves[e].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.updateSkillLevels(),this.hp=this.max_hp}function oe(){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 G.a(1e3),this.city=M.CityName.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.resleeves=[],this.sleeves.length=j.SourceFileFlags[10]+this.sleevesFromCovenant;for(let e=0;e0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function ue(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function me(e){const t=this.getHomeComputer();if(null==t)return!1;for(var n=0;n0||this.intelligence>0)&&(this.intelligence_exp+=e)}function Pe(e){const t=e.toLowerCase();return t.includes("hack")?this.hacking_skill:t.includes("str")?this.strength:t.includes("def")?this.defense:t.includes("dex")?this.dexterity:t.includes("agi")?this.agility:t.includes("cha")?this.charisma:t.includes("int")?this.intelligence:void 0}function Se(e,t,n){e===this.workType&&t===this.companyName||e===this.workType&&t===this.currentWorkFactionName&&n===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",ne.a.unmountComponentAtNode(document.getElementById("work-in-progress-text")))}function Oe(e=1){const t=this.focus?1:.8,n=t*this.workHackExpGainRate*e,a=t*this.workStrExpGainRate*e,r=t*this.workDefExpGainRate*e,i=t*this.workDexExpGainRate*e,o=t*this.workAgiExpGainRate*e,s=t*this.workChaExpGainRate*e,l=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(n),this.gainStrengthExp(a),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(o),this.gainCharismaExp(s),this.gainMoney(l),this.className?this.recordMoneySource(l,"class"):this.recordMoneySource(l,"work"),this.workHackExpGained+=n,this.workStrExpGained+=a,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=o,this.workChaExpGained+=s,this.workRepGained+=t*this.workRepGainRate*e,this.workMoneyGained+=t*this.workMoneyGainRate*e,this.workMoneyGained-=t*this.workMoneyLossRate*e}function Me(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeCompany,e),this.isWorking=!0,this.focus=!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(Y.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",()=>(this.finishWork(!0),!1));const n=Object(Y.clearEventListeners)("work-in-progress-something-else-button");n.style.visibility="visible",n.innerHTML="Do something else simultaneously",n.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Te(){const e=I.SpecialServerIps[this.companyName];if(e){const t=N.AllServers[e];if(t&&t.backdoorInstalled)return.75}return.5}function xe(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWork(!1);const n=u.Companies[this.companyName];let a="0";null!=n&&n instanceof c.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`),Object(U.influenceStockThroughCompanyWork)(n,this.workRepGainRate,e);const r=this.jobs[this.companyName],i=.5===this.cancelationPenalty()?"half":"three-quarters";var o=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation: ",Object(V.Reputation)(a),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(Q.ReputationRate)(this.workRepGainRate*ae),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",`${K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)} / sec`,") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",`${K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)} / sec`,") strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",`${K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)} / sec`,") defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",`${K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)} / sec`,") dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",`${K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)} / sec`,") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",`${K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)} / sec`,") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain ",i," of the reputation you've earned so far."),o)}function we(e,t=!1){e&&(this.workRepGained*=this.cancelationPenalty()),u.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let n=ee.a.createElement(ee.a.Fragment,null,"You earned a total of: ",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(n=e?ee.a.createElement(ee.a.Fragment,null,"You worked a short shift of ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"Since you cancelled your work early, you only gained half of the reputation you earned. ",ee.a.createElement("br",null),ee.a.createElement("br",null),n):ee.a.createElement(ee.a.Fragment,null,"You worked a full shift of 8 hours! ",ee.a.createElement("br",null),ee.a.createElement("br",null),n),t||Object($.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),t){var a="You worked a short shift of "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+K.numeralWrapper.formatMoney(this.workMoneyGained)+", "+K.numeralWrapper.formatReputation(this.workRepGained)+" reputation, "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!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(Y.clearEventListeners)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),b.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((_.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=_.CONSTANTS.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=u.Companies[this.companyName],a="0";null!=n&&n instanceof c.Company?a=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`);const r=this.jobs[this.companyName],i=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation: ",Object(V.Reputation)(a),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(V.Reputation)(`${K.numeralWrapper.formatExp(this.workRepGainRate*ae)} / sec`),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",`${K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)} / sec`,") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",`${K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)} / sec`,") strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",`${K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)} / sec`,") defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",`${K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)} / sec`,") dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",`${K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)} / sec`,") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",`${K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)} / sec`,") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job."),i)}function Ne(e=!1){u.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const t=ee.a.createElement(ee.a.Fragment,null,"You worked for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(e||Object($.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var n="You worked for "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+K.numeralWrapper.formatMoney(this.workMoneyGained)+", "+K.numeralWrapper.formatReputation(this.workRepGained)+" reputation, "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()}function De(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,b.Engine.loadWorkInProgressContent()}function Be(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,b.Engine.loadTerminalContent()}function Ie(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.BitNodeMultipliers.FactionWorkRepGain,this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=_.CONSTANTS.MillisecondsPer20Hours;const n=Object(Y.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",()=>(this.finishFactionWork(!0),!1));const a=Object(Y.clearEventListeners)("work-in-progress-something-else-button");a.style.visibility="visible",a.innerHTML="Do something else simultaneously",a.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Le(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeFaction,e.name,_.CONSTANTS.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/_.CONSTANTS.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=_.CONSTANTS.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function We(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeFaction,e.name,_.CONSTANTS.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=Object(R.getFactionFieldWorkRepGain)(this,e),this.factionWorkType=_.CONSTANTS.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Fe(e){this.resetWorkStatus(_.CONSTANTS.WorkTypeFaction,e.name,_.CONSTANTS.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=Object(R.getFactionSecurityWorkRepGain)(this,e),this.factionWorkType=_.CONSTANTS.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function je(e){const t=v.Factions[this.currentWorkFactionName];switch(this.factionWorkType){case _.CONSTANTS.FactionWorkHacking:this.workRepGainRate=Object(R.getHackingWorkRepGain)(this,t);break;case _.CONSTANTS.FactionWorkField:this.workRepGainRate=Object(R.getFactionFieldWorkRepGain)(this,t);break;case _.CONSTANTS.FactionWorkSecurity:this.workRepGainRate=Object(R.getFactionSecurityWorkRepGain)(this,t)}var n=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=_.CONSTANTS.MillisecondsPer20Hours&&(n=!0,e=Math.round((_.CONSTANTS.MillisecondsPer20Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.processWorkEarnings(e),n||this.timeWorked>=_.CONSTANTS.MillisecondsPer20Hours)return this.finishFactionWork(!1);const a=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently ",this.currentWorkFactionDescription," for your faction ",t.name,ee.a.createElement("br",null),"(Current Faction Reputation: ",Object(V.Reputation)(t.playerReputation),"). ",ee.a.createElement("br",null),"You have been doing this for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyGainRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," (",Object(Q.ReputationRate)(this.workRepGainRate*ae),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)," / sec) strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)," / sec) defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)," / sec) dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)," / sec) charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",ee.a.createElement("br",null),"There is no penalty for cancelling earlier."),a)}function Ue(e,t=!1){var n=v.Factions[this.currentWorkFactionName];if(n.playerReputation+=this.workRepGained,this.updateSkillLevels(),t||Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"You worked for your faction ",n.name," for a total of ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),Object(V.Reputation)(this.workRepGained)," reputation for the faction ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadFactionContent(),Object(C.displayFactionContent)(n.name),t){var a="You worked for your faction "+n.name+" for a total of "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+K.numeralWrapper.formatReputation(this.workRepGained)+" rep, "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()}function He(){let e=1;const t=u.Companies[this.companyName];j.SourceFileFlags[11]>0&&(e=1+t.favor/100);const n=this.jobs[this.companyName],a=d.CompanyPositions[n];return null==a?(console.error(`Could not find CompanyPosition object for ${n}. Work salary will be 0`),0):a.baseSalary*t.salaryMultiplier*this.work_money_mult*s.BitNodeMultipliers.CompanyWorkMoney*e}function Ge(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work hack exp gain will be 0"].join(" ")),0):n.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ke(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work str exp gain will be 0"].join(" ")),0):n.strengthExpGain*e.expMultiplier*this.strength_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function qe(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work def exp gain will be 0"].join(" ")),0):n.defenseExpGain*e.expMultiplier*this.defense_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function $e(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work dex exp gain will be 0"].join(" ")),0):n.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ye(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work agi exp gain will be 0"].join(" ")),0):n.agilityExpGain*e.expMultiplier*this.agility_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function ze(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];return null==e||null==n?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work cha exp gain will be 0"].join(" ")),0):n.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*s.BitNodeMultipliers.CompanyWorkExpGain}function Ve(){const e=u.Companies[this.companyName],t=this.jobs[this.companyName],n=d.CompanyPositions[t];if(null==e||null==n)return console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${t}.`,"Work rep gain will be 0"].join(" ")),0;var a=n.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);a+=this.intelligence/_.CONSTANTS.MaxSkillLevel;var r=1+e.favor/100;return isNaN(r)&&(r=1),a*this.company_rep_mult*r}function Je(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var s=Object(Y.clearEventListeners)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",()=>(this.finishCreateProgramWork(!0),!1)),Object(Y.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function Xe(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t*this.getIntelligenceBonus(3);n=1+(n-1)/5,this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=b.Engine._idleSpeed*e*n;var a=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1);const r=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working on coding ",a,".",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"The program is ",(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",ee.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later."),r)}function Qe(e){var t=this.createProgramName;if(!1===e)Object($.dialogBoxCreate)("You've finished creating "+t+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(t);else{var n=t+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(n)}e||this.gainIntelligenceExp(this.createProgramReqLvl/_.CONSTANTS.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeStudyClass,this.className=n;const a=1e3/b.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const p=this.hashManager;switch(n){case _.CONSTANTS.ClassStudyComputerScience:i=_.CONSTANTS.ClassStudyComputerScienceBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassDataStructures:r=_.CONSTANTS.ClassDataStructuresBaseCost*e/a,i=_.CONSTANTS.ClassDataStructuresBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassNetworks:r=_.CONSTANTS.ClassNetworksBaseCost*e/a,i=_.CONSTANTS.ClassNetworksBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassAlgorithms:r=_.CONSTANTS.ClassAlgorithmsBaseCost*e/a,i=_.CONSTANTS.ClassAlgorithmsBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassManagement:r=_.CONSTANTS.ClassManagementBaseCost*e/a,m=_.CONSTANTS.ClassManagementBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassLeadership:r=_.CONSTANTS.ClassLeadershipBaseCost*e/a,m=_.CONSTANTS.ClassLeadershipBaseExp*t/a*p.getStudyMult();break;case _.CONSTANTS.ClassGymStrength:r=_.CONSTANTS.ClassGymBaseCost*e/a,o=t/a*p.getTrainingMult();break;case _.CONSTANTS.ClassGymDefense:r=_.CONSTANTS.ClassGymBaseCost*e/a,l=t/a*p.getTrainingMult();break;case _.CONSTANTS.ClassGymDexterity:r=_.CONSTANTS.ClassGymBaseCost*e/a,c=t/a*p.getTrainingMult();break;case _.CONSTANTS.ClassGymAgility:r=_.CONSTANTS.ClassGymBaseCost*e/a,u=t/a*p.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=i*this.hacking_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.BitNodeMultipliers.ClassGymExpGain,this.workChaExpGainRate=m*this.charisma_exp_mult*s.BitNodeMultipliers.ClassGymExpGain;var d=Object(Y.clearEventListeners)("work-in-progress-cancel-button");n==_.CONSTANTS.ClassGymStrength||n==_.CONSTANTS.ClassGymDefense||n==_.CONSTANTS.ClassGymDexterity||n==_.CONSTANTS.ClassGymAgility?d.innerHTML="Stop training at gym":d.innerHTML="Stop taking course",d.addEventListener("click",()=>(this.finishClass(),!1)),Object(Y.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=b.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e);const n=document.getElementById("work-in-progress-text");ne.a.render(ee.a.createElement(ee.a.Fragment,null,"You have been ",t," for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"This has cost you: ",ee.a.createElement("br",null),Object(J.Money)(-this.workMoneyGained)," (",Object(X.MoneyRate)(this.workMoneyLossRate*ae),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," (",K.numeralWrapper.formatExp(this.workHackExpGainRate*ae)," / sec) hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," (",K.numeralWrapper.formatExp(this.workStrExpGainRate*ae)," / sec) strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," (",K.numeralWrapper.formatExp(this.workDefExpGainRate*ae)," / sec) defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," (",K.numeralWrapper.formatExp(this.workDexExpGainRate*ae)," / sec) dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," (",K.numeralWrapper.formatExp(this.workAgiExpGainRate*ae)," / sec) agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," (",K.numeralWrapper.formatExp(this.workChaExpGainRate*ae)," / sec) charisma exp ",ee.a.createElement("br",null),"You may cancel at any time"),n)}function tt(e=!1){if(this.gainIntelligenceExp(_.CONSTANTS.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),e||Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"After ",this.className," for ",Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked),", ",ee.a.createElement("br",null),"you spent a total of ",Object(J.Money)(-1*this.workMoneyGained),". ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(z.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of "+K.numeralWrapper.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hacking exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" strength exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" defense exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dexterity exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agility exp, and "+K.numeralWrapper.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}this.resetWorkStatus()}function nt(e,t,n,a,r,i,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=_.CONSTANTS.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workStrExpGained=n*this.strength_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDefExpGained=a*this.defense_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=r*this.dexterity_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workAgiExpGained=i*this.agility_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.BitNodeMultipliers.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.BitNodeMultipliers.CrimeMoney,this.timeNeededToCompleteWork=c;const m=Object(Y.clearEventListeners)("work-in-progress-cancel-button");m.innerHTML="Cancel crime",m.addEventListener("click",()=>(this.finishCrime(!0),!1)),Object(Y.clearEventListeners)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function at(e){if(this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),n=Math.round(t/5);n<0&&(n=0),n>20&&(n=20);var a="["+Array(n+1).join("|")+Array(20-n+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".
Time remaining: "+Object(z.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+a.replace(/ /g," ")}}function rt(e){if(!e){if(Object(f.determineCrimeSuccess)(this,this.crimeType)){let e=null;for(const t in y.Crimes)if(y.Crimes[t].type==this.crimeType){e=y.Crimes[t];break}null==e&&Object($.dialogBoxCreate)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),this.gainMoney(this.workMoneyGained),this.recordMoneySource(this.workMoneyGained,"crime"),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+K.numeralWrapper.formatMoney(this.workMoneyGained)+", "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hack exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, "+K.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp."):Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"Crime successful!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),Object(J.Money)(this.workMoneyGained),ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma experience"))}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+K.numeralWrapper.formatExp(this.workHackExpGained)+" hack exp, "+K.numeralWrapper.formatExp(this.workStrExpGained)+" str exp, "+K.numeralWrapper.formatExp(this.workDefExpGained)+" def exp, "+K.numeralWrapper.formatExp(this.workDexExpGained)+" dex exp, "+K.numeralWrapper.formatExp(this.workAgiExpGained)+" agi exp, "+K.numeralWrapper.formatExp(this.workChaExpGained)+" cha exp."):Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"Crime failed!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.numeralWrapper.formatExp(this.workChaExpGained)," charisma experience"));this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),b.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var e;switch(this.workType){case _.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);break;case _.CONSTANTS.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return e}function ot(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn(`Player.takeDamage() called without a numeric argument: ${e}`)}function st(e){"number"==typeof e?(this.hp+=e,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn(`Player.regenerateHp() called without a numeric argument: ${e}`)}function lt(){const e=Object(H.getHospitalizationCost)(this);return!1===B.Settings.SuppressHospitalizationPopup&&Object($.dialogBoxCreate)(ee.a.createElement(ee.a.Fragment,null,"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged ",Object(J.Money)(e))),this.loseMoney(e),this.recordMoneySource(-1*e,"hospitalization"),this.hp=this.max_hp,e}function ct(e,t=!1){let n=null;""!==this.companyName&&(n=u.Companies[this.companyName]);const a=this.jobs[this.companyName],r=u.Companies[this.location];if(!(r instanceof c.Company))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let i=e;if(!this.isQualified(r,i)){var o=Object(p.getJobRequirementText)(r,i);return!t&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position
"+o)}for(;;){let e=Object(m.getNextCompanyPositionHelper)(i);if(null==e)break;if(!r.hasPosition(e))break;if(!this.isQualified(r,e))break;i=e}if(null==n||n.name!=r.name||i.name!=a){if(this.jobs[r.name]=i.name,this.companyName=this.location,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),t)return!0;Object($.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!")}else{var s=Object(m.getNextCompanyPositionHelper)(i);if(null==s){if(t)return!1;Object($.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(r.hasPosition(s)){if(t)return!1;o=Object(p.getJobRequirementText)(r,s);Object($.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion
"+o)}else{if(t)return!1;Object($.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}}function ut(e,t){var n=null;if(""!==this.companyName&&(n=u.Companies[this.companyName]),null==n||n.name!=e.name)return t;const a=this.jobs[this.companyName],r=d.CompanyPositions[a];return r.isSoftwareJob()&&t.isSoftwareJob()||r.isITJob()&&t.isITJob()||r.isBusinessJob()&&t.isBusinessJob()||r.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||r.isSecurityJob()&&t.isSecurityJob()||r.isAgentJob()&&t.isAgentJob()||r.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||r.isPartTimeJob()&&t.isPartTimeJob()?Object(m.getNextCompanyPositionHelper)(r):t}function mt(e){this.isWorking=!1,this.companyName="",delete this.jobs[e]}function pt(e=!1){return this.applyForJob(d.CompanyPositions[h.SoftwareCompanyPositions[0]],e)}function dt(e=!1){return this.applyForJob(d.CompanyPositions[h.SoftwareConsultantCompanyPositions[0]],e)}function ht(e=!1){return this.applyForJob(d.CompanyPositions[h.ITCompanyPositions[0]],e)}function _t(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.SecurityEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.SecurityEngineerCompanyPositions[0]],e):!e&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function gt(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.NetworkEngineerCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.NetworkEngineerCompanyPositions[0]],e):!e&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function ft(e=!1){return this.applyForJob(d.CompanyPositions[h.BusinessCompanyPositions[0]],e)}function yt(e=!1){return this.applyForJob(d.CompanyPositions[h.BusinessConsultantCompanyPositions[0]],e)}function bt(e=!1){return this.applyForJob(d.CompanyPositions[h.SecurityCompanyPositions[2]],e)}function Et(e=!1){var t=u.Companies[this.location];return this.isQualified(t,d.CompanyPositions[h.AgentCompanyPositions[0]])?this.applyForJob(d.CompanyPositions[h.AgentCompanyPositions[0]],e):!e&&void Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}function vt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.MiscCompanyPositions[1]])){if(this.companyName=t.name,this.jobs[t.name]=h.MiscCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Ct(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.PartTimeCompanyPositions[1]])){if(this.jobs[t.name]=h.PartTimeCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function kt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.MiscCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=h.MiscCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function Pt(e=!1){var t=u.Companies[this.location];if(this.isQualified(t,d.CompanyPositions[h.PartTimeCompanyPositions[0]])){if(this.companyName=t.name,this.jobs[t.name]=h.PartTimeCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName)}else{if(e)return!1;Object($.dialogBoxCreate)("Unforunately, you do not qualify for this position")}}function St(e,t){var n=e.jobStatReqOffset,a=t.requiredHacking>0?t.requiredHacking+n:0,r=t.requiredStrength>0?t.requiredStrength+n:0,i=t.requiredDefense>0?t.requiredDefense+n:0,o=t.requiredDexterity>0?t.requiredDexterity+n:0,s=t.requiredDexterity>0?t.requiredDexterity+n:0,l=t.requiredCharisma>0?t.requiredCharisma+n:0;return this.hacking_skill>=a&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation}function Ot(e=!0){e&&this.resetMultipliers();for(let e=0;et}var i=v.Factions.Illuminati;!i.isBanned&&!i.isMember&&!i.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(i);var o=v.Factions.Daedalus;!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=Math.round(30*s.BitNodeMultipliers.DaedalusAugsRequirement)&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(o);var l=v.Factions["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=20&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=v.Factions.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(T.LocationName.AevumECorp)||e.push(c);var m=v.Factions.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(T.LocationName.Sector12MegaCorp)||e.push(m);var p=v.Factions["Bachman & Associates"];p.isBanned||p.isMember||p.alreadyInvited||!r(T.LocationName.AevumBachmanAndAssociates)||e.push(p);var d=v.Factions["Blade Industries"];d.isBanned||d.isMember||d.alreadyInvited||!r(T.LocationName.Sector12BladeIndustries)||e.push(d);var h=v.Factions.NWO;h.isBanned||h.isMember||h.alreadyInvited||!r(T.LocationName.VolhavenNWO)||e.push(h);var g=v.Factions["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!r(T.LocationName.AevumClarkeIncorporated)||e.push(g);var f=v.Factions["OmniTek Incorporated"];f.isBanned||f.isMember||f.alreadyInvited||!r(T.LocationName.VolhavenOmniTekIncorporated)||e.push(f);var y=v.Factions["Four Sigma"];y.isBanned||y.isMember||y.alreadyInvited||!r(T.LocationName.Sector12FourSigma)||e.push(y);var b=v.Factions["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!r(T.LocationName.ChongqingKuaiGongInternational)||e.push(b);var E=v.Factions["Fulcrum Secret Technologies"],C=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.FulcrumSecretTechnologies]];null==C?console.error("Could not find Fulcrum Secret Technologies Server"):E.isBanned||E.isMember||E.alreadyInvited||!C.backdoorInstalled||!r(T.LocationName.AevumFulcrumTechnologies,25e4)||e.push(E);var k=v.Factions.BitRunners,S=this.getHomeComputer(),O=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.BitRunnersServer]];null==O?console.error("Could not find BitRunners Server"):!k.isBanned&&!k.isMember&&O.backdoorInstalled&&!k.alreadyInvited&&S.maxRam>=128&&e.push(k);var x=v.Factions["The Black Hand"],w=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.TheBlackHandServer]];null==w?console.error("Could not find The Black Hand Server"):!x.isBanned&&!x.isMember&&w.backdoorInstalled&&!x.alreadyInvited&&S.maxRam>=64&&e.push(x);var A=v.Factions.NiteSec,R=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.NiteSecServer]];null==R?console.error("Could not find NiteSec Server"):!A.isBanned&&!A.isMember&&R.backdoorInstalled&&!A.alreadyInvited&&S.maxRam>=32&&e.push(A);var D=v.Factions.Chongqing;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(2e7)||this.city!=M.CityName.Chongqing||e.push(D);var B=v.Factions["Sector-12"];B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(15e6)||this.city!=M.CityName.Sector12||e.push(B);var L=v.Factions["New Tokyo"];L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(2e7)||this.city!=M.CityName.NewTokyo||e.push(L);var W=v.Factions.Aevum;W.isBanned||W.isMember||W.alreadyInvited||!this.money.gte(4e7)||this.city!=M.CityName.Aevum||e.push(W);var F=v.Factions.Ishima;F.isBanned||F.isMember||F.alreadyInvited||!this.money.gte(3e7)||this.city!=M.CityName.Ishima||e.push(F);var j=v.Factions.Volhaven;j.isBanned||j.isMember||j.alreadyInvited||!this.money.gte(5e7)||this.city!=M.CityName.Volhaven||e.push(j);var U=v.Factions["Speakers for the Dead"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!n.includes(T.LocationName.Sector12CIA)&&!n.includes(T.LocationName.Sector12NSA)&&e.push(U);var H=v.Factions["The Dark Army"];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==M.CityName.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!n.includes(T.LocationName.Sector12CIA)&&!n.includes(T.LocationName.Sector12NSA)&&e.push(H);var G=v.Factions["The Syndicate"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==M.CityName.Aevum||this.city==M.CityName.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!n.includes(T.LocationName.Sector12CIA)&&!n.includes(T.LocationName.Sector12NSA)&&e.push(G);var K=v.Factions.Silhouette;!K.isBanned&&!K.isMember&&!K.alreadyInvited&&(a.includes("Chief Technology Officer")||a.includes("Chief Financial Officer")||a.includes("Chief Executive Officer"))&&this.money.gte(15e6)&&this.karma<=-22&&e.push(K);var q=v.Factions.Tetrads;!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(this.city==M.CityName.Chongqing||this.city==M.CityName.NewTokyo||this.city==M.CityName.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(q);var $=v.Factions["Slum Snakes"];!$.isBanned&&!$.isMember&&!$.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push($);var Y=v.Factions.Netburners,z=0,V=0,J=0;for(let e=0;e=80&&z>=8&&V>=4&&J>=100&&e.push(Y);var X=v.Factions["Tian Di Hui"];X.isBanned||X.isMember||X.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=M.CityName.Chongqing&&this.city!=M.CityName.NewTokyo&&this.city!=M.CityName.Ishima||e.push(X);var Q=v.Factions.CyberSec,Z=N.AllServers[I.SpecialServerIps[I.SpecialServerNames.CyberSecServer]];return null==Z?console.error("Could not find CyberSec Server"):Q.isBanned||Q.isMember||!Z.backdoorInstalled||Q.alreadyInvited||e.push(Q),e}function xt(e){this.bitNodeN=e}function wt(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.warn(`tried to queue ${e} twice, this may be a bug`);this.firstAugPurchased=!0,this.queuedAugmentations.push(new i.PlayerOwnedAugmentation(e))}function At(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case l.CodingContractRewardType.FactionReputation:if(null==e.name||!(v.Factions[e.name]instanceof E.Faction))return e.type=l.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=_.CONSTANTS.CodingContractBaseFactionRepGain*t;return v.Factions[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case l.CodingContractRewardType.FactionReputationAll:const i=_.CONSTANTS.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var a=this.factions.slice();if(0==(a=a.filter(e=>!o.includes(e))).length)return e.type=l.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const m=Math.floor(i/a.length);for(const e of a)v.Factions[e]instanceof E.Faction&&(v.Factions[e].playerReputation+=m);return`Gained ${m} reputation for each of the following factions: ${a.toString()}`;case l.CodingContractRewardType.CompanyReputation:if(null==e.name||!(u.Companies[e.name]instanceof c.Company))return e.type=l.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);n=_.CONSTANTS.CodingContractBaseCompanyRepGain*t;return u.Companies[e.name].playerReputation+=n,`Gained ${n} company reputation for ${e.name}`;case l.CodingContractRewardType.Money:default:var r=_.CONSTANTS.CodingContractBaseMoneyGain*t*s.BitNodeMultipliers.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),`Gained ${K.numeralWrapper.formatMoney(r)}`}}function Rt(e){return null==S.Cities[e]?(console.warn(`Player.travel() called with invalid city: ${e}`),!1):(this.city=e,!0)}function Nt(e){return null==O.Locations[e]?(console.warn(`Player.gotoLocation() called with invalid location: ${e}`),!1):(this.location=e,!0)}function Dt(){return 10===this.bitNodeN||j.SourceFileFlags[10]>0}function Bt(e){this.exploits.includes(e)||this.exploits.push(e)}function It(e){return Object(A.calculateIntelligenceBonus)(this.intelligence,e)}function Lt(){return this.moneySourceA.casino}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessGang",function(){return l}),n.d(t,"getGangFaction",function(){return c}),n.d(t,"getGangName",function(){return u}),n.d(t,"hasGangWith",function(){return m}),n.d(t,"inGang",function(){return p}),n.d(t,"startGang",function(){return d});var a=n(16),r=n(318),i=n(43),o=n(21);const s=-54e3;function l(){return 2===this.bitNodeN||!(i.SourceFileFlags[2]<=0)&&this.karma<=o.BitNodeMultipliers.GangKarmaRequirement*s}function c(){const e=a.Factions[this.gang.facName];if(null==e)throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);return e}function u(){return this.inGang()?this.gang.facName:""}function m(e){return this.inGang()&&this.gang.facName===e}function p(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof r.Gang}function d(e,t){this.gang=new r.Gang(e,t);const n=a.Factions[e];if(null==n)throw new Error(`Invalid faction name when creating gang: ${e}`);n.playerReputation=0}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessCorporation",function(){return i}),n.d(t,"hasCorporation",function(){return o}),n.d(t,"startCorporation",function(){return s});var a=n(41),r=n(43);function i(){return 3===this.bitNodeN||r.SourceFileFlags[3]>0}function o(){return null!=this.corporation&&this.corporation instanceof a.c}function s(e,t=0){this.corporation=new a.c({name:e}),this.corporation.totalShares+=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptUrl=void 0;t.ScriptUrl=class{constructor(e,t){this.filename=e,this.url=t}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return executeJSScript});var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(76),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(834),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urls=null,script=workerScript.getScript();shouldCompile(script,scripts)&&(script.markUpdated(),urls=_getScriptUrls(script,scripts,[]),script.url=urls[urls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(urls[urls.length - 1].url)"))),script.dependencies=urls),loadedModule=await script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,`${script.filename} cannot be run because it does not have a main function.`);return loadedModule.main(ns)}finally{if(null!=urls)for(const e in urls)URL.revokeObjectURL(e.url)}}function shouldCompile(e,t){return""===e.module||e.dependencies.some(n=>{const a=t.find(e=>e.filename==n.filename);return!a||a.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,n){const a=[];n.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,n);return a.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',a.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.ScriptUrl(e.filename,URL.createObjectURL(makeScriptBlob(r)))),a}catch(e){for(const e in a)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is2DArray=void 0,t.is2DArray=function(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tabCompletion=void 0;const a=n(7),r=n(20);t.tabCompletion=function(e,t,n){if(n.constructor!==Array)return;if(!r.containsAllStrings(n))return;if(""===t)for(let t=n.length-1;t>=0;--t)n[t].toLowerCase().startsWith(e.toLowerCase())||n.splice(t,1);else for(let e=n.length-1;e>=0;--e)n[e].toLowerCase().startsWith(t.toLowerCase())||n.splice(e,1);const i=document.getElementById("terminal-input-text-box");if(null==i)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=i,s=o.value.lastIndexOf(";");let l="";if(0!==n.length)if(1===n.length)l=""===t?n[0]+" ":e+" "+n[0],o.value=-1===s?l:o.value.slice(0,s+1)+" "+l,o.focus();else{const i=r.longestCommonStart(n);let l="";for(let e=0;e "+e),a.post(l)):(o.value=-1===s?i:`${o.value.slice(0,s+1)} ${i}`,o.focus()):i===t?(a.post("> "+e+" "+t),a.post(l)):(o.value=-1==s?`${e} ${i}`:`${o.value.slice(0,s+1)} ${e} ${i}`,o.focus())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineAllPossibilitiesForTabCompletion=void 0;const a=n(94),r=n(1132),i=n(75),o=n(305),s=n(81),l=n(23),c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"];t.determineAllPossibilitiesForTabCompletion=function(e,t,n,u=""){let m=[];m=m.concat(Object.keys(i.GlobalAliases));const p=e.getCurrentServer(),d=e.getHomeComputer();let h="",_=null;function g(){for(const e of p.contracts)m.push(e.fn)}function f(){for(const e of p.messages)e instanceof s.Message||m.push(e)}function y(){for(const e of d.programs)m.push(e)}function b(){for(const e of p.scripts){const t=C(e.filename);t&&m.push(t)}}function E(){for(const e of p.textFiles){const t=C(e.fn);t&&m.push(t)}}function v(){const e=r.getSubdirectories(p,null==_?"/":_);for(let t=0;t=e.getUpgradeCost(t.name)){Object(i.n)(t.name,this.state.selectedServer)?this.props.rerender():Object(m.dialogBoxCreate)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature this upgrade affects.")}}render(){const e=this.props.hashManager,t=this.props.upg,n=e.getUpgradeCost(t.name),a=e.upgrades[t.name],i=t.effectText(a),o=e.hashes>=n?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(p.CopyableText,{value:t.name}),r.a.createElement("p",null,"Cost: ",Object(d.Hashes)(n),", Bought: ",a," times"),r.a.createElement("p",null,t.desc),r.a.createElement("button",{className:o,onClick:this.purchase},"Purchase"),a>0&&i&&r.a.createElement("p",null,i),t.hasTargetServer&&r.a.createElement(u.a,{serverType:u.b.Foreign,onChange:this.changeTargetServer,style:{margin:"5px"}}))}}class _ extends r.a.Component{constructor(e){super(e),this.state={totalHashes:l.Player.hashManager.hashes}}componentDidMount(){this.interval=setInterval(()=>this.tick(),1e3)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState({totalHashes:l.Player.hashManager.hashes})}render(){const e=this.props.rerender,t=l.Player.hashManager;if(!(t instanceof o.HashManager))throw new Error("Player does not have a HashManager)");const n=Object.keys(s.HashUpgrades).map(n=>{const a=s.HashUpgrades[n];return r.a.createElement(h,{upg:a,hashManager:t,key:a.name,rerender:e})});return r.a.createElement("div",null,r.a.createElement("p",null,"Spend your hashes on a variety of different upgrades"),r.a.createElement("p",null,"Hashes: ",c.numeralWrapper.formatHashes(this.state.totalHashes)),n)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(0),r=n.n(a),i=n(37),o=n(28),s=n(1),l=n(31),c=n(132),u=n(466);class m extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,n=this.props.recalculate;let a,m;if(e.level>=i.HacknetServerConstants.MaxLevel)a=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.f)(e,i.HacknetServerConstants.MaxLevel);else{const a=i.HacknetServerConstants.MaxLevel-e.level;n=Math.min(a,t)}const c=e.calculateLevelUpgradeCost(n,s.Player.hacknet_node_level_cost_mult);a=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(c)),m=s.Player.money.lt(c)?"std-button-disabled":"std-button"}let p,d;if(e.maxRam>=i.HacknetServerConstants.MaxRam)p=r.a.createElement(r.a.Fragment,null,"MAX RAM"),d="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.g)(e,i.HacknetServerConstants.MaxRam);else{const a=Math.round(Math.log2(i.HacknetServerConstants.MaxRam/e.maxRam));n=Math.min(a,t)}const a=e.calculateRamUpgradeCost(n,s.Player.hacknet_node_ram_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),d=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let h,_;if(e.cores>=i.HacknetServerConstants.MaxCores)h=r.a.createElement(r.a.Fragment,null,"MAX CORES"),_="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.e)(e,i.HacknetServerConstants.MaxCores);else{const a=i.HacknetServerConstants.MaxCores-e.cores;n=Math.min(a,t)}const a=e.calculateCoreUpgradeCost(n,s.Player.hacknet_node_core_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),_=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let g,f;if(e.cache>=i.HacknetServerConstants.MaxCache)g=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),f="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.d)(e,i.HacknetServerConstants.MaxCache);else{const a=i.HacknetServerConstants.MaxCache-e.cache;n=Math.min(a,t)}const a=e.calculateCacheUpgradeCost(n);g=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),f=s.Player.money.lt(a)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},e.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(c.Hashes)(e.totalHashesGenerated)," (",Object(u.HashRate)(e.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(c.Hashes)(e.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:m,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.f)(e,i.HacknetServerConstants.MaxLevel)),Object(o.o)(e,a),n(),!1}},a)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.maxRam,"GB"),r.a.createElement("button",{className:d,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.g)(e,i.HacknetServerConstants.MaxRam)),Object(o.p)(e,a),n(),!1}},p)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:_,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.e)(e,i.HacknetServerConstants.MaxCores)),Object(o.l)(e,a),n(),!1}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.cache),r.a.createElement("button",{className:f,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.d)(e,i.HacknetServerConstants.MaxCache)),Object(o.k)(e,a),n(),Object(o.r)(),!1}},g))))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var a=n(0),r=n.n(a),i=n(37),o=n(28),s=n(1),l=n(31),c=n(125);class u extends r.a.Component{render(){const e=this.props.node,t=this.props.purchaseMultiplier,n=this.props.recalculate;let a,u;if(e.level>=i.HacknetNodeConstants.MaxLevel)a=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.f)(e,i.HacknetNodeConstants.MaxLevel);else{const a=i.HacknetNodeConstants.MaxLevel-e.level;n=Math.min(a,t)}const c=e.calculateLevelUpgradeCost(n,s.Player.hacknet_node_level_cost_mult);a=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(c)),u=s.Player.money.lt(c)?"std-button-disabled":"std-button"}let m,p;if(e.ram>=i.HacknetNodeConstants.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.g)(e,i.HacknetNodeConstants.MaxRam);else{const a=Math.round(Math.log2(i.HacknetNodeConstants.MaxRam/e.ram));n=Math.min(a,t)}const a=e.calculateRamUpgradeCost(n,s.Player.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),p=s.Player.money.lt(a)?"std-button-disabled":"std-button"}let d,h;if(e.cores>=i.HacknetNodeConstants.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),h="std-button-disabled";else{let n=0;if("MAX"===t)n=Object(o.e)(e,i.HacknetNodeConstants.MaxCores);else{const a=i.HacknetNodeConstants.MaxCores-e.cores;n=Math.min(a,t)}const a=e.calculateCoreUpgradeCost(n,s.Player.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",Object(l.Money)(a)),h=s.Player.money.lt(a)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},e.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(l.Money)(e.totalMoneyGenerated)," (",Object(c.MoneyRate)(e.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},e.level),r.a.createElement("button",{className:u,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.f)(e,i.HacknetNodeConstants.MaxLevel)),Object(o.o)(e,a),n(),!1}},a)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},e.ram,"GB"),r.a.createElement("button",{className:p,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.g)(e,i.HacknetNodeConstants.MaxRam)),Object(o.p)(e,a),n(),!1}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},e.cores),r.a.createElement("button",{className:h,onClick:()=>{let a=t;return"MAX"===t&&(a=Object(o.e)(e,i.HacknetNodeConstants.MaxCores)),Object(o.l)(e,a),n(),!1}},d))))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),r=n.n(a),i=n(28);class o extends r.a.Component{getSecondParagraph(){return Object(i.h)()?"Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers will perform computations and operations on the network, earning you hashes. Hashes can be spent on a variety of different upgrades.":"Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its resources to the Hacknet network. This allows you to take a small percentage of profits from hacks performed on the network. Essentially, you are renting out your Node's computing power."}getThirdParagraph(){return Object(i.h)()?"Hacknet Servers can also be used as servers to run scripts. However, running scripts on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash rate will be reduced by the percentage of RAM that is being used by that Server to run scripts.":"Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded in order to increase its computing power and thereby increase the profit you earn from it."}render(){return r.a.createElement("div",null,r.a.createElement("p",{className:"hacknet-general-info"},"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced."),r.a.createElement("p",{className:"hacknet-general-info"},this.getSecondParagraph()),r.a.createElement("p",{className:"hacknet-general-info"},this.getThirdParagraph()))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(80),r=n(17),i=n(1),o=n(56),s=n(19);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){!function(e){document.getElementById("faction-invitation-box-text").innerHTML=e}("You have received a faction invitation from "+e.name),e.alreadyInvited=!0,i.Player.factionInvitations.push(e.name),s.routing.isOn(s.Page.Factions)&&r.Engine.loadFactionsContent(),Object(o.clearEventListeners)("faction-invitation-box-yes").addEventListener("click",function(){return-1===i.Player.factionInvitations.findIndex(t=>t===e.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(a.joinFaction)(e),l(),s.routing.isOn(s.Page.Factions)&&r.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return l(),!1}),document.getElementById("faction-invitation-box-container").style.display="flex"}},,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FactionRoot=void 0;const o=i(n(0)),s=n(1303),l=n(1300),c=n(1299),u=n(1153),m=n(11),p=n(21),d=n(709),h=n(43),_=n(54),g="Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",f="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+)",y="Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp.",b="Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats.",E="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.",v="As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",C="Purchase Duplicate Sleeves and upgrades. These are permanent!",k=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];t.FactionRoot=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1,purchasingAugs:!!e.initiallyOnAugmentationsPage&&e.initiallyOnAugmentationsPage},this.manageGang=this.manageGang.bind(this),this.rerender=this.rerender.bind(this),this.routeToMain=this.routeToMain.bind(this),this.routeToPurchaseAugs=this.routeToPurchaseAugs.bind(this),this.sleevePurchases=this.sleevePurchases.bind(this),this.startFieldWork=this.startFieldWork.bind(this),this.startHackingContracts=this.startHackingContracts.bind(this),this.startHackingMission=this.startHackingMission.bind(this),this.startSecurityWork=this.startSecurityWork.bind(this)}manageGang(){if(this.props.p.inGang())return this.props.engine.loadGangContent();const e=this.props.faction.name;let t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0);const n=_.yesNoBoxGetYesButton(),a=_.yesNoBoxGetNoButton();if(null==n||null==a)return;n.innerHTML="Create Gang",n.addEventListener("click",()=>{this.props.p.startGang(e,t);const n=document.getElementById("world-menu-header");n instanceof HTMLElement&&(n.click(),n.click()),this.props.engine.loadGangContent(),_.yesNoBoxClose()}),a.innerHTML="Cancel",a.addEventListener("click",()=>{_.yesNoBoxClose()});let r="";r=t?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.

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

",_.yesNoBoxCreate(`Would you like to create a new Gang with ${e}?

`+"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.

"+r+"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.")}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}routeToMain(){this.setState({purchasingAugs:!1})}routeToPurchaseAugs(){this.setState({purchasingAugs:!0})}sleevePurchases(){d.createSleevePurchasesFromCovenantPopup(this.props.p)}startFieldWork(){this.props.p.startFactionFieldWork(this.props.faction)}startHackingContracts(){this.props.p.startFactionHackWork(this.props.faction)}startHackingMission(){const e=this.props.faction;this.props.p.singularityStopWork(),this.props.engine.loadMissionContent(),this.props.startHackingMissionFn(e)}startSecurityWork(){this.props.p.startFactionSecurityWork(this.props.faction)}render(){return this.state.purchasingAugs?this.renderAugmentationsPage():this.renderMainPage()}renderMainPage(){const e=this.props.p,t=this.props.faction,n=t.getInfo(),a=e.inGang()&&e.getGangName()===t.name,r=Math.floor(m.CONSTANTS.BaseFavorToDonate*p.BitNodeMultipliers.RepToDonateToFaction),i=t.favor>=r,s="The Covenant"===t.name&&e.bitNodeN>=10&&h.SourceFileFlags[10];let d=e.canAccessGang()&&k.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?d=!1:e.getGangName()===t.name&&(d=!0)),o.createElement("div",null,o.createElement("h1",null,t.name),o.createElement(c.Info,{faction:t,factionInfo:n}),d&&o.createElement(u.Option,{buttonText:"Manage Gang",infoText:g,onClick:this.manageGang}),!a&&n.offerHackingMission&&o.createElement(u.Option,{buttonText:"Hacking Mission",infoText:f,onClick:this.startHackingMission}),!a&&n.offerHackingWork&&o.createElement(u.Option,{buttonText:"Hacking Contracts",infoText:y,onClick:this.startHackingContracts}),!a&&n.offerFieldWork&&o.createElement(u.Option,{buttonText:"Field Work",infoText:b,onClick:this.startFieldWork}),!a&&n.offerSecurityWork&&o.createElement(u.Option,{buttonText:"Security Work",infoText:E,onClick:this.startSecurityWork}),!a&&n.offersWork()&&o.createElement(l.DonateOption,{faction:this.props.faction,p:this.props.p,rerender:this.rerender,favorToDonate:r,disabled:!i}),o.createElement(u.Option,{buttonText:"Purchase Augmentations",infoText:v,onClick:this.routeToPurchaseAugs}),s&&o.createElement(u.Option,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:C,onClick:this.sleevePurchases}))}renderAugmentationsPage(){return o.createElement("div",null,o.createElement(s.AugmentationsPage,{faction:this.props.faction,p:this.props.p,routeToMainPage:this.routeToMain}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"canAccessBladeburner",function(){return i}),n.d(t,"inBladeburner",function(){return o}),n.d(t,"startBladeburner",function(){return s});var a=n(100),r=n(43);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.SourceFileFlags[6]>0||r.SourceFileFlags[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof a.Bladeburner}function s(){this.bladeburner=new a.Bladeburner(this)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasAugmentation=void 0;const a=n(18);t.hasAugmentation=function(e){const t=e instanceof a.Augmentation?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(856),r=n(855),i=n(833),o=n(832),s=n(831),l=n(828),c=n(185),u=n(38),m=n(187),p=n(27),d=n(55);function h(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new d.a(1e3),this.homeComputer="",this.city=u.CityName.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new c.HashManager,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.MoneySourceTracker,this.moneySourceB=new m.MoneySourceTracker,this.scriptProdSinceLastAug=0,this.exploits=[]}Object.assign(h.prototype,s,l,r,i,o,a),h.prototype.toJSON=function(){return Object(p.Generic_toJSON)("PlayerObject",this)},h.fromJSON=function(e){return Object(p.Generic_fromJSON)(h,e.data)},p.Reviver.constructors.PlayerObject=h},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(72),o=n(3),s=n(12);class l extends i.a{render(){const e=this.props.upgradeData,t=`${e[2]} - ${o.numeralWrapper.formatMoney(e[1])}`,n=e[3];return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:()=>{const t=this.corp();t.funds.lt(e[1])?Object(s.dialogBoxCreate)("Insufficient funds"):(t.unlock(e),t.rerender())}},t,r.a.createElement("span",{className:"tooltiptext"},n))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(72),o=n(3),s=n(12);class l extends i.a{render(){const e=this.props.upgradeData,t=this.props.upgradeLevel,n=e[1],a=e[2],i=n*Math.pow(a,t),l=`${e[4]} - ${o.numeralWrapper.formatMoney(i)}`,c=e[5];return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:()=>{const t=this.corp();t.funds.lt(i)?Object(s.dialogBoxCreate)("Insufficient funds"):(t.upgrade(e),t.rerender())}},l,r.a.createElement("span",{className:"tooltiptext"},c))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return _});var a=n(0),r=n.n(a),i=n(72),o=n(859),s=n(858),l=n(41),c=n(472),u=n(471),m=n(11),p=n(3),d=n(20);function h(){return(h=Object.assign||function(e){for(var t=1;t=0?p.numeralWrapper.formatMoney(e):"-"+p.numeralWrapper.format(-1*e,"$0.000a");let n="";if(this.corp().dividendPercentage>0&&e>0){const t=this.corp().dividendPercentage/100*e,a=e-t,r=t/this.corp().totalShares,i=this.corp().numShares*r;n=`Retained Profits (after dividends): ${p.numeralWrapper.format(a,"$0.000a")} / s

`+`Dividend Percentage: ${p.numeralWrapper.format(this.corp().dividendPercentage/100,"0%")}
`+`Dividends per share: ${p.numeralWrapper.format(r,"$0.000a")} / s
`+`Your earnings as a shareholder (Pre-Tax): ${p.numeralWrapper.format(i,"$0.000a")} / s
`+`Dividend Tax Rate: ${this.corp().dividendTaxPercentage}%
`+`Your earnings as a shareholder (Post-Tax): ${p.numeralWrapper.format(i*(1-this.corp().dividendTaxPercentage/100),"$0.000a")} / s

`}let a="Total Funds: "+p.numeralWrapper.format(this.corp().funds.toNumber(),"$0.000a")+"
Total Revenue: "+p.numeralWrapper.format(this.corp().revenue.toNumber(),"$0.000a")+" / s
Total Expenses: "+p.numeralWrapper.format(this.corp().expenses.toNumber(),"$0.000a")+" / s
Total Profits: "+t+" / s
"+n+"Publicly Traded: "+(this.corp().public?"Yes":"No")+"
Owned Stock Shares: "+p.numeralWrapper.format(this.corp().numShares,"0.000a")+"
Stock Price: "+(this.corp().public?p.numeralWrapper.formatMoney(this.corp().sharePrice):"N/A")+"

Total Stock Shares: "+p.numeralWrapper.format(this.corp().totalShares,"0.000a")+""+`Outstanding Shares: ${p.numeralWrapper.format(this.corp().issuedShares,"0.000a")}
`+`Private Shares: ${p.numeralWrapper.format(this.corp().totalShares-this.corp().issuedShares-this.corp().numShares,"0.000a")}`+"



";const r=this.corp().storedCycles*m.CONSTANTS.MilliPerCycle;r>15e3&&(a+=`Bonus time: ${Object(d.convertTimeMsToTimeElapsedString)(r)}

`);let i=this.corp().getProductionMultiplier(),o=this.corp().getStorageMultiplier(),s=this.corp().getAdvertisingMultiplier(),l=this.corp().getEmployeeCreMultiplier(),c=this.corp().getEmployeeChaMultiplier(),u=this.corp().getEmployeeIntMultiplier(),h=this.corp().getEmployeeEffMultiplier(),_=this.corp().getSalesMultiplier(),g=this.corp().getScientificResearchMultiplier();return i>1&&(a+="Production Multiplier: "+p.numeralWrapper.format(i,"0.000")+"
"),o>1&&(a+="Storage Multiplier: "+p.numeralWrapper.format(o,"0.000")+"
"),s>1&&(a+="Advertising Multiplier: "+p.numeralWrapper.format(s,"0.000")+"
"),l>1&&(a+="Empl. Creativity Multiplier: "+p.numeralWrapper.format(l,"0.000")+"
"),c>1&&(a+="Empl. Charisma Multiplier: "+p.numeralWrapper.format(c,"0.000")+"
"),u>1&&(a+="Empl. Intelligence Multiplier: "+p.numeralWrapper.format(u,"0.000")+"
"),h>1&&(a+="Empl. Efficiency Multiplier: "+p.numeralWrapper.format(h,"0.000")+"
"),_>1&&(a+="Sales Multiplier: "+p.numeralWrapper.format(_,"0.000")+"
"),g>1&&(a+="Scientific Research Multiplier: "+p.numeralWrapper.format(g,"0.000")+"
"),a}renderButtons(){const e=this.corp().getStarterGuide.bind(this.corp()),t=this.createButton({class:"a-link-button",display:"inline-block",onClick:e,text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),n=this.corp().determineValuation()>=l.a,a=this.eventHandler().createBribeFactionsPopup.bind(this.eventHandler()),r=n?"a-link-button":"a-link-button-inactive",i={bribeFactions:this.createButton({class:r,display:"inline-block",onClick:a,text:"Bribe Factions",tooltip:n?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"}),getStarterGuide:t};return this.corp().public?this.renderPublicButtons(i):this.renderPrivateButtons(i)}renderPrivateButtons(e){const t=this.corp().fundingRound<4,n=t?"std-button":"a-link-button-inactive",a=t?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":null,i=this.corp().getInvestment.bind(this.corp()),o=this.corp().goPublic.bind(this.corp()),s=this.createButton({class:n,onClick:i,style:"inline-block",text:"Find Investors",tooltip:a}),l=this.createButton({class:"std-button",onClick:o,style:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."});return r.a.createElement("div",null,e.getStarterGuide,s,l,r.a.createElement("br",null),e.bribeFactions)}renderPublicButtons(e){const t=this.corp(),n=this.eventHandler().createSellSharesPopup.bind(this.eventHandler()),a=t.shareSaleCooldown>0,i=a?"a-link-button-inactive":"std-button",o=a?"Cannot sell shares for "+t.convertCooldownToString(t.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=this.createButton({class:i,display:"inline-block",onClick:function(e){e.isTrusted&&n(e)},text:"Sell Shares",tooltip:o}),l=this.eventHandler().createBuybackSharesPopup.bind(this.eventHandler()),c=this.createButton({class:"std-button",display:"inline-block",onClick:l,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),u=this.eventHandler().createIssueNewSharesPopup.bind(this.eventHandler()),m=t.issueNewSharesCooldown>0,p=m?"a-link-button-inactive":"std-button",d=m?"Cannot issue new shares for "+t.convertCooldownToString(t.issueNewSharesCooldown):"Issue new equity shares to raise capital.",h=this.createButton({class:p,display:"inline-block",onClick:u,text:"Issue New Shares",tooltip:d}),_=this.eventHandler().createIssueDividendsPopup.bind(this.eventHandler()),g=this.createButton({class:"std-button",display:"inline-block",onClick:_,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"});return r.a.createElement("div",null,e.getStarterGuide,s,c,r.a.createElement("br",null),h,g,r.a.createElement("br",null),e.bribeFactions)}renderUpgrades(){if(this.corp().divisions.length<=0)return;const e=[];Object.values(c.CorporationUnlockUpgrades).forEach(t=>{0===this.corp().unlockUpgrades[t[0]]&&e.push(this.renderUnlockUpgrade(t))});const t=[];for(let e=0;ethis.renderLevelableUpgrade(e)))}renderUnlockUpgrade(e){return r.a.createElement(s.a,h({},this.props,{upgradeData:e,key:e[0]}))}renderLevelableUpgrade(e){return r.a.createElement(o.a,h({},this.props,{upgradeData:e.upgradeData,upgradeLevel:e.upgradeLevel,key:e.upgradeData[0]}))}render(){return r.a.createElement("div",null,r.a.createElement("p",{dangerouslySetInnerHTML:{__html:this.getOverviewText()}}),this.renderButtons(),r.a.createElement("br",null),this.renderUpgrades())}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return IndustryWarehouse});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_BaseReactComponent__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(72),_Corporation__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(41),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(307),_Material__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_3__),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(210),_Product__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_4__),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(119),_Warehouse__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_5__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(62),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__);function ProductComponent(e){const t=e.corp,n=e.division,a=e.city,r=e.product,i=e.eventHandler,o="0.000",s="0.000a",l=n.hasResearch("uPgrade: Dashboard"),c=r.data[a][1]-r.data[a][2];let u;if(u=r.sllman[a][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(r.sllman[a][1])?`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][2],s)}/${r.sllman[a][1]})`:`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][2],s)}/${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.sllman[a][1],s)})`:"Sell (0.000/0.000)",r.marketTa2)u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.marketTa2Price[a]);else if(r.marketTa1){const e=r.rat/r.mku;u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.pCost+e)}else r.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(r.sCost)?u+=" @ "+r.sCost:u+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.sCost,"$0.000a"));const m=i.createSellProductPopup.bind(i,r,a);let p="Limit Production";r.prdman[a][0]&&(p+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.prdman[a][1],o)+")");const d=i.createLimitProductProdutionPopup.bind(i,r,a),h=i.createDiscontinueProductPopup.bind(i,r,n),_=i.createProductMarketTaPopup.bind(i,r,n);return r.fin?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},r.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][0],s)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(c,s),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][1],s),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.data[a][2],s)," /s")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.rat,o),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.qlt,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.per,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.dur,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.rel,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.aes,o)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.fea,o),1===t.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===t.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.dmd,o),1===t.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===t.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.cmp,o))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Production Cost: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.pCost/_Corporation__WEBPACK_IMPORTED_MODULE_2__.j),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r.pCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:m},u),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:d},p),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:h},"Discontinue"),n.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:_},"Market-TA"))):l?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",r.name,"..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.prog,"0.00"),"% complete"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:m},u),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:d},p),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:h},"Discontinue"),n.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:_},"Market-TA"))):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",r.name,"..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(r.prog,"0.00"),"% complete"))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,eventHandler=props.eventHandler,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _Corporation__WEBPACK_IMPORTED_MODULE_2__.i))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.buy,nfB)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button",purchaseButtonOnClick=eventHandler.createPurchaseMaterialPopup.bind(eventHandler,mat,division,warehouse),exportButtonOnClick=eventHandler.createExportMaterialPopup.bind(eventHandler,mat);let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(mat.sllman[1])?`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)}/${mat.sllman[1]})`:`Sell (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)}/${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sllman[1],nfB)})`,mat.marketTa2)sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.marketTa2Price);else if(mat.marketTa1)sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.bCost+markupLimit);else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(eval(sCost))}else sellButtonText+=" @ "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.sCost)}else sellButtonText="Sell (0.000/0.000)";const sellButtonOnClick=eventHandler.createSellMaterialPopup.bind(eventHandler,mat),marketTaButtonOnClick=eventHandler.createMaterialMarketTaPopup.bind(eventHandler,mat,division);return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(mat.bCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.format(mat.qlt,"0.00a"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:purchaseButtonClass,onClick:purchaseButtonOnClick},purchaseButtonText,tutorial&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:exportButtonOnClick},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:sellButtonOnClick},sellButtonText),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:marketTaButtonOnClick},"Market-TA")))}class IndustryWarehouse extends _BaseReactComponent__WEBPACK_IMPORTED_MODULE_1__.a{isRelevantMaterial(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}renderWarehouseUI(){const e=this.corp(),t=this.routing().currentDivision,n=t.warehouses[this.props.currentCity],a={color:n.sizeUsed>=n.size?"red":"white",margin:"5px"},r=_Corporation__WEBPACK_IMPORTED_MODULE_2__.o*Math.pow(1.07,n.level+1),i=e.funds.gt(r)?"std-button":"a-link-button-inactive";let o="This Industry uses ["+Object.keys(t.reqMats).join(", ")+"] in order to ";t.prodMats.length>0?(o+="produce ["+t.prodMats.join(", ")+"] ",t.makesProducts&&(o+=" and "+t.getProductDescriptionText())):t.makesProducts&&(o+=t.getProductDescriptionText()+".");const s=[];for(const e in t.reqMats)if(t.reqMats.hasOwnProperty(e)){const n=[" *",t.reqMats[e],e].join(" ");s.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:e},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,n)))}let l,c="in order to create ";switch(t.prodMats.length>0?(c+="one of each produced Material ("+t.prodMats.join(", ")+") ",t.makesProducts&&(c+="or to create one of its Products")):t.makesProducts&&(c+="one of its Products"),t.state){case"START":l="Current state: Preparing...";break;case"PURCHASE":l="Current state: Purchasing materials...";break;case"PRODUCTION":l="Current state: Producing materials and/or products...";break;case"SALE":l="Current state: Selling materials and/or products...";break;case"EXPORT":l="Current state: Exporting materials and/or products...";break;default:console.error(`Invalid state: ${t.state}`)}const u=[];for(const a in n.materials)n.materials[a]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.Material&&this.isRelevantMaterial(a,t)&&u.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{city:this.props.currentCity,corp:e,division:t,eventHandler:this.eventHandler(),key:a,mat:n.materials[a],warehouse:n}));const m=[];if(t.makesProducts&&Object.keys(t.products).length>0)for(const a in t.products)t.products[a]instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.Product&&m.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{city:this.props.currentCity,corp:e,division:t,eventHandler:this.eventHandler(),key:a,product:t.products[a],warehouse:n}));return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip",style:a},"Storage: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatBigNumber(n.sizeUsed)," / ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatBigNumber(n.size),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:n.breakdown}})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:i,onClick:()=>{++n.level,n.updateSize(e,t),e.funds=e.funds.minus(r),e.rerender()}},"Upgrade Warehouse Size - ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(r)),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,o,". The exact requirements for production are:"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),s,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,c),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,l),e.unlockUpgrades[1]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:t=>{n.smartSupplyEnabled=t.target.checked,e.rerender()},style:{margin:"3px"},checked:n.smartSupplyEnabled})),u,m)}render(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=e.warehouses[this.props.currentCity],n=this.eventHandler().purchaseWarehouse.bind(this.eventHandler(),e,this.props.currentCity);return t instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.Warehouse?this.renderWarehouseUI():react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:n},"Purchase Warehouse (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.numeralWrapper.formatMoney(_Corporation__WEBPACK_IMPORTED_MODULE_2__.m),")"))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var a=n(0),r=n.n(a),i=n(72),o=n(41),s=n(33),l=n(320),c=n(3),u=n(12),m=n(171);class p extends i.a{renderMakeProductButton(){const e=this.routing().currentDivision;var t,n;switch(e.type){case s.Industries.Food:t="Build Restaurant",n="Build and manage a new restaurant!";break;case s.Industries.Tobacco:t="Create Product",n="Create a new tobacco product!";break;case s.Industries.Pharmaceutical:t="Create Drug",n="Design and develop a new pharmaceutical drug!";break;case s.Industries.Computer:case"Computer":t="Create Product",n="Design and manufacture a new computer hardware product!";break;case s.Industries.Robotics:t="Design Robot",n="Design and create a new robot or robotic system!";break;case s.Industries.Software:t="Develop Software",n="Develop a new piece of software!";break;case s.Industries.Healthcare:t="Build Hospital",n="Build and manage a new hospital!";break;case s.Industries.RealEstate:t="Develop Property",n="Develop a new piece of real estate property!";break;default:return t="Create Product",n="Create a new product!",""}n+="

To begin developing a product, first choose the city in which it will be designed. The stats of your employees in the selected city affect the properties of the finished product, such as its quality, performance, and durability.

You can also choose to invest money in the design and marketing of the product. Investing money in its design will result in a superior product. Investing money in marketing the product will help the product's sales.";const a=e.hasMaximumNumberProducts(),i=a?"a-link-button-inactive tooltip":"std-button",o=this.eventHandler().createMakeProductPopup.bind(this.eventHandler(),n,e);return r.a.createElement("button",{className:i,onClick:o,style:{margin:"6px",display:"inline-block"}},t,a&&r.a.createElement("span",{className:"tooltiptext"},"You have reached the maximum number of products: ",e.getMaximumNumberProducts()))}renderText(){const e=this.corp(),t=this.routing().currentDivision,n=1===e.unlockUpgrades[4],a=t.lastCycleRevenue.minus(t.lastCycleExpenses).toNumber(),i=`Industry: ${t.type} (Corp Funds: ${c.numeralWrapper.formatMoney(e.funds.toNumber())})`,o=`Awareness: ${c.numeralWrapper.format(t.awareness,"0.000")}`,s=`Popularity: ${c.numeralWrapper.format(t.popularity,"0.000")}`;let l=!1;const p=t.getAdvertisingFactors(),d=p[1],h=p[2],_=p[3],g=p[0];n&&(l=!0);const f=`Revenue: ${c.numeralWrapper.formatMoney(t.lastCycleRevenue.toNumber())} / s`,y=`Expenses: ${c.numeralWrapper.formatMoney(t.lastCycleExpenses.toNumber())} /s`,b=`Profit: ${c.numeralWrapper.formatMoney(a)} / s`;return r.a.createElement("div",null,i,r.a.createElement("br",null)," ",r.a.createElement("br",null),o," ",r.a.createElement("br",null),s," ",r.a.createElement("br",null),!1!==l&&r.a.createElement("p",{className:"tooltip"},"Advertising Multiplier: x",c.numeralWrapper.format(g,"0.000"),r.a.createElement("span",{className:"tooltiptext cmpy-mgmt-advertising-info"},"Total multiplier for this industrys sales due to its awareness and popularity",r.a.createElement("br",null),"Awareness Bonus: x",c.numeralWrapper.format(Math.pow(d,.85),"0.000"),r.a.createElement("br",null),"Popularity Bonus: x",c.numeralWrapper.format(Math.pow(h,.85),"0.000"),r.a.createElement("br",null),"Ratio Multiplier: x",c.numeralWrapper.format(Math.pow(_,.85),"0.000"))),l,r.a.createElement("br",null),r.a.createElement("br",null),f," ",r.a.createElement("br",null),y," ",r.a.createElement("br",null),b,r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Production Multiplier: ",c.numeralWrapper.format(t.prodMult,"0.00"),r.a.createElement("span",{className:"tooltiptext"},"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate")),r.a.createElement("div",{className:"help-tip",onClick:()=>{function e(e){return Object(m.createProgressBarText)({progress:e,totalTicks:20})}Object(u.dialogBoxCreate)("Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these materials have on your production varies between Industries. For example, Real Estate may be very effective for some Industries, but ineffective for others.

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.

Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):

"+`Hardware:    ${e(t.hwFac)}
`+`Robots:      ${e(t.robFac)}
`+`AI Cores:    ${e(t.aiFac)}
`+`Real Estate: ${e(t.reFac)}`)}},"?"),r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Scientific Research: ",c.numeralWrapper.format(t.sciResearch.qty,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),r.a.createElement("button",{className:"help-tip",onClick:t.createResearchBox.bind(t)},"Research"))}renderUpgrades(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity];if(!(n instanceof o.i))throw new Error(`Current City (${this.props.currentCity}) for UI does not have an OfficeSpace object`);const a=[];for(const r in l.IndustryUpgrades){const i=l.IndustryUpgrades[r];if(t.hasResearch("AutoBrew")&&"Coffee"===i[4])continue;const o=i[0],s=i[1],m=i[2];let p=0;switch(o){case 0:p=n.employees.length*s;break;default:p=s*Math.pow(m,t.upgrades[o])}const d=()=>{e.funds.lt(p)?Object(u.dialogBoxCreate)("Insufficient funds"):(e.funds=e.funds.minus(p),t.upgrade(i,{corporation:e,office:n}),e.rerender())};a.push(this.renderUpgrade({onClick:d,text:`${i[4]} - ${c.numeralWrapper.formatMoney(p)}`,tooltip:i[5]}))}return a}renderUpgrade(e){return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",onClick:e.onClick,key:e.text},e.text,null!=e.tooltip&&r.a.createElement("span",{className:"tooltiptext"},e.tooltip))}render(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=this.renderMakeProductButton();return r.a.createElement("div",{className:"cmpy-mgmt-industry-overview-panel"},this.renderText(),r.a.createElement("br",null),r.a.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),r.a.createElement("br",null),this.renderUpgrades()," ",r.a.createElement("br",null),e.makesProducts&&t)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var a=n(0),r=n.n(a),i=n(72),o=n(41),s=n(25),l=n(3),c=n(181);class u extends i.a{constructor(e){super(e),this.state={city:"",division:"",employeeManualAssignMode:!1,employee:null,numEmployees:0,numOperations:0,numEngineers:0,numBusiness:0,numManagement:0,numResearch:0,numUnassigned:0,numTraining:0},this.updateEmployeeCount()}resetEmployeeCount(){this.state.numEmployees=0,this.state.numOperations=0,this.state.numEngineers=0,this.state.numBusiness=0,this.state.numManagement=0,this.state.numResearch=0,this.state.numUnassigned=0,this.state.numTraining=0}updateEmployeeCount(){const e=this.routing().currentDivision;if(null==e)throw new Error("Routing does not hold reference to the current Industry");const t=e.offices[this.props.currentCity];if(!(t instanceof o.i))throw new Error(`Current City (${this.props.currentCity}) for UI does not have an OfficeSpace object`);e.name===this.state.division&&this.props.currentCity===this.state.city||(this.resetEmployeeCount(),this.state.division=e.name,this.state.city=this.props.currentCity);const n=t.employees.length;for(let e=this.state.numEmployees;e0&&(u=a/t.employees.length,m=i/t.employees.length,p=o/t.employees.length);const d=n=>{if(this.state.numUnassigned<=0)console.warn("Cannot assign employee. No unassigned employees available");else{switch(n){case s.EmployeePositions.Operations:++this.state.numOperations;break;case s.EmployeePositions.Engineer:++this.state.numEngineers;break;case s.EmployeePositions.Business:++this.state.numBusiness;break;case s.EmployeePositions.Management:++this.state.numManagement;break;case s.EmployeePositions.RandD:++this.state.numResearch;break;case s.EmployeePositions.Unassigned:++this.state.numUnassigned;break;case s.EmployeePositions.Training:++this.state.numTraining;break;default:console.error("Unrecognized employee position: "+n)}--this.state.numUnassigned,t.assignEmployeeToJob(n),t.calculateEmployeeProductivity({corporation:this.corp(),industry:e}),this.corp().rerender()}},h=n=>{function a(e){console.warn(`Cannot unassign from ${e} because there is nobody assigned to that position`)}switch(n){case s.EmployeePositions.Operations:if(this.state.numOperations<=0)return a(s.EmployeePositions.Operations);--this.state.numOperations;break;case s.EmployeePositions.Engineer:if(this.state.numEngineers<=0)return a(s.EmployeePositions.Operations);--this.state.numEngineers;break;case s.EmployeePositions.Business:if(this.state.numBusiness<=0)return a(s.EmployeePositions.Operations);--this.state.numBusiness;break;case s.EmployeePositions.Management:if(this.state.numManagement<=0)return a(s.EmployeePositions.Operations);--this.state.numManagement;break;case s.EmployeePositions.RandD:if(this.state.numResearch<=0)return a(s.EmployeePositions.Operations);--this.state.numResearch;break;case s.EmployeePositions.Unassigned:console.warn("Tried to unassign from the Unassigned position");break;case s.EmployeePositions.Training:if(this.state.numTraining<=0)return a(s.EmployeePositions.Operations);--this.state.numTraining;break;default:console.error("Unrecognized employee position: "+n)}++this.state.numUnassigned,t.unassignEmployeeFromJob(n),t.calculateEmployeeProductivity({corporation:this.corp(),industry:e}),this.corp().rerender()},_={fontSize:"15px",margin:"5px 0px 5px 0px",width:"50%"},g=this.state.numUnassigned>0?"std-button":"a-link-button-inactive",f=this.state.numOperations>0?"std-button":"a-link-button-inactive",y=this.state.numEngineers>0?"std-button":"a-link-button-inactive",b=this.state.numBusiness>0?"std-button":"a-link-button-inactive",E=this.state.numManagement>0?"std-button":"a-link-button-inactive",v=this.state.numResearch>0?"std-button":"a-link-button-inactive",C=this.state.numTraining>0?"std-button":"a-link-button-inactive";return r.a.createElement("div",null,r.a.createElement("button",{className:"std-button tooltip",onClick:()=>{this.state.employeeManualAssignMode=!0,this.corp().rerender()}},"Switch to Manual Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")),r.a.createElement("p",null,r.a.createElement("strong",null,"Unassigned Employees: ",this.state.numUnassigned)),r.a.createElement("br",null),r.a.createElement("p",null,"Avg Employee Morale: ",l.numeralWrapper.format(u,"0.000")),r.a.createElement("p",null,"Avg Employee Happiness: ",l.numeralWrapper.format(m,"0.000")),r.a.createElement("p",null,"Avg Employee Energy: ",l.numeralWrapper.format(p,"0.000")),r.a.createElement("p",null,"Total Employee Salary: ",l.numeralWrapper.formatMoney(c)),n&&r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production: ",l.numeralWrapper.format(e.getOfficeProductivity(t),"0.000"),r.a.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),n&&r.a.createElement("br",null),n&&r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production: ",l.numeralWrapper.format(e.getOfficeProductivity(t,{forProduct:!0}),"0.000"),r.a.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")),n&&r.a.createElement("br",null),n&&r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier: x",l.numeralWrapper.format(e.getBusinessFactor(t),"0.000"),r.a.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales")),n&&r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Operations," (",this.state.numOperations,")",r.a.createElement("span",{className:"tooltiptext"},"Manages supply chain operations. Improves the amount of Materials and Products you produce.")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Operations),this.corp().rerender()}},"+"),r.a.createElement("button",{className:f,onClick:()=>{h(s.EmployeePositions.Operations),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Engineer," (",this.state.numEngineers,")",r.a.createElement("span",{className:"tooltiptext"},"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Engineer),this.corp().rerender()}},"+"),r.a.createElement("button",{className:y,onClick:()=>{h(s.EmployeePositions.Engineer),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Business," (",this.state.numBusiness,")",r.a.createElement("span",{className:"tooltiptext"},"Handles sales and finances. Improves the amount of Materials and Products you can sell.")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Business),this.corp().rerender()}},"+"),r.a.createElement("button",{className:b,onClick:()=>{h(s.EmployeePositions.Business),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Management," (",this.state.numManagement,")",r.a.createElement("span",{className:"tooltiptext"},"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Management),this.corp().rerender()}},"+"),r.a.createElement("button",{className:E,onClick:()=>{h(s.EmployeePositions.Management),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.RandD," (",this.state.numResearch,")",r.a.createElement("span",{className:"tooltiptext"},"Research new innovative ways to improve the company. Generates Scientific Research")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.RandD),this.corp().rerender()}},"+"),r.a.createElement("button",{className:v,onClick:()=>{h(s.EmployeePositions.RandD),this.corp().rerender()}},"-"),r.a.createElement("br",null),r.a.createElement("h2",{className:"tooltip",style:_},s.EmployeePositions.Training," (",this.state.numTraining,")",r.a.createElement("span",{className:"tooltiptext"},"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations.")),r.a.createElement("button",{className:g,onClick:()=>{d(s.EmployeePositions.Training),this.corp().rerender()}},"+"),r.a.createElement("button",{className:C,onClick:()=>{h(s.EmployeePositions.Training),this.corp().rerender()}},"-"))}renderManualEmployeeManagement(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity],a=[];for(let e=0;e{this.state.employeeManualAssignMode=!1,this.corp().rerender()}},"Switch to Auto Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")),r.a.createElement("div",{style:{color:"white",margin:"4px",padding:"4px"}},r.a.createElement("select",{onChange:t=>{const a=Object(c.getSelectText)(t.target);for(let e=0;e{const n=Object(c.getSelectText)(t.target);this.state.employee.pos=n,this.resetEmployeeCount(),e.rerender()},value:o},u)))}render(){const e=this.corp(),t=this.routing().currentDivision,n=t.offices[this.props.currentCity],a={fontSize:"13px"};let i="tooltip";n.atCapacity()?i+=" a-link-button-inactive":(i+=" std-button",0===n.employees.length&&(i+=" flashing-button"));let o="tooltip";n.atCapacity()?o+=" a-link-button-inactive":o+=" std-button";const s=this.eventHandler().createUpgradeOfficeSizePopup.bind(this.eventHandler(),n),l=this.eventHandler().createThrowOfficePartyPopup.bind(this.eventHandler(),n);return r.a.createElement("div",{className:"cmpy-mgmt-employee-panel"},r.a.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),r.a.createElement("p",null,"Size: ",n.employees.length," / ",n.size," employees"),r.a.createElement("button",{className:i,onClick:()=>{n.findEmployees({corporation:e,industry:t})},style:a},"Hire Employee",0===n.employees.length&&r.a.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),r.a.createElement("button",{className:o,onClick:()=>{n.atCapacity()||(n.hireRandomEmployee(),this.corp().rerender())},style:a},"Autohire Employee",r.a.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button tooltip",onClick:s,style:a},"Upgrade size",r.a.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!t.hasResearch("AutoPartyManager")&&r.a.createElement("button",{className:"std-button tooltip",onClick:l,style:a},"Throw Party",r.a.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),r.a.createElement("br",null),this.renderEmployeeManagement())}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var a=n(0),r=n.n(a),i=n(72),o=n(863),s=n(862),l=n(861);class c extends i.a{constructor(e){if(null==e.currentCity)throw new Error("Industry component constructed without 'city' prop");super(e)}render(){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(s.a,this.props),r.a.createElement(o.a,this.props)),r.a.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},r.a.createElement(l.a,this.props)))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(0),r=n.n(a),i=n(72);class o extends i.a{constructor(e){if(null==e.onClicks)throw new Error("CityTabs component constructed without onClick handlers");if(null==e.city)throw new Error("CityTabs component constructed without 'city' property");if(null==e.cityStateSetter)throw new Error("CityTabs component constructed without 'cityStateSetter' property");super(e)}renderTab(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick,key:e.key},e.key)}render(){const e=this.routing().currentDivision,t=[];for(const e in this.props.onClicks)t.push(this.renderTab({current:this.props.city===e,key:e,onClick:this.props.onClicks[e]}));const n=this.eventHandler().createNewCityPopup.bind(this.eventHandler(),e,this.props.cityStateSetter);return t.push(this.renderTab({current:!1,key:"Expand into new City",onClick:n})),t}}},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var a=n(0),r=n.n(a),i=n(72),o=n(865),s=n(864),l=n(860),c=n(41),u=n(38);function m(){return(m=Object.assign||function(e){for(var t=1;t{this.state.city=n,this.corp().rerender()}));const n=r.a.createElement(o.a,m({},this.props,{city:this.state.city,onClicks:t,cityStateSetter:this.changeCityState.bind(this)})),a=r.a.createElement(s.a,m({},this.props,{currentCity:this.state.city}));return r.a.createElement("div",{id:"cmpy-mgmt-panel"},n,a)}render(){return this.renderContent()}}},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var a=n(0),r=n.n(a),i=n(72);function o(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.text)}class s extends i.a{renderTab(e){return r.a.createElement(o,{current:e.current,key:e.key,onClick:e.onClick,text:e.text})}render(){const e={};for(const t of this.corp().divisions){const n=t.name,a=()=>{this.routing().routeTo(n),this.corp().rerender()};e[n]=a}return r.a.createElement("div",null,this.renderTab({current:this.routing().isOnOverviewPage(),key:"overview",onClick:()=>{this.routing().routeToOverviewPage(),this.corp().rerender()},text:this.corp().name}),this.corp().divisions.map(t=>this.renderTab({current:this.routing().isOn(t.name),key:t.name,onClick:e[t.name],text:t.name})),this.renderTab({onClick:this.eventHandler().createNewIndustryPopup.bind(this.eventHandler()),text:"Expand into new Industry"}))}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(0),r=n.n(a),i=n(72),o=n(867),s=n(866);class l extends i.a{render(){return r.a.createElement("div",null,r.a.createElement(o.a,this.props),r.a.createElement(s.a,this.props))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSelector=void 0,t.clearSelector=function(e){for(let t=e.options.length-1;t>=0;t--)e.remove(t)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return CorporationEventHandler});var _Routing__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(469),_Routing__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Routing__WEBPACK_IMPORTED_MODULE_0__),_Corporation__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(41),_IndustryData__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(33),_IndustryData__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_2__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(134),_MaterialSizes__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(210),_Product__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_4__),_Player__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1),_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(16),_Faction_Factions__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(173),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(12),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(36),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(44),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(869),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_12__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(13),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__),_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(431),_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_utils_uiHelpers_createOptionElement__WEBPACK_IMPORTED_MODULE_14__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(57),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(69),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__),_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(181),_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(49),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__);class CorporationEventHandler{constructor(e,t){if(!(e instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.c))throw new Error("CorporationEventHandler constructed without proper Corporation instance");if(!(t instanceof _Routing__WEBPACK_IMPORTED_MODULE_0__.CorporationRouting))throw new Error("CorporationEventHandler constructed without proper CorporationRouting instance");this.corp=e,this.routing=t}createBribeFactionsPopup(){const e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_13__.createElement)("select",{class:"dropdown",margin:"3px"});for(let e=0;e<_Player__WEBPACK_IMPORTED_MODULE_5__.Player.factions.length;++e){const t=_Player__WEBPACK_IMPORTED_MODULE_5__.Player.factions[e];_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__.Factions[t].getInfo().offersWork()&&n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("option",{text:t,value:t}))}var a,r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==i.value||""==i.value?0:parseFloat(i.value),t=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(parseFloat(a.value));if(isNaN(e)||isNaN(o)||e<0||o<0)r.innerText="ERROR: Invalid value(s) entered";else if(this.corp.funds.lt(e))r.innerText="ERROR: You do not have this much money to bribe with";else if(this.corp.stockShares>this.corp.numShares)r.innerText="ERROR: You do not have this many shares to bribe with";else{var s=(Number(e)+o*t)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;r.innerText="You will gain "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(s,"0,0")+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==i.value||""==i.value?0:parseFloat(i.value),t=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(a.value);if(isNaN(e)||isNaN(o)||e<0||o<0)r.innerText="ERROR: Invalid value(s) entered";else if(this.corp.funds.lt(e))r.innerText="ERROR: You do not have this much money to bribe with";else if(this.corp.stockShares>this.corp.numShares)r.innerText="ERROR: You do not have this many shares to bribe with";else{var s=(e+o*t)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;r.innerText="You will gain "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(s,"0,0")+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==i.value||""==i.value?0:parseFloat(i.value),r=this.corp.sharePrice,o=null==a.value||""==a.value?0:Math.round(parseFloat(a.value)),s=_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__.Factions[n.options[n.selectedIndex].value];if(null==s)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(o)||t<0||o<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.corp.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(o>this.corp.numShares)){var l=(t+o*r)/_Corporation__WEBPACK_IMPORTED_MODULE_1__.b;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You gained "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(l,"0,0")+" reputation with "+s.name+" by bribing them."),s.playerReputation+=l,this.corp.funds=this.corp.funds.minus(t),this.corp.numShares-=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[t,n,r,i,a,o,s])}createBuybackSharesPopup(){const e="cmpy-mgmt-buyback-shares-popup",t=1.1*this.corp.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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.

To purchase these shares, you must use your own money (NOT your Corporation's funds).

The current buyback price of your company's stock is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")+". Your company currently has "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatBigNumber(this.corp.issuedShares)+" outstanding stock shares"});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"number",placeholder:"Shares to buyback",margin:"5px",inputListener:()=>{var e=Math.round(r.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to buyback":e>this.corp.issuedShares?a.innerText="There are not this many shares available to buy back. There are only "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatBigNumber(this.corp.issuedShares)+" outstanding shares.":a.innerText="Purchase "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(e*t,"$0.000a")}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(r.value);const n=1.1*this.corp.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.corp.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: There are not this many oustanding shares to buy back");else if(t*n>_Player__WEBPACK_IMPORTED_MODULE_5__.Player.money)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t*n,"$0.000a")+")");else{if(this.corp.numShares+=t,isNaN(this.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+this.corp.issuedShares),console.warn("Converting to number now");const e=parseInt(this.corp.issuedShares);isNaN(e)?this.corp.issuedShares=0:this.corp.issuedShares=e}this.corp.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_5__.Player.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),this.rerender()}return!1}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[n,a,r,i,o]),r.focus()}createDiscontinueProductPopup(e,t){const n="cmpy-mgmt-discontinue-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"popup-box-button",innerText:"Discontinue",clickListener:()=>(t.discontinueProduct(e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),this.rerender(),!1)}),i=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,i,r])}createExportMaterialPopup(mat){const corp=this.corp,popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_13__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown",changeListener:()=>{const e=Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__.getSelectValue)(industrySelector);for(let t=0;t{const industryName=Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_17__.getSelectText)(industrySelector),cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value;let sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");let temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid expression entered for export amount: "+e),!1}if(!(null==temp||isNaN(temp)||temp<0)){var exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};return mat.exp.push(exportObj),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(popupId),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(popupId,{innerText:"Cancel"}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."}),currExports=[];for(var i=0;iCity: "+t.exp[e].city+"
Amount/s: "+t.exp[e].amt,clickListener:()=>{t.exp.splice(e,1),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(popupId),createExportMaterialPopup(t)}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}createIssueDividendsPopup(){const e="cmpy-mgmt-issue-dividends-popup",t="Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.

In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an "+`integer between 0 and ${_Corporation__WEBPACK_IMPORTED_MODULE_1__.d}. (A percentage of 0 means no dividends will be `+"issued

Two important things to note:
* Issuing dividends will negatively affect your corporation's stock price
* Dividends are taxed. Taxes start at 50%, but can be decreased

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_13__.createElement)("p",{innerHTML:t});let a;const r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Dividend %",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&a.click()}});a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Allocate Dividend Percentage",clickListener:()=>{const t=Math.round(parseInt(r.value));return isNaN(t)||t<0||t>_Corporation__WEBPACK_IMPORTED_MODULE_1__.d?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Invalid value. Must be an integer between 0 and ${_Corporation__WEBPACK_IMPORTED_MODULE_1__.d}`):(this.corp.dividendPercentage=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),this.rerender(),!1)}});const i=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[n,r,a,i]),r.focus()}createIssueNewSharesPopup(){const e="cmpy-mgmt-issue-new-shares-popup",t=Math.round(.2*this.corp.totalShares),n=t-t%1e6,a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.

"+` * You can issue at most ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.000a")} new shares
`+" * New shares are sold at a 10% discount
 * You can only issue new shares once every 12 hours
 * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share
 * Number of new shares issued must be a multiple of 10 million

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 r,i;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{display:"block"});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"# New Shares",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER?r.click():function(e){const t=Math.round(.9*e.sharePrice);let a=parseInt(i.value);isNaN(a)?o.innerText="Invalid input":(a/=1e7,a=1e7*Math.round(a),o.innerText=a<1e7?"Must issue at least 10 million new shares":a>n?"You cannot issue that many shares":`Issue ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0.000a")} new shares `+`for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(a*t)}?`)}(this.corp)}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Issue New Shares",clickListener:()=>{const t=Math.round(.9*this.corp.sharePrice);let a=parseInt(i.value);if(isNaN(a))return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input for number of new shares");if((a=1e7*Math.round(a/1e7))<1e7||a>n)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input for number of new shares");const r=a*t;this.corp.issueNewSharesCooldown=_Corporation__WEBPACK_IMPORTED_MODULE_1__.f,this.corp.totalShares+=a;let o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_10__.getRandomInt)(0,Math.round(a/2));return o=1e6*Math.round(o/1e6),this.corp.issuedShares+=a-o,this.corp.funds=this.corp.funds.plus(r),this.corp.immediatelyUpdateSharePrice(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Issued ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0.000a")} and raised `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(r)}. ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(o,"0.000a")} `+"of these shares were bought by private investors.

"+`Stock price decreased to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(this.corp.sharePrice)}`),this.rerender(),!1}});const s=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[a,o,i,r,s]),i.focus()}createLimitProductProdutionPopup(e,t){const n="cmpy-mgmt-limit-product-production-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."});let r;const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Limit",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&r.click()}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Limit production",margin:"5px",clickListener:()=>{if(""===i.value)return e.prdman[t][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),!1;var a=parseFloat(i.value);return isNaN(a)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value entered"),!1):(a<0?e.prdman[t][0]=!1:(e.prdman[t][0]=!0,e.prdman[t][1]=a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),this.rerender(),!1)}});const o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{innerText:"Cancel"});o.style.margin="6px",Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,i,r,o]),i.focus()}createMakeProductPopup(e,t){if(t.hasMaximumNumberProducts())return;const n="cmpy-mgmt-create-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:e}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown",margin:"5px"});for(const e in t.offices)t.offices[e]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.i&&r.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("option",{value:e,text:e}));let i="Product Name";t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Food?i="Restaurant Name":t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.Healthcare?i="Hospital Name":t.type===_IndustryData__WEBPACK_IMPORTED_MODULE_2__.Industries.RealEstate&&(i="Property Name");var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",margin:"5px",placeholder:i}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("br"),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",margin:"5px",placeholder:"Design investment",type:"number"});let c;var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",margin:"5px",placeholder:"Marketing investment",type:"number",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&c.click()}});c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Develop Product",clickListener:()=>{(null==l.value||l.value<0)&&(l.value=0),(null==u.value||u.value<0)&&(u.value=0);var e=parseFloat(l.value),a=parseFloat(u.value);if(null==o.value||""===o.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.corp.funds.lt(e+a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{const i=new _Product__WEBPACK_IMPORTED_MODULE_4__.Product({name:o.value.replace(/[<>]/g,""),createCity:r.options[r.selectedIndex].value,designCost:e,advCost:a});if(t.products[i.name]instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.Product)return void Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You already have a product with this name!");this.corp.funds=this.corp.funds.minus(e+a),t.products[i.name]=i,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n)}return this.rerender(),!1}});const m=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,r,o,s,l,u,c,m]),o.focus()}createMaterialMarketTaPopup(e,t){const n="cmpy-mgmt-marketta-popup",a=e.getMarkupLimit(),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Market-TA.I
The maximum sale price you can mark this up to is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(e.bCost+a)+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{display:"block"}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{color:"white",for:"cmpy-mgmt-marketa1-checkbox",innerText:"Use Market-TA.I for Auto-Sale Price",tooltip:"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)"}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:e.marketTa1,id:"cmpy-mgmt-marketa1-checkbox",margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa1=t.target.checked}});i.appendChild(o),i.appendChild(s);const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",display:"block",innerText:"Close"});if(t.hasResearch("Market-TA.II")){let t;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),t()},type:"number",value:e.bCost});(t=function(){const t=parseFloat(s.value);let n=1;t>e.bCost?t-e.bCost>a&&(n=Math.pow(a/(t-e.bCost),2)):t{e.marketTa2=t.target.checked}});u.appendChild(m),u.appendChild(p);const d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,o,s,u,d,l])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,l])}createNewCityPopup(e,t){const n="cmpy-mgmt-expand-city-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g,"$0.000a")}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown",margin:"5px"});for(const t in e.offices)e.offices[t]instanceof _Corporation__WEBPACK_IMPORTED_MODULE_1__.i||r.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("option",{text:t,value:t}));const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Confirm",clickListener:()=>{if(r.length<=0)return!1;let a=r.options[r.selectedIndex].value;return this.corp.funds.lt(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.corp.funds=this.corp.funds.minus(_Corporation__WEBPACK_IMPORTED_MODULE_1__.g),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Opened a new office in "+a+"!"),e.offices[a]=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.i({loc:a,size:_Corporation__WEBPACK_IMPORTED_MODULE_1__.h})),t(a),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(n),this.rerender(),!1}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[a,r,i,o])}createNewIndustryPopup(){const e="cmpy-mgmt-expand-industry-popup";if(null!=document.getElementById(e))return;var t,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("select",{class:"dropdown"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&t.click()}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{const e=a.options[a.selectedIndex].value,t=i.value;for(let e=0;e
",a.addEventListener("change",function(){var e=a.options[a.selectedIndex].value;r.innerHTML=_IndustryData__WEBPACK_IMPORTED_MODULE_2__.IndustryDescriptions[e]+"

"});const m=[];return m.push(n),m.push(a),m.push(r),m.push(o),m.push(i),m.push(s),m.push(t),Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,m),i.focus(),!1}createProductMarketTaPopup(e,t){const n="cmpy-mgmt-marketta-popup",a=e.rat/e.mku,r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Market-TA.I
The maximum sale price you can mark this up to is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(e.pCost+a)+". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{display:"block"}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{color:"white",for:"cmpy-mgmt-marketa1-checkbox",innerText:"Use Market-TA.I for Auto-Sale Price",tooltip:"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)"}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:e.marketTa1,id:"cmpy-mgmt-marketa1-checkbox",margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa1=t.target.checked}});i.appendChild(o),i.appendChild(s);const l=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(n,{class:"std-button",display:"block",innerText:"Close"});if(t.hasResearch("Market-TA.II")){let t;const o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{marginTop:"4px",onkeyup:e=>{e.preventDefault(),t()},type:"number",value:e.pCost});(t=function(){const t=parseFloat(s.value);let n=1;t>e.pCost&&t-e.pCost>a&&(n=a/(t-e.pCost)),o.innerHTML="
Market-TA.II
"+`If you sell at ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t)}, `+`then you will sell ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(n,"0.00000")}x as much compared `+"to if you sold at market price."})();const c="cmpy-mgmt-marketa2-checkbox",u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{display:"block"}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{color:"white",for:c,innerText:"Use Market-TA.II for Auto-Sale Price",tooltip:"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)"}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:e.marketTa2,id:c,margin:"3px",type:"checkbox",changeListener:t=>{e.marketTa2=t.target.checked}});u.appendChild(m),u.appendChild(p);const d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,o,s,u,d,l])}else Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(n,[r,i,l])}createPurchaseMaterialPopup(e,t,n){const a=this.corp,r="cmpy-mgmt-material-purchase-popup",i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Enter the amount of "+e.name+" you would like to purchase per second. This material's cost changes constantly"});let o,s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Purchase amount",type:"number",value:e.buy?e.buy:null,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&o.click()}});o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{innerText:"Confirm",class:"std-button",clickListener:()=>{if(!isNaN(s.value))return e.buy=parseFloat(s.value),isNaN(e.buy)&&(e.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(r),this.rerender(),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid amount")}});const l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{innerText:"Clear Purchase",class:"std-button",clickListener:()=>(e.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(r),this.rerender(),!1)}),c=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(r,{class:"std-button",innerText:"Cancel"}),u=[i,s,o,l,c];if(t.hasResearch("Bulk Purchasing")){const t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Enter the amount of "+e.name+" you would like to bulk purchase. This purchases the specified amount instantly (all at once)."});let i,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p");const s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px",placeholder:"Bulk Purchase amount",type:"number",onkeyup:t=>{t.preventDefault(),function(t){const a=parseFloat(t),r=a*e.bCost,i=_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__.MaterialSizes[e.name];a*i>(n.size-n.sizeUsed)/i?o.innerText="Not enough warehouse space to purchase this amount":isNaN(r)?o.innerText="Invalid put for Bulk Purchase amount":o.innerText=`Purchasing ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"0,0.00")} of `+`${e.name} will cost ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(r)}`}(t.target.value),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&i.click()}});i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Confirm Bulk Purchase",clickListener:()=>{const t=parseFloat(s.value),i=_MaterialSizes__WEBPACK_IMPORTED_MODULE_3__.MaterialSizes[e.name];if(t*i>(n.size-n.sizeUsed)/i)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You do not have enough warehouse size to fit this purchase"),!1;if(!isNaN(t)){const n=t*e.bCost;return a.funds.gt(n)?(a.funds=a.funds.minus(n),e.qty+=t,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(r),!1):(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You cannot afford this purchase."),!1)}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid input amount")}}),u.push(t),u.push(o),u.push(s),u.push(i)}Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(r,u),s.focus()}createSellMaterialPopup(mat){const sellPopupId="cmpy-mgmt-material-sell-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Enter the maximum amount of "+mat.name+" you would like to sell per second, as well as the price at which you would like to sell at.

If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded

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

When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.

When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."}),br=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("br");let confirmBtn;const inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_11__.KEY.ENTER&&confirmBtn.click()}});let inputButtonInitValue=mat.sCost?mat.sCost:null;mat.marketTa2?inputButtonInitValue+=" (Market-TA.II)":mat.marketTa1&&(inputButtonInitValue+=" (Market-TA.I)");const inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"text",marginTop:"4px",value:inputButtonInitValue,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Confirm",clickListener:()=>{let cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");let temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){let qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");let tempQty=qty.replace(/MAX/g,1);tempQty=tempQty.replace(/PROD/g,1);try{tempQty=eval(tempQty)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==tempQty||isNaN(tempQty))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;mat.sllman[0]=!0,mat.sllman[1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric or 'MAX'"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=qty)}return Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(sellPopupId),this.rerender(),!1}});const cancelBtn=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(sellPopupId,{class:"std-button",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(sellPopupId,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}createSellProductPopup(product,city){const popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerHTML:"Enter the maximum amount of "+product.name+" you would like to sell per second, as well as the price at which you would like to sell it at.

If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.

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

When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.

When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."});let confirmBtn;const inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px 0px 5px 0px",placeholder:"Sell amount",type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&confirmBtn.click()}});let inputButtonInitValue=product.sCost?product.sCost:null;product.marketTa2?inputButtonInitValue+=" (Market-TA.II)":product.marketTa1&&(inputButtonInitValue+=" (Market-TA.I)");const inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{margin:"5px 0px 5px 0px",placeholder:"Sell price",type:"text",value:inputButtonInitValue,onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&confirmBtn.click()}}),checkboxDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("div",{border:"1px solid white",display:"inline-block"}),checkboxLabel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("label",{for:popupId+"-checkbox",innerText:"Use same 'Sell Amount' for all cities"}),checkbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{checked:!0,id:popupId+"-checkbox",margin:"2px",type:"checkbox"});checkboxDiv.appendChild(checkboxLabel),checkboxDiv.appendChild(checkbox),confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Confirm",clickListener:()=>{if(inputPx.value.includes("MP")){var price=inputPx.value.replace(/\s+/g,"");price=price.replace(/[^-()\d/*+.MP]/g,"");var temp=price.replace(/MP/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell quantity field."),!1;product.sCost=price}else{var cost=parseFloat(inputPx.value);if(isNaN(cost))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}const cities=Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__.Cities);if(inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(checkbox.checked)for(let e=0;e
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.

The current price of your company's stock is "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p"),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{class:"text-input",type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(r.value);if(isNaN(e)||e<=0)a.innerText="ERROR: Invalid value entered for number of shares to sell";else if(e>this.corp.numShares)a.innerText="You don't have this many shares to sell!";else{const t=this.corp.calculateShareSale(e)[0];a.innerText="Sell "+e+" shares for a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"a-link-button",innerText:"Sell shares",display:"inline-block",clickListener:()=>{var t=Math.round(r.value);if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.corp.numShares)){const a=this.corp.calculateShareSale(t),r=a[0],i=a[1],o=a[2];if(this.corp.numShares-=t,isNaN(this.corp.issuedShares)){console.error(`Corporation issuedShares is NaN: ${this.corp.issuedShares}`);var n=parseInt(this.corp.issuedShares);isNaN(n)?this.corp.issuedShares=0:this.corp.issuedShares=n}return this.corp.issuedShares+=t,this.corp.sharePrice=i,this.corp.shareSalesUntilPriceUpdate=o,this.corp.shareSaleCooldown=_Corporation__WEBPACK_IMPORTED_MODULE_1__.k,_Player__WEBPACK_IMPORTED_MODULE_5__.Player.gainMoney(r),_Player__WEBPACK_IMPORTED_MODULE_5__.Player.recordMoneySource(r,"corporation"),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(e),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)(`Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(t,"0.000a")} shares for `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(r,"$0.000a")}. `+`The corporation's stock price fell to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.formatMoney(this.corp.sharePrice)} `+"as a result of dilution."),this.rerender(),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(e,{class:"std-button",display:"inline-block",innerText:"Cancel"});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(e,[n,a,r,i,o]),r.focus()}createThrowOfficePartyPopup(e){const t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.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_13__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"});let r;const i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(i.value)||i.value<0)a.innerText="Invalid value entered!";else{const t=i.value*e.employees.length;a.innerText="Throwing this party will cost a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(t,"$0.000a")}},onkeyup:e=>{e.preventDefault(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_11__.KEY.ENTER&&r.click()}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:"std-button",innerText:"Throw Party",clickListener:()=>{if(isNaN(i.value)||i.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Invalid value entered");else{var n=i.value*e.employees.length;if(this.corp.funds.lt(n))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to throw this.corp party!");else{var a;this.corp.funds=this.corp.funds.minus(n);for(let t=0;t=o);){let e=Math.pow(1.09,n+s);if(r+e>o)break;r+=e,++s}const l=_Corporation__WEBPACK_IMPORTED_MODULE_1__.g*r,c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("p",{innerText:"Upgrade size: "}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:this.corp.funds.lt(a)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(a,"$0.000a"),clickListener:()=>(this.corp.funds.lt(a)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=_Corporation__WEBPACK_IMPORTED_MODULE_1__.h,this.corp.funds=this.corp.funds.minus(a),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(t),!1)}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:this.corp.funds.lt(i)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(i,"$0.000a"),clickListener:()=>(this.corp.funds.lt(i)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=5*_Corporation__WEBPACK_IMPORTED_MODULE_1__.h,this.corp.funds=this.corp.funds.minus(i),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(t),!1)}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_13__.createElement)("button",{class:this.corp.funds.lt(l)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+s*_Corporation__WEBPACK_IMPORTED_MODULE_1__.h+")",tooltip:_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_8__.numeralWrapper.format(l,"$0.000a"),clickListener:()=>(this.corp.funds.lt(l)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(e.size+=_Corporation__WEBPACK_IMPORTED_MODULE_1__.h*s,this.corp.funds=this.corp.funds.minus(l),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("Office space increased! It can now hold "+e.size+" employees"),this.rerender()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_18__.removeElementById)(t),!1)}),h=Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_16__.createPopupCloseButton)(t,{innerText:"Cancel"});h.style.margin="4px",Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_15__.createPopup)(t,[c,u,m,p,d,h])}purchaseWarehouse(e,t){const n=this.corp;n.funds.lt(_Corporation__WEBPACK_IMPORTED_MODULE_1__.m)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[t]=new _Corporation__WEBPACK_IMPORTED_MODULE_1__.l({corp:n,industry:e,loc:t,size:_Corporation__WEBPACK_IMPORTED_MODULE_1__.n}),n.funds=n.funds.minus(_Corporation__WEBPACK_IMPORTED_MODULE_1__.m),this.rerender())}rerender(){this.corp.rerender()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendLineBreaks=void 0;const a=n(13);t.appendLineBreaks=function(e,t){for(let n=0;n=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),n<1&&console.warn(`Linear factor is ${n}. This is not an intended value for it`),Math.pow(e,t)+e/n}Object.defineProperty(t,"__esModule",{value:!0}),t.EffectWithFactors=t.calculateEffectWithFactors=void 0,t.calculateEffectWithFactors=a;t.EffectWithFactors=class{constructor(e,t){this.expFac=e,this.linearFac=t}calculate(e){return a(e,this.expFac,this.linearFac)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationsRoot=void 0;const o=i(n(0)),s=n(1325),l=n(1039),c=n(1038),u=n(1),m=n(63),p=n(157);t.AugmentationsRoot=class extends o.Component{constructor(e){super(e),this.state={rerender:!1},this.export=this.export.bind(this)}export(){this.props.exportGameFn(),this.setState({rerender:!this.state.rerender})}render(){return o.createElement("div",{id:"augmentations-content"},o.createElement("h1",null,"Purchased Augmentations"),o.createElement("p",null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),o.createElement("p",null,"WARNING: Installing your Augmentations resets most of your progress, including:"),o.createElement("br",null),o.createElement("p",null,"- Stats/Skill levels and Experience"),o.createElement("p",null,"- Money"),o.createElement("p",null,"- Scripts on every computer but your home computer"),o.createElement("p",null,"- Purchased servers"),o.createElement("p",null,"- Hacknet Nodes"),o.createElement("p",null,"- Faction/Company reputation"),o.createElement("p",null,"- Stocks"),o.createElement("br",null),o.createElement("p",null,"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)"),o.createElement(m.StdButton,{onClick:this.props.installAugmentationsFn,text:"Install Augmentations",tooltip:"'I never asked for this'"}),o.createElement(m.StdButton,{addClasses:"flashing-button",onClick:this.export,text:`Backup Save ${p.canGetBonus()?"(+1 favor to all factions)":""}`,tooltip:"It's always a good idea to backup/export your save!"}),o.createElement(c.PurchasedAugmentations,null),o.createElement("h1",null,"Installed Augmentations"),o.createElement("p",null,`List of all Augmentations ${u.Player.sourceFiles.length>0?"and Source Files ":""} `+"that have been installed. You have gained the effects of these."),o.createElement(s.InstalledAugmentationsAndSourceFiles,null),o.createElement("br",null)," ",o.createElement("br",null),o.createElement(l.PlayerMultipliers,null))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),r=n(175);!function(){function e(e){if(!(e.target&&e.target instanceof Element))return;"none"===window.getComputedStyle(e.target).display&&e.isTrusted&&a.Player.giveExploit(r.Exploit.Unclickable)}document.addEventListener("DOMContentLoaded",function t(){const n=document.getElementById("unclickable");null!=n?(n.addEventListener("click",e),document.removeEventListener("DOMContentLoaded",t)):console.error("Could not find the unclickable elem for the related exploit.")})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(1),r=n(175);setInterval(function(){"5.5e+1"!==55..toExponential()&&a.Player.giveExploit(r.Exploit.PrototypeTampering)},9e5)},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordionContentPaginated=t.ServerAccordionContent=void 0;const o=i(n(0)),s=n(565),l=n(564),c=20;function u(e){const[t,n]=o.useState(0),a=[],r=Math.ceil(e.workerScripts.length/c),i=Math.min((t+1)*c,e.workerScripts.length);for(let n=t*c;n(t+=e,u(t=Math.round(t))))}return m!==t&&n(m),o.default.createElement(o.default.Fragment,null,o.default.createElement("ul",null,a),o.default.createElement(l.AccordionButton,{onClick:()=>p(-1e99),text:"<<"}),o.default.createElement(l.AccordionButton,{onClick:()=>p(-1),text:"<"}),o.default.createElement("span",{className:"text"},t+1," / ",r),o.default.createElement(l.AccordionButton,{onClick:()=>p(1),text:">"}),o.default.createElement(l.AccordionButton,{onClick:()=>p(1e99),text:">>"}))}t.ServerAccordionContent=function(e){if(e.workerScripts.length>c)return o.default.createElement(u,{workerScripts:e.workerScripts});const t=e.workerScripts.map(e=>o.default.createElement(s.WorkerScriptAccordion,{key:`${e.name}_${e.args}`,workerScript:e}));return o.default.createElement("ul",null,t)},t.ServerAccordionContentPaginated=u},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordion=void 0;const o=i(n(0)),s=n(565),l=n(167),c=n(942),u=n(171);t.ServerAccordion=function(e){const t=e.server,n=`${t.hostname}${" ".repeat(18)}`.slice(0,Math.max(t.hostname.length,18)),a={progress:t.ramUsed/t.maxRam,totalTicks:30},r=`${n} ${u.createProgressBarText(a)}`;return e.workerScripts.map(e=>o.createElement(s.WorkerScriptAccordion,{key:`${e.name}_${e.args}`,workerScript:e})),o.createElement(l.Accordion,{headerContent:o.createElement("pre",null,r),panelContent:o.createElement(c.ServerAccordionContent,{workerScripts:e.workerScripts})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerAccordions=void 0;const o=i(n(0)),s=n(943),l=n(154),c=n(24),u="ActiveScriptsUI";t.ServerAccordions=class extends o.Component{constructor(e){super(e),this.serverToScriptMap={},this.state={rerenderFlag:!1},this.updateServerToScriptsMap(),this.rerender=this.rerender.bind(this)}componentDidMount(){l.WorkerScriptStartStopEventEmitter.addSubscriber({cb:this.rerender,id:u})}componentWillUnmount(){l.WorkerScriptStartStopEventEmitter.removeSubscriber(u)}updateServerToScriptsMap(){const e={};for(const t of this.props.workerScripts.values()){const n=c.getServer(t.serverIp);null!=n?(null==e[n.hostname]&&(e[n.hostname]={server:n,workerScripts:[]}),e[n.hostname].workerScripts.push(t)):console.warn(`WorkerScript has invalid IP address: ${t.serverIp}`)}this.serverToScriptMap=e}rerender(){this.updateServerToScriptsMap(),this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=Object.keys(this.serverToScriptMap).map(e=>{const t=this.serverToScriptMap[e];return o.createElement(s.ServerAccordion,{key:e,server:t.server,workerScripts:t.workerScripts})});return o.createElement("ul",{className:"active-scripts-list",id:"active-scripts-list"},e)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptProduction=void 0;const o=i(n(0)),s=n(31);t.ScriptProduction=function(e){const t=e.p.scriptProdSinceLastAug/(e.p.playtimeSinceLastAug/1e3);let n=0;for(const t of e.workerScripts.values())n+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return o.createElement("p",{id:"active-scripts-total-prod"},"Total online production of Active scripts: ",o.createElement("span",{className:"money-gold"},o.createElement("span",{id:"active-scripts-total-production-active"},s.Money(n))," / sec"),o.createElement("br",null),"Total online production since last Aug installation: ",o.createElement("span",{id:"active-scripts-total-prod-aug-total",className:"money-gold"},s.Money(e.p.scriptProdSinceLastAug))," (",o.createElement("span",{className:"money-gold"},o.createElement("span",{id:"active-scripts-total-prod-aug-avg",className:"money-gold"},s.Money(t))," / sec"),")")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resleeve=void 0;const a=n(708),r=n(14),i=n(27);class o extends a.Person{constructor(){super()}getCost(){const e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp;let t=0;for(let e=0;e=0;--e)t.augmentations[e].name!==o.AugmentationNames.NeuroFluxGovernor?t.augmentations.splice(e,1):r.Augmentations[o.AugmentationNames.NeuroFluxGovernor].owned=!0;for(let n=0;n=0;--e){const n=t.queuedAugmentations[e].name;t.augmentations.filter(e=>e.name!==o.AugmentationNames.NeuroFluxGovernor&&e.name===n).length>=1&&t.queuedAugmentations.splice(e,1)}return t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles(),!0},t.generateResleeves=function(){const e=[];for(let t=0;t<40;++t){const n=new a.Resleeve,i=5*t+1;n.hacking_exp=i*s.getRandomInt(1e3,5e3),n.strength_exp=i*s.getRandomInt(1e3,5e3),n.defense_exp=i*s.getRandomInt(1e3,5e3),n.dexterity_exp=i*s.getRandomInt(1e3,5e3),n.agility_exp=i*s.getRandomInt(1e3,5e3),n.charisma_exp=i*s.getRandomInt(1e3,5e3);const l=Math.max(2,Math.ceil((t+3)/2)),c=s.getRandomInt(l,l+2),u=Object.keys(r.Augmentations);for(let e=0;eo.createElement("tr",{key:t},e.map((e,t)=>{let n={};return 0!==t&&(n={textAlign:"right"}),o.createElement("td",{style:n,key:t},e)}))))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveFaq=void 0;const o=i(n(0));t.SleeveFaq=o.createElement(o.Fragment,null,o.createElement("strong",null,o.createElement("u",null,"How do Duplicate Sleeves work?")),o.createElement("br",null),"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation.",o.createElement("br",null),o.createElement("br",null),"Sleeves are their own individuals, which means they each have their own experience and stats.",o.createElement("br",null),o.createElement("br",null),"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Synchronization (Sync)?")),o.createElement("br",null),"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task.",o.createElement("br",null),o.createElement("br",null),"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.",o.createElement("br",null),o.createElement("br",null),"Synchronization can be increased by assigning sleeves to the 'Synchronize' task.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Shock?")),o.createElement("br",null),"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve.",o.createElement("br",null),o.createElement("br",null),"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why can't I work for this company or faction?")),o.createElement("br",null),"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why did my Sleeve stop working?")),o.createElement("br",null),"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"How do I buy Augmentations for my Sleeves?")),o.createElement("br",null),"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Why can't I buy the X Augmentation for my sleeve?")),o.createElement("br",null),"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"Do sleeves get reset when installing Augmentations or switching BitNodes?")),o.createElement("br",null),"Sleeves are reset when switching BitNodes, but not when installing Augmentations.",o.createElement("br",null),o.createElement("br",null),o.createElement("strong",null,o.createElement("u",null,"What is Memory?")),o.createElement("br",null),"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1.",o.createElement("br",null),o.createElement("br",null),"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSleevePurchaseAugsPopup=void 0;const a=n(546),r=n(14),i=n(31),o=n(12),s=n(13),l=n(57),c=n(69),u=n(49),m=n(415);t.createSleevePurchaseAugsPopup=function e(t,n){const p=t.augmentations.map(e=>e.name),d=a.findSleevePurchasableAugs(t,n),h="purchase-sleeve-augs-popup",_=[c.createPopupCloseButton(h,{innerText:"Cancel"}),s.createElement("p",{display:"block",innerHTML:"Owned Augmentations:"})],g=s.createElement("div",{width:"70%"});for(const e of p){const t=r.Augmentations[e];if(null==t){console.warn(`Invalid Augmentation: ${e}`);continue}let n=t.info;"string"!=typeof n&&(n=m.renderToStaticMarkup(n)),n+="

",n+=m.renderToStaticMarkup(t.stats),g.appendChild(s.createElement("div",{class:"gang-owned-upgrade",innerText:e,tooltip:n}))}_.push(g);const f=s.createElement("p",{innerHTML:["You can purchase Augmentations for your Duplicate Sleeves. These Augmentations","have the same effect as they would for you. You can only purchase Augmentations","that you have unlocked through Factions.

","When purchasing an Augmentation for a Duplicate Sleeve, they are immediately","installed. This means that the Duplicate Sleeve will immediately lose all of","its stat experience."].join(" ")});_.push(f);for(const a of d){const r=s.createElement("div",{class:"cmpy-mgmt-upgrade-div"});let l=a.info;"string"!=typeof l&&(l=m.renderToStaticMarkup(l)),l+="

",l+=m.renderToStaticMarkup(a.stats),r.appendChild(s.createElement("p",{fontSize:"12px",innerHTML:[`

${a.name}


`,`Cost: ${m.renderToStaticMarkup(i.Money(a.startingCost))}

`,`${l}`].join(" "),padding:"2px",clickListener:()=>{t.tryBuyAugmentation(n,a)?(o.dialogBoxCreate(`Installed ${a.name} on Duplicate Sleeve!`,!1),u.removeElementById(h),e(t,n)):o.dialogBoxCreate(`You cannot afford ${a.name}`,!1)}})),_.push(r)}l.createPopup(h,_)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Milestones=void 0;const a=n(16),r=n(24);function i(e,t){const n=t.augmentations.slice().filter(e=>"NeuroFlux Governor"!==e);for(const t of n)if(!e.augmentations.some(e=>e.name==t))return!1;return!0}t.Milestones=[{title:"Gain root access on CSEC",fulfilled:()=>{const e=r.GetServerByHostname("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=r.GetServerByHostname("CSEC");return!(!e||!e.hasOwnProperty("backdoorInstalled"))&&e.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:e=>e.factions.includes("CyberSec")},{title:"Install all the Augmentations from CyberSec",fulfilled:e=>i(e,a.Factions.CyberSec)},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:e=>e.factions.includes("NiteSec")},{title:"Install all the Augmentations from NiteSec",fulfilled:e=>i(e,a.Factions.NiteSec)},{title:"Join the faction hinted at in j3.msg",fulfilled:e=>e.factions.includes("The Black Hand")},{title:"Install all the Augmentations from The Black Hand",fulfilled:e=>i(e,a.Factions["The Black Hand"])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:e=>e.factions.includes("BitRunners")},{title:"Install all the Augmentations from BitRunners",fulfilled:e=>i(e,a.Factions.BitRunners)},{title:"Complete fl1ght.exe",fulfilled:e=>e.factions.includes("Daedalus")},{title:"Install the special Augmentation from Daedalus",fulfilled:e=>e.augmentations.some(e=>"The Red Pill"==e.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=n(954),s=i(n(0));t.Root=function(e){const t=function(e,t){let n=-1;for(let a=0;a{if(a<=t+1)return s.createElement("ul",{key:a},s.createElement("p",null,"[",n.fulfilled(e.player)?"x":" ","] ",n.title))});return s.createElement(s.Fragment,null,s.createElement("h1",null,"Milestones"),s.createElement("p",null,"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations."),s.createElement("br",null),s.createElement("h2",null,"Completing fl1ght.exe"),s.createElement("li",null,n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.libSource=void 0,t.libSource="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationPrereq(name: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsPopup=void 0;const o=i(n(0)),s=n(63),l=n(79);t.OptionsPopup=function(e){const[t,n]=o.useState(e.options.theme),[a,r]=o.useState(e.options.insertSpaces);return o.default.createElement("div",{className:"editor-options-container noselect"},o.default.createElement("div",{className:"editor-options-line"},o.default.createElement("p",null,"Theme: "),o.default.createElement("select",{className:"dropdown",onChange:e=>n(e.target.value),defaultValue:t},o.default.createElement("option",{value:"vs-dark"},"vs-dark"),o.default.createElement("option",{value:"light"},"light"))),o.default.createElement("div",{className:"editor-options-line"},o.default.createElement("p",null,"Use whitespace over tabs: "),o.default.createElement("input",{type:"checkbox",onChange:e=>r(e.target.checked),checked:a})),o.default.createElement("br",null),o.default.createElement(s.StdButton,{style:{width:"50px"},text:"Save",onClick:function(){e.save({theme:t,insertSpaces:a}),l.removePopup(e.id)}}))}},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CorruptableText=void 0;const o=i(n(0));t.CorruptableText=function(e){const[t,n]=o.useState(e.content);return o.useEffect(()=>{let e=5;const a=setInterval(()=>{if(--e>0)return;e=5*Math.random();const a=Math.random()*t.length,r=t.charAt(a);n(function(e,t,n){return e.substring(0,t)+n+e.substring(t+1)}(t,a,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],n=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const a of n)if(a.includes(e))return t(a);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{n(t)},50)},100);return()=>{clearInterval(a)}},[]),o.default.createElement("span",null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SlotMachine=void 0;const o=i(n(0)),s=n(63),l=n(31),c=n(298),u=n(405),m=n(485),p=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function d(e,t){switch(e){case"$":return[20,200,1e3][t];case"@":return[8,80,400][t];case"♥":case"?":return[6,20,150][t];case"D":case"E":return[1,8,30][t];default:return[1,5,20][t]}}const h=[[[0,0],[0,1],[0,2],[0,3],[0,4]],[[1,0],[1,1],[1,2],[1,3],[1,4]],[[2,0],[2,1],[2,2],[2,3],[2,4]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[0,0],[1,1],[1,2],[1,3],[0,4]],[[2,0],[1,1],[1,2],[1,3],[2,4]],[[1,0],[0,1],[0,2],[0,3],[1,4]],[[1,0],[2,1],[2,2],[2,3],[1,4]]],_=0,g=1e6;t.SlotMachine=class extends u.Game{constructor(e){super(e),this.interval=-1,this.rng=new c.WHRNG(this.props.p.totalPlaytime),this.state={index:[0,0,0,0,0],investment:1e3,locks:[0,0,0,0,0],canPlay:!0,status:"waiting"},this.play=this.play.bind(this),this.lock=this.lock.bind(this),this.unlock=this.unlock.bind(this),this.step=this.step.bind(this),this.checkWinnings=this.checkWinnings.bind(this),this.getTable=this.getTable.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){let e=!1;const t=this.state.index.slice();for(const n in t)(t[n]!==this.state.locks[n]||e)&&(t[n]=(t[n]+1)%p.length,e=!0);this.setState({index:t}),e&&t.every((e,t)=>e===this.state.locks[t])&&this.checkWinnings()}componentWillUnmount(){clearInterval(this.interval)}getTable(){return[[p[(this.state.index[0]+p.length-1)%p.length],p[(this.state.index[1]+p.length-1)%p.length],p[(this.state.index[2]+p.length-1)%p.length],p[(this.state.index[3]+p.length-1)%p.length],p[(this.state.index[4]+p.length-1)%p.length]],[p[this.state.index[0]],p[this.state.index[1]],p[this.state.index[2]],p[this.state.index[3]],p[this.state.index[4]]],[p[(this.state.index[0]+1)%p.length],p[(this.state.index[1]+1)%p.length],p[(this.state.index[2]+1)%p.length],p[(this.state.index[3]+1)%p.length],p[(this.state.index[4]+1)%p.length]]]}play(){this.reachedLimit(this.props.p)||(this.setState({status:"playing"}),this.win(this.props.p,-this.state.investment),this.state.canPlay&&(this.unlock(),setTimeout(this.lock,2e3*this.rng.random()+1e3)))}lock(){this.setState({locks:[Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length),Math.floor(this.rng.random()*p.length)]})}checkWinnings(){const e=this.getTable(),t=function(t){const n=[];for(const a of t)n.push(e[a[0]][a[1]]);return n},n=function(e){let t=1;for(let n=1;n0?"gained":"lost"," ",l.Money(Math.abs(a))),canPlay:!0}),this.reachedLimit(this.props.p)}unlock(){this.setState({locks:[-1,-1,-1,-1,-1],canPlay:!1})}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=_),t>g&&(t=g),t<_&&(t=_),this.setState({investment:t})}render(){const e=this.getTable();return o.createElement(o.Fragment,null,o.createElement("pre",null,"+———————————————————————+",o.createElement("br",null),"| | ",e[0][0]," | ",e[0][1]," | ",e[0][2]," | ",e[0][3]," | ",e[0][4]," | |",o.createElement("br",null),"| | | | | | | |",o.createElement("br",null),"| | ",p[this.state.index[0]]," | ",p[this.state.index[1]]," | ",p[this.state.index[2]]," | ",p[this.state.index[3]]," | ",p[this.state.index[4]]," | |",o.createElement("br",null),"| | | | | | | |",o.createElement("br",null),"| | ",p[(this.state.index[0]+1)%p.length]," | ",p[(this.state.index[1]+1)%p.length]," | ",p[(this.state.index[2]+1)%p.length]," | ",p[(this.state.index[3]+1)%p.length]," | ",p[(this.state.index[4]+1)%p.length]," | |",o.createElement("br",null),"+———————————————————————+",o.createElement("br",null)),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),o.createElement(s.StdButton,{onClick:m.trusted(this.play),text:"Spin!",disabled:!this.state.canPlay}),o.createElement("h1",null,this.state.status),o.createElement("h2",null,"Pay lines"),o.createElement("pre",null,"----- ····· ····· ",o.createElement("br",null),"····· ----- ····· ",o.createElement("br",null),"····· ····· ----- ",o.createElement("br",null)),o.createElement("br",null),o.createElement("pre",null,"··^·· \\···/ \\···/",o.createElement("br",null),"·/·\\· ·\\·/· ·---·",o.createElement("br",null),"/···\\ ··v·· ·····",o.createElement("br",null)),o.createElement("br",null),o.createElement("pre",null,"····· ·---· ·····",o.createElement("br",null),"·---· /···\\ \\···/",o.createElement("br",null),"/···\\ ····· ·---·",o.createElement("br",null)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Roulette=void 0;const o=i(n(0)),s=n(63),l=n(31),c=n(405),u=n(298),m=n(485),p=0,d=1e7;const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],_={Red:{match:e=>0!==e&&h.includes(e),payout:1},Black:{match:e=>!h.includes(e),payout:1},Odd:{match:e=>0!==e&&e%2==1,payout:1},Even:{match:e=>0!==e&&e%2==0,payout:1},High:{match:e=>0!==e&&e>18,payout:1},Low:{match:e=>0!==e&&e<19,payout:1},Third1:{match:e=>0!==e&&e<=12,payout:2},Third2:{match:e=>0!==e&&(e>=13&&e<=24),payout:2},Third3:{match:e=>0!==e&&e>=25,payout:2}};function g(e){return{match:t=>e===t,payout:36}}t.Roulette=class extends c.Game{constructor(e){super(e),this.interval=-1,this.rng=new u.WHRNG((new Date).getTime()),this.state={investment:1e3,canPlay:!0,status:"waiting",n:0,lock:!0,strategy:{payout:0,match:()=>!1}},this.step=this.step.bind(this),this.currentNumber=this.currentNumber.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){this.state.lock||this.setState({n:Math.floor(37*Math.random())})}componentWillUnmount(){clearInterval(this.interval)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=p),t>d&&(t=d),t{let e=Math.floor(37*this.rng.random()),t=o.createElement(o.Fragment,null),n=0,a=this.state.strategy.match(e);if(a&&Math.random()>.9)for(a=!1;this.state.strategy.match(e);)e++;a?(n=this.state.investment*this.state.strategy.payout,t=o.createElement(o.Fragment,null,"won ",l.Money(n))):(n=-this.state.investment,t=o.createElement(o.Fragment,null,"lost ",l.Money(-n))),this.win(this.props.p,n),this.setState({canPlay:!0,lock:!0,status:t,n:e}),this.reachedLimit(this.props.p)},1600))}render(){return o.createElement(o.Fragment,null,o.createElement("h1",null,this.currentNumber()),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),o.createElement("h1",null,this.state.status),o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"3",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(3)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"6",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(6)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"9",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(9)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"12",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(12)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"15",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(15)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"18",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(18)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"21",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(21)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"24",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(24)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"27",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(27)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"30",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(30)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"33",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(33)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"36",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(36)))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"2",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(2)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"5",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(5)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"8",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(8)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"11",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(11)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"14",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(14)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"17",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(17)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"20",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(20)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"23",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(23)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"26",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(26)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"29",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(29)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"32",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(32)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"35",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(35)))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"1",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(1)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"4",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(4)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"7",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(7)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"10",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(10)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"13",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(13)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"16",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(16)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"19",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(19)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"22",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(22)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"25",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(25)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"28",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(28)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"31",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(31)))})),o.createElement("td",null,o.createElement(s.StdButton,{text:"34",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(34)))}))),o.createElement("tr",null,o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"1 to 12",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Third1))})),o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"13 to 24",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Third2))})),o.createElement("td",{colSpan:4},o.createElement(s.StdButton,{text:"25 to 36",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Third3))}))),o.createElement("tr",null,o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Red",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Red))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Black",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Black))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Odd",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Odd))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Even",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Even))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"High",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.High))})),o.createElement("td",{colSpan:2},o.createElement(s.StdButton,{text:"Low",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(_.Low))}))),o.createElement("tr",null,o.createElement("td",null,o.createElement(s.StdButton,{text:"0",disabled:!this.state.canPlay,onClick:m.trusted(()=>this.play(g(0)))}))))))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinFlip=void 0;const o=i(n(0)),s=n(63),l=n(298),c=n(405),u=n(485),m=0,p=1e4;t.CoinFlip=class extends c.Game{constructor(e){super(e),this.state={investment:1e3,result:o.createElement("span",null," "),status:"",playLock:!1},this.play=this.play.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=m),t>p&&(t=p),tthis.setState({playLock:!1}),250),n?this.win(this.props.p,this.state.investment):this.win(this.props.p,-this.state.investment),this.reachedLimit(this.props.p)}render(){return o.createElement(o.Fragment,null,o.createElement("pre",null,"+———————+",o.createElement("br",null),"| | | |",o.createElement("br",null),"| | ",this.state.result," | |",o.createElement("br",null),"| | | |",o.createElement("br",null),"+———————+",o.createElement("br",null)),o.createElement("span",{className:"text"},"Play for: "),o.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,value:this.state.investment}),o.createElement("br",null),o.createElement(s.StdButton,{onClick:u.trusted(()=>this.play("H")),text:"Head!",disabled:this.state.playLock}),o.createElement(s.StdButton,{onClick:u.trusted(()=>this.play("T")),text:"Tail!",disabled:this.state.playLock}),o.createElement("h1",null,this.state.status))}}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiPaper=void 0;const r=a(n(0)),i=n(404),o=i.makeStyles({root:{backgroundColor:"rgb(30, 30, 30)",border:"2px solid #000",borderRadius:"10px",display:"inline-block",flexWrap:"wrap",padding:"10px"}});t.MuiPaper=(e=>r.default.createElement(i.Paper,Object.assign({},e,{classes:Object.assign(Object.assign({},o()),e.classes)})))},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiButton=void 0;const r=a(n(0)),i=n(404),o=i.makeStyles({root:{backgroundColor:"#555",border:"1px solid #333",color:"white",margin:"5px",padding:"3px 5px","&:hover":{backgroundColor:"#666"}},textPrimary:{color:"rgb( 144, 202, 249)"},textSecondary:{color:"rgb(244, 143, 177)"},disabled:{backgroundColor:"#333",color:"#fff",cursor:"default"}});t.MuiButton=(e=>r.default.createElement(i.Button,Object.assign({},e,{classes:Object.assign(Object.assign({},o()),e.classes)})))},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MuiTextField=void 0;const r=a(n(0)),i=n(404),o={backgroundColor:"rgba(57, 54, 54, 0.9)","&:hover":{backgroundColor:"rgba(70, 70, 70, 0.9)"}},s=Object.assign({border:"1px solid #e2e2e1",overflow:"hidden",borderRadius:4,color:"white"},o),l=i.makeStyles({root:Object.assign({},s)}),c=i.makeStyles({root:Object.assign(Object.assign({},o),{color:"white"}),focused:{backgroundColor:"rgba(70, 70, 70, 0.9)"},disabled:{color:"white"}}),u=i.makeStyles({root:{color:"white"},focused:{color:"white !important"},disabled:{color:"white !important"}});t.MuiTextField=(e=>{var t,n;return r.default.createElement(i.TextField,Object.assign({},e,{classes:Object.assign(Object.assign({},l()),e.classes),InputProps:Object.assign({classes:Object.assign(Object.assign({},c()),null===(t=e.InputProps)||void 0===t?void 0:t.classes)},e.InputProps),InputLabelProps:Object.assign({classes:Object.assign(Object.assign({},u()),null===(n=e.InputLabelProps)||void 0===n?void 0:n.classes)},e.InputLabelProps)}))})},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCard=void 0;const r=a(n(0)),i=n(656);t.ReactCard=(({card:e,hidden:t})=>{let n;switch(e.suit){case i.Suit.Clubs:n=r.default.createElement("span",null,"♣");break;case i.Suit.Diamonds:n=r.default.createElement("span",null,"♦");break;case i.Suit.Hearts:n=r.default.createElement("span",null,"♥");break;case i.Suit.Spades:n=r.default.createElement("span",null,"♠");break;default:throw new Error(`MissingCaseException: ${e.suit}`)}return r.default.createElement("div",{className:`casino-card ${e.isRedSuit()?"red":"black"}`},r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:"value"},t?" - ":e.formatValue()),r.default.createElement("div",{className:"suit"},t?" - ":n)))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hand=void 0;class a{constructor(e){this.cards=e}addCards(...e){return new a([...this.cards,...e])}removeByIndex(e){if(e>=this.cards.length)throw new Error(`Tried to remove invalid card from Hand by index: ${e}`);return new a([...this.cards.slice().splice(e,1)])}}t.Hand=a},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deck=void 0;const a=n(656),r=n(971);t.Deck=class{constructor(e=1){this.numDecks=e,this.cards=[],this.reset()}shuffle(){this.cards=r.shuffle(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let e=1;e<=13;++e)for(let t=0;t{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),this.startGame=(()=>{if(!this.canStartGame())return;this.props.p.loseMoney(this.state.bet);const e=new u.Hand([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new u.Hand([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result:f.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(f.Tie):this.finishGame(f.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(f.DealerWon)}),this.getHandValue=(e=>{let t=[0];for(let n=0;n=10?t.map(e=>e+10):1===a?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+a)}return t}),this.getTrueHandValue=(e=>{const t=this.getHandValue(e),n=t.filter(e=>e<=21);return n.length>0?(n.sort((e,t)=>e-t),n[n.length-1]):t[0]}),this.getHandDisplayValues=(e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),this.isHandBusted=(e=>this.getTrueHandValue(e)>21),this.playerHit=(e=>{if(!e.isTrusted)return;const t=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:t}),this.isHandBusted(t)&&this.finishGame(f.DealerWon)}),this.playerStay=(e=>{if(!e.isTrusted)return;let t=this.state.dealerHand;for(;this.getTrueHandValue(t)<=16;)t=t.addCards(this.deck.safeDrawCard());if(this.setState({dealerHand:t}),this.isHandBusted(t))this.finishGame(f.PlayerWon);else{const e=this.getTrueHandValue(t),n=this.getTrueHandValue(this.state.playerHand);if(e>21||n>21)throw new Error("Someone busted when not expected to");n>e?this.finishGame(f.PlayerWon):n{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===f.DealerWon?t=-1*this.state.bet:e===f.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),this.isPlayerWinResult=(e=>e===f.PlayerWon||e===f.PlayerWonByBlackjack),this.wagerOnChange=(e=>{const{p:t}=this.props,n=e.target.value,a=Math.round(parseFloat(n));isNaN(a)?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):a<=0?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):a>g?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):t.canAfford(a)?this.setState({bet:a,betInput:n,wagerInvalid:!1,wagerInvalidHelperText:"",result:f.Pending}):this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),this.startOnClick=(e=>{e.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new c.Deck(5),this.state={playerHand:new u.Hand([]),dealerHand:new u.Hand([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:f.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:n,gameInProgress:a,result:r,wagerInvalid:i,wagerInvalidHelperText:l,gains:c}=this.state,u=this.getHandDisplayValues(t),y=this.getHandDisplayValues(n);return o.createElement("div",null,o.createElement("div",null,o.createElement(d.MuiTextField,{value:e,label:o.createElement(o.Fragment,null,"Wager (Max: ",s.Money(g),")"),disabled:a,onChange:this.wagerOnChange,error:i,helperText:i?l:"",type:"number",variant:"filled",style:{width:"200px"},InputProps:{startAdornment:o.createElement(m.InputAdornment,{position:"start"},"$")}}),o.createElement("p",null,"Total earnings this session: ",s.Money(c))),a?o.createElement("div",null,o.createElement(h.MuiButton,{color:"primary",onClick:this.playerHit},"Hit"),o.createElement(h.MuiButton,{color:"secondary",onClick:this.playerStay},"Stay")):o.createElement("div",null,o.createElement(h.MuiButton,{color:"primary",onClick:this.startOnClick,disabled:i||!this.canStartGame()},"Start")),(a||r!==f.Pending)&&o.createElement("div",null,o.createElement(_.MuiPaper,{variant:"outlined",elevation:2},o.createElement("pre",null,"Player"),t.cards.map((e,t)=>o.createElement(p.ReactCard,{card:e,key:t})),o.createElement("pre",null,"Value(s): "),u.map((e,t)=>o.createElement("pre",{key:t},e))),o.createElement("br",null),o.createElement(_.MuiPaper,{variant:"outlined",elevation:2},o.createElement("pre",null,"Dealer"),n.cards.map((e,t)=>o.createElement(p.ReactCard,{card:e,hidden:a&&0!==t,key:t})),!a&&o.createElement(o.Fragment,null,o.createElement("pre",null,"Value(s): "),y.map((e,t)=>o.createElement("pre",{key:t},e))))),r!==f.Pending&&o.createElement("p",null,r,this.isPlayerWinResult(r)&&o.createElement(o.Fragment,null," You gained ",s.Money(this.state.bet)),r===f.DealerWon&&o.createElement(o.Fragment,null," You lost ",s.Money(this.state.bet))))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CasinoLocation=void 0;const o=i(n(0)),s=n(973),l=n(964),c=n(963),u=n(962),m=n(63);var p;!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(p||(p={}));t.CasinoLocation=class extends o.Component{constructor(e){super(e),this.state={game:p.None},this.updateGame=this.updateGame.bind(this)}updateGame(e){this.setState({game:e})}renderGames(){return o.createElement(o.Fragment,null,o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Coin),text:"Play coin flip"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Slots),text:"Play slots"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Roulette),text:"Play roulette"}),o.createElement("br",null),o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.Blackjack),text:"Play blackjack"}))}renderGame(){let e=null;switch(this.state.game){case p.Coin:e=o.createElement(l.CoinFlip,{p:this.props.p});break;case p.Slots:e=o.createElement(u.SlotMachine,{p:this.props.p});break;case p.Roulette:e=o.createElement(c.Roulette,{p:this.props.p});break;case p.Blackjack:e=o.createElement(s.Blackjack,{p:this.props.p});break;case p.None:break;default:throw new Error(`MissingCaseException: ${this.state.game}`)}return o.createElement(o.Fragment,null,o.createElement(m.StdButton,{onClick:()=>this.updateGame(p.None),text:"Stop playing"}),e)}render(){return this.state.game===p.None?this.renderGames():this.renderGame()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UniversityLocation=void 0;const o=i(n(0)),s=n(11),l=n(24),c=n(45),u=n(63),m=n(31);t.UniversityLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.take=this.take.bind(this),this.study=this.study.bind(this),this.dataStructures=this.dataStructures.bind(this),this.networks=this.networks.bind(this),this.algorithms=this.algorithms.bind(this),this.management=this.management.bind(this),this.leadership=this.leadership.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=c.SpecialServerIps.getIp(this.props.loc.name),t=l.getServer(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const n=t.backdoorInstalled?.9:1;return this.props.loc.costMult*n}take(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}study(){this.take(s.CONSTANTS.ClassStudyComputerScience)}dataStructures(){this.take(s.CONSTANTS.ClassDataStructures)}networks(){this.take(s.CONSTANTS.ClassNetworks)}algorithms(){this.take(s.CONSTANTS.ClassAlgorithms)}management(){this.take(s.CONSTANTS.ClassManagement)}leadership(){this.take(s.CONSTANTS.ClassLeadership)}render(){const e=this.calculateCost(),t=s.CONSTANTS.ClassDataStructuresBaseCost*e,n=s.CONSTANTS.ClassNetworksBaseCost*e,a=s.CONSTANTS.ClassAlgorithmsBaseCost*e,r=s.CONSTANTS.ClassManagementBaseCost*e,i=s.CONSTANTS.ClassLeadershipBaseCost*e;return o.createElement("div",null,o.createElement(u.StdButton,{onClick:this.study,style:this.btnStyle,text:"Study Computer Science (free)",tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.dataStructures,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Data Structures course (",m.Money(t)," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.networks,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Networks course (",m.Money(n)," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.algorithms,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Algorithms course (",m.Money(a)," / sec)"),tooltip:"Gain hacking experience!"}),o.createElement(u.StdButton,{onClick:this.management,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Management course (",m.Money(r)," / sec)"),tooltip:"Gain charisma experience!"}),o.createElement(u.StdButton,{onClick:this.leadership,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Take Leadership course (",m.Money(i)," / sec)"),tooltip:"Gain charisma experience!"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TravelAgencyLocation=void 0;const o=i(n(0)),s=n(38),l=n(488),c=n(11),u=n(26),m=n(63),p=n(31);t.TravelAgencyLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"}}asciiWorldMap(){const e=e=>e.city!==this.props.p.city?o.createElement("span",{className:"tooltip",style:{color:"blue",whiteSpace:"nowrap",margin:"0px",padding:"0px"},onClick:l.createTravelPopup.bind(null,e.city,this.props.travel)},o.createElement("span",{className:"tooltiptext"},e.city),e.city[0]):o.createElement("span",null,e.city[0]);return o.createElement("div",{className:"noselect"},o.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",p.Money(c.CONSTANTS.TravelCost),"."),o.createElement("pre",null," ,_ . ._. _. ."),o.createElement("pre",null," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),o.createElement("pre",null," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),o.createElement("pre",null," / ,/'-/~ '\\ ,' _ , '",o.createElement(e,{city:"Volhaven"}),",'|~ ._/-, /~"),o.createElement("pre",null," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),o.createElement("pre",null,".-~ '| '',\\~|\\ _\\~ ,_ , ",o.createElement(e,{city:"Chongqing"})," /,"),o.createElement("pre",null," '\\ ",o.createElement(e,{city:"Sector-12"})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),o.createElement("pre",null," | / ._-~'\\_ _~| \\ ) ",o.createElement(e,{city:"New Tokyo"})),o.createElement("pre",null," \\ __-\\ '/ ~ |\\ \\_ / ~"),o.createElement("pre",null," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),o.createElement("pre",null," ~-_' _; '\\ '-, \\,' /\\/ |"),o.createElement("pre",null," '\\_,~'\\_ \\_ _, /' ' |, /|'"),o.createElement("pre",null," / \\_ ~ | / \\ ~'; -,_."),o.createElement("pre",null," | ~\\ | | , '-_, ,; ~ ~\\"),o.createElement("pre",null," \\, ",o.createElement(e,{city:"Aevum"})," / \\ / /| ,-, , -,"),o.createElement("pre",null," | ,/ | |' |/ ,- ~ \\ '."),o.createElement("pre",null," ,| ,/ \\ ,/ \\ ",o.createElement(e,{city:"Ishima"})," |"),o.createElement("pre",null," / | ~ -~~-, / _"),o.createElement("pre",null," | ,-' ~ /"),o.createElement("pre",null," / ,' ~"),o.createElement("pre",null," ',| ~"),o.createElement("pre",null," ~'"))}listWorldMap(){const e=[];for(const t in s.CityName){const n=s.CityName[t];n!==this.props.p.city&&e.push(o.createElement(m.StdButton,{key:n,onClick:l.createTravelPopup.bind(null,n,this.props.travel),style:this.btnStyle,text:`Travel to ${n}`}))}return o.createElement("div",null,o.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",p.Money(c.CONSTANTS.TravelCost),"."),e)}render(){return u.Settings.DisableASCIIArt?this.listWorldMap():this.asciiWorldMap()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TechVendorLocation=void 0;const o=i(n(0)),s=n(488),l=n(11),c=n(144),u=n(672),m=n(63),p=n(31);t.TechVendorLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.state={torPurchased:e.p.hasTorRouter()},this.createUpgradeHomeCoresPopup=this.createUpgradeHomeCoresPopup.bind(this),this.createUpgradeHomeRamPopup=this.createUpgradeHomeRamPopup.bind(this),this.purchaseTorRouter=this.purchaseTorRouter.bind(this)}createUpgradeHomeCoresPopup(){s.createUpgradeHomeCoresPopup(this.props.p)}createUpgradeHomeRamPopup(){s.createUpgradeHomeRamPopup(this.props.p)}purchaseTorRouter(){s.purchaseTorRouter(this.props.p),this.setState({torPurchased:this.props.p.hasTorRouter()})}render(){const e=this.props.loc,t=[];for(let n=e.techVendorMinRam;n<=e.techVendorMaxRam;n*=2){const e=c.getPurchaseServerCost(n);t.push(o.createElement(m.StdButton,{key:n,onClick:()=>s.createPurchaseServerPopup(n,this.props.p),style:this.btnStyle,text:o.createElement(o.Fragment,null,"Purchase ",n,"GB Server - ",p.Money(e))}))}return o.createElement("div",null,t,this.state.torPurchased?o.createElement(u.StdButtonPurchased,{style:this.btnStyle,text:"TOR Router - Purchased"}):o.createElement(m.StdButton,{onClick:this.purchaseTorRouter,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Purchase TOR Router - ",p.Money(l.CONSTANTS.TorRouterCost))}),o.createElement(m.StdButton,{onClick:this.createUpgradeHomeRamPopup,style:this.btnStyle,text:"Purchase additional RAM for Home computer"}),o.createElement(m.StdButton,{onClick:this.createUpgradeHomeCoresPopup,style:this.btnStyle,text:"Purchase additional Core for Home computer"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialLocation=void 0;const o=i(n(0)),s=n(488),l=n(47),c=n(489),u=n(63),m=n(12);t.SpecialLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.renderNoodleBar=this.renderNoodleBar.bind(this),this.createCorporationPopup=this.createCorporationPopup.bind(this),this.handleBladeburner=this.handleBladeburner.bind(this),this.handleResleeving=this.handleResleeving.bind(this),this.state={inBladeburner:this.props.p.inBladeburner()}}createCorporationPopup(){s.createStartCorporationPopup(this.props.p)}handleBladeburner(){const e=this.props.p;if(e.inBladeburner())this.props.engine.loadBladeburnerContent();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),m.dialogBoxCreate("You have been accepted into the Bladeburner division!"),this.setState({inBladeburner:!0});const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else m.dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}handleResleeving(){this.props.engine.loadResleevingContent()}renderBladeburner(){if(!this.props.p.canAccessBladeburner())return null;const e=this.state.inBladeburner?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return o.createElement(u.StdButton,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return o.createElement(u.StdButton,{onClick:function(){m.dialogBoxCreate(o.createElement(o.Fragment,null,"You ate some delicious noodles and feel refreshed."))},style:this.btnStyle,text:"Eat noodles"})}renderCreateCorporation(){return this.props.p.canAccessCorporation()?o.createElement(c.AutoupdatingStdButton,{disabled:!this.props.p.canAccessCorporation()||this.props.p.hasCorporation(),onClick:this.createCorporationPopup,style:this.btnStyle,text:"Create a Corporation"}):o.createElement(o.Fragment,null,o.createElement("p",null,o.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}renderResleeving(){return this.props.p.canAccessResleeving()?o.createElement(u.StdButton,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case l.LocationName.NewTokyoVitaLife:return this.renderResleeving();case l.LocationName.Sector12CityHall:return this.renderCreateCorporation();case l.LocationName.Sector12NSA:return this.renderBladeburner();case l.LocationName.NewTokyoNoodleBar:return this.renderNoodleBar();default:console.error(`Location ${this.props.loc.name} doesn't have any special properties`)}}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SlumsLocation=void 0;const o=i(n(0)),s=n(176),l=n(3),c=n(489);t.SlumsLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.shoplift=this.shoplift.bind(this),this.robStore=this.robStore.bind(this),this.mug=this.mug.bind(this),this.larceny=this.larceny.bind(this),this.dealDrugs=this.dealDrugs.bind(this),this.bondForgery=this.bondForgery.bind(this),this.traffickArms=this.traffickArms.bind(this),this.homicide=this.homicide.bind(this),this.grandTheftAuto=this.grandTheftAuto.bind(this),this.kidnap=this.kidnap.bind(this),this.assassinate=this.assassinate.bind(this),this.heist=this.heist.bind(this)}shoplift(e){e.isTrusted&&s.Crimes.Shoplift.commit(this.props.p)}robStore(e){e.isTrusted&&s.Crimes.RobStore.commit(this.props.p)}mug(e){e.isTrusted&&s.Crimes.Mug.commit(this.props.p)}larceny(e){e.isTrusted&&s.Crimes.Larceny.commit(this.props.p)}dealDrugs(e){e.isTrusted&&s.Crimes.DealDrugs.commit(this.props.p)}bondForgery(e){e.isTrusted&&s.Crimes.BondForgery.commit(this.props.p)}traffickArms(e){e.isTrusted&&s.Crimes.TraffickArms.commit(this.props.p)}homicide(e){e.isTrusted&&s.Crimes.Homicide.commit(this.props.p)}grandTheftAuto(e){e.isTrusted&&s.Crimes.GrandTheftAuto.commit(this.props.p)}kidnap(e){e.isTrusted&&s.Crimes.Kidnap.commit(this.props.p)}assassinate(e){e.isTrusted&&s.Crimes.Assassination.commit(this.props.p)}heist(e){e.isTrusted&&s.Crimes.Heist.commit(this.props.p)}render(){const e=s.Crimes.Shoplift.successRate(this.props.p),t=s.Crimes.RobStore.successRate(this.props.p),n=s.Crimes.Mug.successRate(this.props.p),a=s.Crimes.Larceny.successRate(this.props.p),r=s.Crimes.DealDrugs.successRate(this.props.p),i=s.Crimes.BondForgery.successRate(this.props.p),u=s.Crimes.TraffickArms.successRate(this.props.p),m=s.Crimes.Homicide.successRate(this.props.p),p=s.Crimes.GrandTheftAuto.successRate(this.props.p),d=s.Crimes.Kidnap.successRate(this.props.p),h=s.Crimes.Assassination.successRate(this.props.p),_=s.Crimes.Heist.successRate(this.props.p);return o.createElement("div",null,o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.shoplift,style:this.btnStyle,text:`Shoplift (${l.numeralWrapper.formatPercentage(e)} chance of success)`,tooltip:"Attempt to shoplift from a low-end retailer"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.robStore,style:this.btnStyle,text:`Rob store (${l.numeralWrapper.formatPercentage(t)} chance of success)`,tooltip:"Attempt to commit armed robbery on a high-end store"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.mug,style:this.btnStyle,text:`Mug someone (${l.numeralWrapper.formatPercentage(n)} chance of success)`,tooltip:"Attempt to mug a random person on the street"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.larceny,style:this.btnStyle,text:`Larceny (${l.numeralWrapper.formatPercentage(a)} chance of success)`,tooltip:"Attempt to rob property from someone's house"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.dealDrugs,style:this.btnStyle,text:`Deal Drugs (${l.numeralWrapper.formatPercentage(r)} chance of success)`,tooltip:"Attempt to deal drugs"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.bondForgery,style:this.btnStyle,text:`Bond Forgery (${l.numeralWrapper.formatPercentage(i)} chance of success)`,tooltip:"Attempt to forge corporate bonds"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.traffickArms,style:this.btnStyle,text:`Traffick illegal Arms (${l.numeralWrapper.formatPercentage(u)} chance of success)`,tooltip:"Attempt to smuggle illegal arms into the city"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.homicide,style:this.btnStyle,text:`Homicide (${l.numeralWrapper.formatPercentage(m)} chance of success)`,tooltip:"Attempt to murder a random person on the street"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.grandTheftAuto,style:this.btnStyle,text:`Grand theft Auto (${l.numeralWrapper.formatPercentage(p)} chance of success)`,tooltip:"Attempt to commit grand theft auto"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.kidnap,style:this.btnStyle,text:`Kidnap and Ransom (${l.numeralWrapper.formatPercentage(d)} chance of success)`,tooltip:"Attempt to kidnap and ransom a high-profile-target"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.assassinate,style:this.btnStyle,text:`Assassinate (${l.numeralWrapper.formatPercentage(h)} chance of success)`,tooltip:"Attempt to assassinate a high-profile target"}),o.createElement(c.AutoupdatingStdButton,{intervalTime:5e3,onClick:this.heist,style:this.btnStyle,text:`Heist (${l.numeralWrapper.formatPercentage(_)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HospitalLocation=void 0;const o=i(n(0)),s=n(430),l=n(489),c=n(31),u=n(12);t.HospitalLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return s.getHospitalizationCost(this.props.p)}getHealed(e){if(!e.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const t=this.getCost();this.props.p.loseMoney(t),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),u.dialogBoxCreate(o.createElement(o.Fragment,null,"You were healed to full health! The hospital billed you for ",c.Money(t)))}render(){const e=this.getCost();return o.createElement(l.AutoupdatingStdButton,{onClick:this.getHealed,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Get treatment for wounds - ",c.Money(e))})}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GymLocation=void 0;const o=i(n(0)),s=n(11),l=n(24),c=n(45),u=n(63),m=n(31);t.GymLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.trainStrength=this.trainStrength.bind(this),this.trainDefense=this.trainDefense.bind(this),this.trainDexterity=this.trainDexterity.bind(this),this.trainAgility=this.trainAgility.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=c.SpecialServerIps.getIp(this.props.loc.name),t=l.getServer(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const n=t.backdoorInstalled?.9:1;return this.props.loc.costMult*n}train(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}trainStrength(){this.train(s.CONSTANTS.ClassGymStrength)}trainDefense(){this.train(s.CONSTANTS.ClassGymDefense)}trainDexterity(){this.train(s.CONSTANTS.ClassGymDexterity)}trainAgility(){this.train(s.CONSTANTS.ClassGymAgility)}render(){const e=s.CONSTANTS.ClassGymBaseCost*this.calculateCost();return o.createElement("div",null,o.createElement(u.StdButton,{onClick:this.trainStrength,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Strength (",m.Money(e)," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainDefense,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Defense (",m.Money(e)," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainDexterity,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Dexterity (",m.Money(e)," / sec)")}),o.createElement(u.StdButton,{onClick:this.trainAgility,style:this.btnStyle,text:o.createElement(o.Fragment,null,"Train Agility (",m.Money(e)," / sec)")}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyToJobButton=void 0;const o=i(n(0)),s=n(460),l=n(63);t.ApplyToJobButton=class extends o.Component{constructor(e){super(e),this.getJobRequirementTooltip=this.getJobRequirementTooltip.bind(this)}getJobRequirementTooltip(){const e=this.props.p.getNextCompanyPosition(this.props.company,this.props.entryPosType);return null==e?"":this.props.company.hasPosition(e)?s.getJobRequirementText(this.props.company,e,!0):""}render(){return o.createElement(l.StdButton,{onClick:this.props.onClick,style:this.props.style,text:this.props.text,tooltip:this.getJobRequirementTooltip()})}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyLocation=void 0;const o=i(n(0)),s=n(982),l=n(426),c=n(35),u=n(301),m=n(59),p=i(n(65)),d=n(63),h=n(67),_=n(749),g=n(54),f={display:"block"};t.CompanyLocation=class extends o.Component{constructor(e){if(super(e),this.companyPosition=null,this.jobTitle=null,this.btnStyle={display:"block"},this.quit=this.quit.bind(this),this.applyForAgentJob=this.applyForAgentJob.bind(this),this.applyForBusinessConsultantJob=this.applyForBusinessConsultantJob.bind(this),this.applyForBusinessJob=this.applyForBusinessJob.bind(this),this.applyForEmployeeJob=this.applyForEmployeeJob.bind(this),this.applyForItJob=this.applyForItJob.bind(this),this.applyForPartTimeEmployeeJob=this.applyForPartTimeEmployeeJob.bind(this),this.applyForPartTimeWaiterJob=this.applyForPartTimeWaiterJob.bind(this),this.applyForSecurityJob=this.applyForSecurityJob.bind(this),this.applyForSoftwareConsultantJob=this.applyForSoftwareConsultantJob.bind(this),this.applyForSoftwareJob=this.applyForSoftwareJob.bind(this),this.applyForWaiterJob=this.applyForWaiterJob.bind(this),this.startInfiltration=this.startInfiltration.bind(this),this.work=this.work.bind(this),this.location=l.Locations[e.locName],null==this.location)throw new Error(`CompanyLocation component constructed with invalid location: ${e.locName}`);if(this.company=c.Companies[e.locName],null==this.company)throw new Error(`CompanyLocation component constructed with invalid company: ${e.locName}`);this.state={employedHere:!1},this.props.p.location=e.locName,this.checkIfEmployedHere(!1)}applyForAgentJob(e){e.isTrusted&&(this.props.p.applyForAgentJob(),this.checkIfEmployedHere(!0))}applyForBusinessConsultantJob(e){e.isTrusted&&(this.props.p.applyForBusinessConsultantJob(),this.checkIfEmployedHere(!0))}applyForBusinessJob(e){e.isTrusted&&(this.props.p.applyForBusinessJob(),this.checkIfEmployedHere(!0))}applyForEmployeeJob(e){e.isTrusted&&(this.props.p.applyForEmployeeJob(),this.checkIfEmployedHere(!0))}applyForItJob(e){e.isTrusted&&(this.props.p.applyForItJob(),this.checkIfEmployedHere(!0))}applyForPartTimeEmployeeJob(e){e.isTrusted&&(this.props.p.applyForPartTimeEmployeeJob(),this.checkIfEmployedHere(!0))}applyForPartTimeWaiterJob(e){e.isTrusted&&(this.props.p.applyForPartTimeWaiterJob(),this.checkIfEmployedHere(!0))}applyForSecurityJob(e){e.isTrusted&&(this.props.p.applyForSecurityJob(),this.checkIfEmployedHere(!0))}applyForSoftwareConsultantJob(e){e.isTrusted&&(this.props.p.applyForSoftwareConsultantJob(),this.checkIfEmployedHere(!0))}applyForSoftwareJob(e){e.isTrusted&&(this.props.p.applyForSoftwareJob(),this.checkIfEmployedHere(!0))}applyForWaiterJob(e){e.isTrusted&&(this.props.p.applyForWaiterJob(),this.checkIfEmployedHere(!0))}checkIfEmployedHere(e=!1){this.jobTitle=this.props.p.jobs[this.props.locName],null!=this.jobTitle&&(this.companyPosition=m.CompanyPositions[this.jobTitle]),e&&this.setState({employedHere:null!=this.jobTitle})}startInfiltration(e){if(!e.isTrusted)return;const t=this.location;t.infiltrationData?(this.props.engine.loadInfiltrationContent(this.props.locName,t.infiltrationData.startingSecurityLevel,t.infiltrationData.maxClearanceLevel),t.infiltrationData):console.error(`trying to start infiltration at ${this.props.locName} but the infiltrationData is null`)}work(e){if(!e.isTrusted)return;const t=this.companyPosition;t instanceof u.CompanyPosition&&(t.isPartTimeJob()||t.isSoftwareConsultantJob()||t.isBusinessConsultantJob()?this.props.p.startWorkPartTime(this.props.locName):this.props.p.startWork(this.props.locName))}quit(e){if(!e.isTrusted)return;const t=g.yesNoBoxGetYesButton(),n=g.yesNoBoxGetNoButton();null!=t&&null!=n&&(t.innerHTML="Quit job",n.innerHTML="Cancel",t.addEventListener("click",()=>{this.props.p.quitJob(this.props.locName),this.checkIfEmployedHere(!0),g.yesNoBoxClose()}),n.addEventListener("click",()=>{g.yesNoBoxClose()}),g.yesNoBoxCreate(o.createElement(o.Fragment,null,"Would you like to quit your job at ",this.company.name,"?")))}render(){const e=null!=this.jobTitle,t=this.company.getFavorGain();return o.createElement("div",null,e&&o.createElement("div",null,o.createElement("p",null,"Job Title: ",this.jobTitle),o.createElement("br",null),o.createElement("p",{style:f},"-------------------------"),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Company reputation: ",h.Reputation(this.company.playerReputation),o.createElement("span",{className:"tooltiptext"},"You will earn ",_.Favor(t[0])," company favor upon resetting after installing Augmentations")),o.createElement("br",null),o.createElement("br",null),o.createElement("p",{style:f},"-------------------------"),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Company Favor: ",_.Favor(this.company.favor),o.createElement("span",{className:"tooltiptext"},"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.")),o.createElement("br",null),o.createElement("br",null),o.createElement("p",{style:f},"-------------------------"),o.createElement("br",null),o.createElement(d.StdButton,{onClick:this.work,text:"Work"}),"    ",o.createElement(d.StdButton,{onClick:this.quit,text:"Quit"})),this.company.hasAgentPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.AgentCompanyPositions[0]],onClick:this.applyForAgentJob,p:this.props.p,style:this.btnStyle,text:"Apply for Agent Job"}),this.company.hasBusinessConsultantPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.BusinessConsultantCompanyPositions[0]],onClick:this.applyForBusinessConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Consultant Job"}),this.company.hasBusinessPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.BusinessCompanyPositions[0]],onClick:this.applyForBusinessJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Job"}),this.company.hasEmployeePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.MiscCompanyPositions[1]],onClick:this.applyForEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be an Employee"}),this.company.hasEmployeePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.PartTimeCompanyPositions[1]],onClick:this.applyForPartTimeEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Employee"}),this.company.hasITPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.ITCompanyPositions[0]],onClick:this.applyForItJob,p:this.props.p,style:this.btnStyle,text:"Apply for IT Job"}),this.company.hasSecurityPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SecurityCompanyPositions[2]],onClick:this.applyForSecurityJob,p:this.props.p,style:this.btnStyle,text:"Apply for Security Job"}),this.company.hasSoftwareConsultantPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SoftwareConsultantCompanyPositions[0]],onClick:this.applyForSoftwareConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Consultant Job"}),this.company.hasSoftwarePositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.SoftwareCompanyPositions[0]],onClick:this.applyForSoftwareJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Job"}),this.company.hasWaiterPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.MiscCompanyPositions[0]],onClick:this.applyForWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a Waiter"}),this.company.hasWaiterPositions()&&o.createElement(s.ApplyToJobButton,{company:this.company,entryPosType:m.CompanyPositions[p.PartTimeCompanyPositions[0]],onClick:this.applyForPartTimeWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Waiter"}),null!=this.location.infiltrationData&&o.createElement(d.StdButton,{onClick:this.startInfiltration,style:this.btnStyle,text:"Infiltrate Company"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GenericLocation=void 0;const o=i(n(0)),s=n(983),l=n(981),c=n(980),u=n(979),m=n(978),p=n(977),d=n(976),h=n(975),_=n(974),g=n(497),f=n(26),y=n(45),b=n(24),E=n(63),v=n(961);t.GenericLocation=class extends o.Component{constructor(e){super(e),this.btnStyle={display:"block"}}getLocationSpecificContent(){const e=[];return this.props.loc.types.includes(g.LocationType.Company)&&e.push(o.createElement(s.CompanyLocation,{engine:this.props.engine,key:"companylocation",locName:this.props.loc.name,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Gym)&&e.push(o.createElement(l.GymLocation,{key:"gymlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Hospital)&&e.push(o.createElement(c.HospitalLocation,{key:"hospitallocation",p:this.props.p})),this.props.loc.types.includes(g.LocationType.Slums)&&e.push(o.createElement(u.SlumsLocation,{key:"slumslocation",p:this.props.p})),this.props.loc.types.includes(g.LocationType.Special)&&e.push(o.createElement(m.SpecialLocation,{engine:this.props.engine,key:"speciallocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.TechVendor)&&e.push(o.createElement(p.TechVendorLocation,{key:"techvendorlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.TravelAgency)&&e.push(o.createElement(d.TravelAgencyLocation,{key:"travelagencylocation",p:this.props.p,travel:this.props.travel})),this.props.loc.types.includes(g.LocationType.University)&&e.push(o.createElement(h.UniversityLocation,{key:"universitylocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(g.LocationType.Casino)&&e.push(o.createElement(_.CasinoLocation,{key:"casinoLocation",p:this.props.p})),e}render(){const e=this.getLocationSpecificContent(),t=y.SpecialServerIps.getIp(this.props.loc.name),n=b.getServer(t),a=null!==n&&b.isBackdoorInstalled(n);return o.createElement("div",null,o.createElement(E.StdButton,{onClick:this.props.returnToCity,style:this.btnStyle,text:"Return to World"}),o.createElement("h1",{className:"noselect"},a&&!f.Settings.DisableTextEffects?o.createElement(v.CorruptableText,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LocationCity=void 0;const o=i(n(0)),s=n(26),l=n(63);t.LocationCity=class extends o.Component{asciiCity(){const e=e=>e?o.createElement("span",{key:e,className:"tooltip",style:{color:"blue",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:this.props.enterLocation.bind(this,e)},"X"):o.createElement("span",null,"*"),t=/[A-Z]/g,n={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},a=a=>{const r=[],i=[];let o;for(;null!==(o=t.exec(a));)i.push(o);if(0===i.length)return r.push(a),r;for(let t=0;to.createElement("li",{key:e},o.createElement(l.StdButton,{onClick:this.props.enterLocation.bind(this,e),text:e})));return o.createElement("ul",null,e)}render(){return o.createElement(o.Fragment,null,s.Settings.DisableASCIIArt?this.listCity():this.asciiCity())}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Victory=void 0;const s=n(16),l=i(n(0)),c=n(63),u=o(n(96)),m=n(31),p=n(67),d=n(21);t.Victory=function(e){const[t,n]=l.useState("none");function a(){const t=document.getElementById("mainmenu-container");if(!t)throw new Error("mainmenu-container somehow null");t.style.visibility="visible",e.Engine.loadLocationContent()}const r=e.MaxLevel*Math.pow(1.01,e.MaxLevel),i=Math.pow(e.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*r*d.BitNodeMultipliers.InfiltrationRep,o=Math.pow(e.Difficulty+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*r*d.BitNodeMultipliers.InfiltrationMoney;return l.default.createElement(l.default.Fragment,null,l.default.createElement(u.default,{container:!0,spacing:3},l.default.createElement(u.default,{item:!0,xs:10},l.default.createElement("h1",null,"Infiltration successful!")),l.default.createElement(u.default,{item:!0,xs:10},l.default.createElement("h2",null,"You can trade the confidential information you found for money or reputation."),l.default.createElement("select",{className:"dropdown",onChange:function(e){n(e.target.value)}},l.default.createElement("option",{key:"none",value:"none"},"none"),e.Player.factions.filter(e=>s.Factions[e].getInfo().offersWork()).map(e=>l.default.createElement("option",{key:e,value:e},e))),l.default.createElement(c.StdButton,{onClick:function(){"none"!==t&&(s.Factions[t].playerReputation+=i,a())},text:l.default.createElement(l.default.Fragment,null,"Trade for ",p.Reputation(i)," reputation")})),l.default.createElement(u.default,{item:!0,xs:3},l.default.createElement(c.StdButton,{onClick:function(){e.Player.gainMoney(o),e.Player.recordMoneySource(o,"infiltration"),a()},text:l.default.createElement(l.default.Fragment,null,"Sell for ",m.Money(o))})),l.default.createElement(u.default,{item:!0,xs:3},l.default.createElement(c.StdButton,{onClick:a,text:"Quit"}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WireCuttingGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d={Trivial:{timer:9e3,wiresmin:4,wiresmax:4,rules:2},Normal:{timer:7e3,wiresmin:6,wiresmax:6,rules:2},Hard:{timer:5e3,wiresmin:8,wiresmax:8,rules:3},Impossible:{timer:4e3,wiresmin:9,wiresmax:9,rules:4}},h=["|",".","/","-","█","#"],_=["red","#FFC107","blue","white"],g={red:"red","#FFC107":"yellow",blue:"blue",white:"white"};function f(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,n)=>t===n}}function y(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${g[t]}.`,shouldCut:e=>e.colors.includes(t)}}t.WireCuttingGame=function(e){const t={timer:0,wiresmin:0,wiresmax:0,rules:0};p.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[],n=m.random(e.wiresmin,e.wiresmax);for(let e=0;es.default.createElement("h3",{key:t},e.toString())),s.default.createElement("pre",null,new Array(a.length).fill(0).map((e,t)=>s.default.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,a.map((e,n)=>3!==t&&4!==t||!r[n]?s.default.createElement("span",{key:n,style:{color:e.colors[t%e.colors.length]}},"|",e.tpe,"|   "):s.default.createElement("span",{key:n},"      "))))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=parseInt(t.key);n<1||n>a.length||isNaN(n)||i(t=>{const r=[...t];r[n-1]=!0,o.some(e=>e.shouldCut(a[n-1],n-1))||e.onFailure();const i=[];for(let e=0;ee===r[t])&&e.onSuccess(),r})},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MinesweeperGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p=n(226),d={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function h(e){const t=[];for(let n=0;n{const e=setTimeout(()=>f(!1),2e3);return()=>clearInterval(e)},[]),s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},g?"Remember all the mines!":"Mark all the mines!"),a.map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,e.map((e,n)=>g?a[t][n]?s.default.createElement("span",{key:n},"[?] "):s.default.createElement("span",{key:n},"[ ] "):n==o[0]&&t==o[1]?s.default.createElement("span",{key:n},"[X] "):r[t][n]?s.default.createElement("span",{key:n},"[.] "):s.default.createElement("span",{key:n},"[ ] "))),s.default.createElement("br",null))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){if(t.preventDefault(),g)return;const n=[0,0];switch(p.getArrow(t)){case"↑":n[1]--;break;case"←":n[0]--;break;case"↓":n[1]++;break;case"→":n[0]++}const r=[o[0]+n[0],o[1]+n[1]];if(r[0]=(r[0]+a[0].length)%a[0].length,r[1]=(r[1]+a.length)%a.length,_(r),32==t.keyCode){if(!a[o[1]][o[0]])return void e.onFailure();i(t=>(t[o[1]][o[0]]=!0,function(e,t){function n(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return n(e)===n(t)}(a,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Cyberpunk2077Game=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p=n(226),d={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function h(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}t.Cyberpunk2077Game=function(e){const t={timer:0,width:0,height:0,symbols:0};m.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[];for(let n=0;nt==i?s.default.createElement("span",{key:`${t}`,style:{fontSize:"1em",color:"blue"}},e," "):s.default.createElement("span",{key:`${t}`,style:{fontSize:"1em"}},e," "))),s.default.createElement("br",null),a.map((e,t)=>s.default.createElement("div",{key:t},s.default.createElement("pre",null,e.map((e,n)=>n==_[0]&&t==_[1]?s.default.createElement("span",{key:`${n}${t}`,style:{fontSize:"2em",color:"blue"}},e," "):s.default.createElement("span",{key:`${n}${t}`,style:{fontSize:"2em"}},e," "))),s.default.createElement("br",null))),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=[0,0];switch(p.getArrow(t)){case"↑":n[1]--;break;case"←":n[0]--;break;case"↓":n[1]++;break;case"→":n[0]++}const s=[_[0]+n[0],_[1]+n[1]];if(s[0]=(s[0]+a[0].length)%a[0].length,s[1]=(s[1]+a.length)%a.length,g(s),32==t.keyCode){if(a[_[1]][_[0]]!==r[i])return void e.onFailure();o(i+1),r.length===i+1&&e.onSuccess()}},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheatCodeGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:9}};t.CheatCodeGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(d,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=["←","→","↑","↓"];let n="";for(let a=0;a=a.length&&e.onSuccess()):e.onFailure()},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BribeGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};t.BribeGame=function(e){const t={timer:0,size:0};m.interpolate(p,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=[];t.push(d[Math.floor(Math.random()*d.length)]);for(let n=0;n0;t--){const n=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[n],e[n]=a}}(t),t}(t)),[r,i]=s.useState(0);return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",null,"Say something nice about the guard."),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault();const n=t.keyCode;if(32===n)return void(d.includes(a[r])?e.onSuccess():e.onFailure());let o=r;for([38,87,68,39].includes(n)&&o++,[65,37,83,40].includes(n)&&o--;o<0;)o+=a.length;for(;o>a.length-1;)o-=a.length;i(o)},onFailure:e.onFailure})),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("h2",{style:{fontSize:"2em"}},"↑"),s.default.createElement("h2",{style:{fontSize:"2em"}},a[r]),s.default.createElement("h2",{style:{fontSize:"2em"}},"↓")))};const d=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],h=["aggressive","aloof","arrogant","big-headed","boastful","boring","bossy","careless","clingy","couch potato","cruel","cynical","grumpy","hot air","know it all","obnoxious","pain in the neck","picky","tactless","thoughtless"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BackwardGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d=n(657),h={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};t.BackwardGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(h,e.difficulty,t);const n=t.timer,[a]=s.useState(function(e){const t=m.random(e.min,e.max);let n="";for(let e=0;e0&&(n+=" "),n+=_[Math.floor(Math.random()*_.length)];return n}(t)),[r,i]=s.useState("");return s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:n,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Type it backward"),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){if(t.preventDefault(),16===t.keyCode)return;const n=r+t.key.toUpperCase();a.startsWith(n)?a===n?e.onSuccess():i(n):e.onFailure()},onFailure:e.onFailure})),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("p",{style:{transform:"scaleX(-1)"}},a)),s.default.createElement(l.default,{item:!0,xs:6},s.default.createElement("p",null,r,s.default.createElement(d.BlinkingCursor,null))))};const _=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SlashGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(164),p={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};t.SlashGame=function(e){const t={window:0};m.interpolate(p,e.difficulty,t);const[n,a]=s.useState(!0);return s.useEffect(()=>{let e=-1;const n=window.setTimeout(()=>{a(!1),e=window.setTimeout(()=>a(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(n),-1!==e&&clearInterval(e)}},[]),s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(u.GameTimer,{millis:5e3,onExpire:e.onFailure}),s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",{className:"noselect"},"Slash when his guard is down!"),s.default.createElement("p",{style:{fontSize:"5em"}},n?"!Guarding!":"!ATTACKING!"),s.default.createElement(c.KeyHandler,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(n?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BracketGame=void 0;const s=i(n(0)),l=o(n(96)),c=n(166),u=n(165),m=n(226),p=n(164),d=n(657),h={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};t.BracketGame=function(e){const t={timer:0,min:0,max:0};p.interpolate(h,e.difficulty,t);const n=t.timer,[a,r]=s.useState(""),[i]=s.useState(function(e){let t="";const n=m.random(e.min,e.max);for(let e=0;e":"":"]"}(t);n&&(function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(i[i.length-a.length-1],n)?i.length!==a.length+1?r(a+n):e.onSuccess():e.onFailure())},onFailure:e.onFailure})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Countdown=void 0;const s=i(n(0)),l=o(n(96));t.Countdown=function(e){const[t,n]=s.useState(3);return s.useEffect(()=>{0!==t?setTimeout(()=>n(t-1),200):e.onFinish()}),s.default.createElement(s.default.Fragment,null,s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(l.default,{item:!0,xs:12},s.default.createElement("h1",null,"Get Ready!"),s.default.createElement("h1",null,t))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Game=void 0;const s=i(n(0)),l=o(n(96)),c=n(995),u=n(994),m=n(993),p=n(992),d=n(991),h=n(990),_=n(989),g=n(988),f=n(987),y=n(986);var b;!function(e){e[e.Countdown=0]="Countdown",e[e.Minigame=1]="Minigame",e[e.Result=2]="Result",e[e.Sell=3]="Sell"}(b||(b={}));const E=[m.SlashGame,u.BracketGame,p.BackwardGame,d.BribeGame,h.CheatCodeGame,_.Cyberpunk2077Game,g.MinesweeperGame,f.WireCuttingGame];t.Game=function(e){const[t,n]=s.useState(1),[a,r]=s.useState(b.Countdown),[i,o]=s.useState(""),[u,m]=s.useState({lastGames:[-1,-1],id:Math.floor(Math.random()*E.length)});function p(){m({lastGames:[u.lastGames[1],u.id],id:function(){let e=u.lastGames[0];const t=[u.lastGames[0],u.lastGames[1],u.id];for(;t.includes(e);)e=Math.floor(Math.random()*E.length);return e}()})}function d(e){o(t=>{let n=t;return(n+=e?"✓":"✗").length>15&&(n=n.slice(1)),n})}let h;switch(a){case b.Countdown:h=s.default.createElement(c.Countdown,{onFinish:()=>r(b.Minigame)});break;case b.Minigame:{const a=E[u.id];h=s.default.createElement(a,{onSuccess:function(){d(!0),t===e.MaxLevel?r(b.Sell):(r(b.Countdown),n(t+1)),p()},onFailure:function(t){r(b.Countdown),d(!1);const n=(null===t||void 0===t?void 0:t.automated)?e.Player.hp:3*e.StartingDifficulty;if(e.Player.takeDamage(n)){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}p()},difficulty:e.Difficulty+t/50});break}case b.Sell:h=s.default.createElement(y.Victory,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel})}return s.default.createElement(s.default.Fragment,null,s.default.createElement(l.default,{container:!0,spacing:3},s.default.createElement(l.default,{item:!0,xs:3},s.default.createElement("h3",null,"Level: ",t," / ",e.MaxLevel),s.default.createElement(function(){return s.default.createElement("h4",null,s.default.createElement("span",{style:{color:"gray"}},i.slice(0,i.length-1)),i[i.length-1])},null)),s.default.createElement(l.default,{item:!0,xs:12},h)))}},,,,,,function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Intro=void 0;const r=a(n(0)),i=n(63),o=a(n(96));function s(e,t){let n="";return t<=0?t=0:t>13?t=13:(t--,n=">"),r.default.createElement("span",{style:{color:e}},"=".repeat(t),n," ".repeat(13-n.length-t))}t.Intro=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement(o.default,{container:!0,spacing:3},r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("h1",null,"Infiltrating ",e.Location)),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("h2",null,"Maximum level: ",e.MaxLevel)),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("pre",null,"[",function(e){return 0===e?r.default.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.default.createElement(r.default.Fragment,null,s("white",13*e),s("orange",13*(e-1)),s("red",13*(e-2)))}(e.Difficulty),"]"),r.default.createElement("pre",null," ^ ^ ^ ^"),r.default.createElement("pre",null," Trivial Normal Hard Impossible")),r.default.createElement(o.default,{item:!0,xs:10},r.default.createElement("p",null,"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation."),r.default.createElement("br",null),r.default.createElement("p",null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.default.createElement("br",null),r.default.createElement("p",null,"No game require use of the mouse."),r.default.createElement("br",null),r.default.createElement("p",null,"Spacebar is the default action/confirm button."),r.default.createElement("br",null),r.default.createElement("p",null,"Everything that uses arrow can also use WASD"),r.default.createElement("br",null),r.default.createElement("p",null,"Sometimes the rest of the keyboard is used.")),r.default.createElement(o.default,{item:!0,xs:3},r.default.createElement(i.StdButton,{onClick:e.start,text:"Start"})),r.default.createElement(o.default,{item:!0,xs:3},r.default.createElement(i.StdButton,{onClick:e.cancel,text:"Cancel"}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=i(n(0)),s=n(1002),l=n(996);t.Root=function(e){const[t,n]=o.useState(!1);return t?o.default.createElement(l.Game,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel}):o.default.createElement(s.Intro,{Player:e.Player,Engine:e.Engine,Location:e.Location,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel,start:()=>n(!0),cancel:function(){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}})}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillElem=void 0;const r=a(n(0)),i=n(170),o=n(20);t.SkillElem=function(e){const t=e.skill.name;let n=0;e.bladeburner.skills[t]&&!isNaN(e.bladeburner.skills[t])&&(n=e.bladeburner.skills[t]);const a=e.skill.calculateCost(n),s=e.bladeburner.skillPoints>=a,l=!!e.skill.maxLvl&&n>=e.skill.maxLvl;return r.default.createElement(r.default.Fragment,null,r.default.createElement("h2",{style:{display:"inline-block"}},r.default.createElement(i.CopyableText,{value:e.skill.name})),r.default.createElement("a",{onClick:function(){e.bladeburner.skillPointso.createElement("li",{key:t,className:"bladeburner-action"},o.createElement(s.SkillElem,{bladeburner:e.bladeburner,skill:l.Skills[t],onUpgrade:e.onUpgrade}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SkillPage=void 0;const o=i(n(0)),s=n(1005),l=n(150),c=n(20);t.SkillPage=function(e){const t=o.useState(!1)[1],n=e.bladeburner.skillMultipliers;function a(e){return e&&1!==e}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",null,o.default.createElement("strong",null,"Skill Points: ",c.formatNumber(e.bladeburner.skillPoints,0))),o.default.createElement("p",null,"You will gain one skill point every ",l.BladeburnerConstants.RanksPerSkillPoint," ranks.",o.default.createElement("br",null),o.default.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.",o.default.createElement("br",null)),o.default.createElement("br",null),a(n.successChanceAll)&&o.default.createElement("p",null,"Total Success Chance: x",c.formatNumber(n.successChanceAll,3)),a(n.successChanceStealth)&&o.default.createElement("p",null,"Stealth Success Chance: x",c.formatNumber(n.successChanceStealth,3)),a(n.successChanceKill)&&o.default.createElement("p",null,"Retirement Success Chance: x",c.formatNumber(n.successChanceKill,3)),a(n.successChanceContract)&&o.default.createElement("p",null,"Contract Success Chance: x",c.formatNumber(n.successChanceContract,3)),a(n.successChanceOperation)&&o.default.createElement("p",null,"Operation Success Chance: x",c.formatNumber(n.successChanceOperation,3)),a(n.successChanceEstimate)&&o.default.createElement("p",null,"Synthoid Data Estimate: x",c.formatNumber(n.successChanceEstimate,3)),a(n.actionTime)&&o.default.createElement("p",null,"Action Time: x",c.formatNumber(n.actionTime,3)),a(n.effHack)&&o.default.createElement("p",null,"Hacking Skill: x",c.formatNumber(n.effHack,3)),a(n.effStr)&&o.default.createElement("p",null,"Strength: x",c.formatNumber(n.effStr,3)),a(n.effDef)&&o.default.createElement("p",null,"Defense: x",c.formatNumber(n.effDef,3)),a(n.effDex)&&o.default.createElement("p",null,"Dexterity: x",c.formatNumber(n.effDex,3)),a(n.effAgi)&&o.default.createElement("p",null,"Agility: x",c.formatNumber(n.effAgi,3)),a(n.effCha)&&o.default.createElement("p",null,"Charisma: x",c.formatNumber(n.effCha,3)),a(n.effInt)&&o.default.createElement("p",null,"Intelligence: x",c.formatNumber(n.effInt,3)),a(n.stamina)&&o.default.createElement("p",null,"Stamina: x",c.formatNumber(n.stamina,3)),a(n.money)&&o.default.createElement("p",null,"Contract Money: x",c.formatNumber(n.money,3)),a(n.expGain)&&o.default.createElement("p",null,"Exp Gain: x",c.formatNumber(n.expGain,3)),o.default.createElement("br",null),o.default.createElement(s.SkillList,{bladeburner:e.bladeburner,onUpgrade:()=>t(e=>!e)}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpElem=void 0;const o=i(n(0)),s=n(20),l=n(297),c=n(171),u=n(410),m=n(79),p=n(666),d=n(496),h=n(170);t.BlackOpElem=function(e){const t=o.useState(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return o.default.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const n=e.bladeburner.action.type===l.ActionTypes.BlackOperation&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=e.action.getActionTime(e.bladeburner),i=e.bladeburner.rank>=e.action.reqdRank,_=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete);return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(h.CopyableText,{value:e.action.name})," (IN PROGRESS - ",s.formatNumber(_,0)," / ",s.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(h.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},c.createProgressBarText({progress:_/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{className:i?"a-link-button":"a-link-button-inactive",style:{margin:"3px",padding:"3px"},onClick:function(){e.bladeburner.action.type=l.ActionTypes.BlackOperation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)}},"Start"),o.default.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";m.createPopup(t,p.TeamSizePopup,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",s.formatNumber(e.action.teamCount,0),")")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{style:{display:"block",color:i?"white":"red"}},"Required Rank: ",s.formatNumber(e.action.reqdRank,0)),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},"Estimated Success Chance: ",o.default.createElement(d.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",s.convertTimeMsToTimeElapsedString(1e3*r)))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpList=void 0;const r=a(n(0)),i=n(755),o=n(1007);t.BlackOpList=function(e){let t=[];for(const e in i.BlackOperations)i.BlackOperations.hasOwnProperty(e)&&t.push(i.BlackOperations[e]);return t.sort(function(e,t){return e.reqdRank-t.reqdRank}),t=(t=t.filter((n,a)=>!(null==e.bladeburner.blackops[t[a].name]&&0!==a&&null==e.bladeburner.blackops[t[a-1].name]))).reverse(),r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t.name,className:"bladeburner-action"},r.default.createElement(o.BlackOpElem,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOpPage=void 0;const o=i(n(0)),s=n(1008);t.BlackOpPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",o.createElement("br",null),o.createElement("br",null),o.createElement("b",null,"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops."),o.createElement("br",null),o.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),o.createElement(s.BlackOpList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationElem=void 0;const o=i(n(0)),s=n(297),l=n(171),c=n(20),u=n(410),m=n(150),p=n(79),d=n(666),h=n(496),_=n(170);t.OperationElem=function(e){const t=o.useState(!1)[1],n=e.bladeburner.action.type===s.ActionTypes.Operation&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),i=e.action.level>=e.action.maxLevel,g=e.action.getActionTime(e.bladeburner),f=`bladeburner-${e.action.name}-autolevel-checkbox`;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(_.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(r,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(_.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:r/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes.Operation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start"),o.default.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";p.createPopup(t,d.TeamSizePopup,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",c.formatNumber(e.action.teamCount,0),")")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(m.BladeburnerConstants.OperationSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),o.default.createElement("a",{onClick:function(){++e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${i?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),o.default.createElement("a",{onClick:function(){--e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${e.action.level<=1?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},o.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),"Estimated success chance: ",o.default.createElement(h.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*g),o.default.createElement("br",null),"Operations remaining: ",Math.floor(e.action.count),o.default.createElement("br",null),"Successes: ",e.action.successes,o.default.createElement("br",null),"Failures: ",e.action.failures),o.default.createElement("br",null),o.default.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:f},"Autolevel:",o.default.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),o.default.createElement("input",{type:"checkbox",id:f,checked:e.action.autoLevel,onChange:function(n){e.action.autoLevel=n.target.checked,t(e=>!e)}}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationList=void 0;const r=a(n(0)),i=n(1010);t.OperationList=function(e){const t=Object.keys(e.bladeburner.operations),n=e.bladeburner.operations;return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t,className:"bladeburner-action"},r.default.createElement(i.OperationElem,{bladeburner:e.bladeburner,action:n[t],player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OperationPage=void 0;const o=i(n(0)),s=n(1011);t.OperationPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",o.createElement("br",null),o.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",o.createElement("br",null),o.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.",o.createElement("br",null),o.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),o.createElement(s.OperationList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractElem=void 0;const o=i(n(0)),s=n(297),l=n(171),c=n(20),u=n(410),m=n(150),p=n(496),d=n(170);t.ContractElem=function(e){const t=o.useState(!1)[1],n=e.bladeburner.action.type===s.ActionTypes.Contract&&e.action.name===e.bladeburner.action.name,a=e.action.getEstSuccessChance(e.bladeburner),r=(e.action.getSuccessChance(e.bladeburner),Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete)),i=e.action.level>=e.action.maxLevel,h=e.action.getActionTime(e.bladeburner),_=`bladeburner-${e.action.name}-autolevel-checkbox`;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(d.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(r,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(d.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:r/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes.Contract,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(m.BladeburnerConstants.ContractSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),o.default.createElement("a",{onClick:function(){++e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${i?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),o.default.createElement("a",{onClick:function(){--e.action.level,n&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:`tooltip ${e.action.level<=1?"a-link-button-inactive":"a-link-button"}`},n&&o.default.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},o.default.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),"Estimated success chance: ",o.default.createElement(p.SuccessChance,{chance:a})," ",e.action.isStealth?u.stealthIcon:o.default.createElement(o.default.Fragment,null),e.action.isKill?u.killIcon:o.default.createElement(o.default.Fragment,null),o.default.createElement("br",null),"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*h),o.default.createElement("br",null),"Contracts remaining: ",Math.floor(e.action.count),o.default.createElement("br",null),"Successes: ",e.action.successes,o.default.createElement("br",null),"Failures: ",e.action.failures),o.default.createElement("br",null),o.default.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:_},"Autolevel:",o.default.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),o.default.createElement("input",{type:"checkbox",id:_,checked:e.action.autoLevel,onChange:function(n){e.action.autoLevel=n.target.checked,t(e=>!e)}}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractList=void 0;const r=a(n(0)),i=n(1013);t.ContractList=function(e){const t=Object.keys(e.bladeburner.contracts),n=e.bladeburner.contracts;return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t,className:"bladeburner-action"},r.default.createElement(i.ContractElem,{bladeburner:e.bladeburner,action:n[t],player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractPage=void 0;const o=i(n(0)),s=n(1014);t.ContractPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",o.createElement("br",null),o.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),o.createElement(s.ContractList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionElem=void 0;const o=i(n(0)),s=n(297),l=n(171),c=n(20),u=n(170);t.GeneralActionElem=function(e){const t=o.useState(!1)[1],n=e.action.name===e.bladeburner.action.name,a=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),r=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),i="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1;return o.default.createElement(o.default.Fragment,null,o.default.createElement("h2",{style:{display:"inline-block"}},n?o.default.createElement(o.default.Fragment,null,o.default.createElement(u.CopyableText,{value:e.action.name})," (IN PROGRESS - ",c.formatNumber(a,0)," / ",c.formatNumber(e.bladeburner.actionTimeToComplete,0),")"):o.default.createElement(u.CopyableText,{value:e.action.name})),n?o.default.createElement("p",{style:{display:"block"}},l.createProgressBarText({progress:a/e.bladeburner.actionTimeToComplete})):o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{onClick:function(){e.bladeburner.action.type=s.ActionTypes[e.action.name],e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("pre",{style:{display:"inline-block"}},"Time Required: ",c.convertTimeMsToTimeElapsedString(1e3*r),-1!==i&&o.default.createElement(o.default.Fragment,null,o.default.createElement("br",null),"Estimated success chance: ",c.formatNumber(100*i,1),"%")))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionList=void 0;const r=a(n(0)),i=n(1016),o=n(752);t.GeneralActionList=function(e){const t=[];for(const e in o.GeneralActions)o.GeneralActions.hasOwnProperty(e)&&t.push(o.GeneralActions[e]);return r.default.createElement(r.default.Fragment,null,t.map(t=>r.default.createElement("li",{key:t.name,className:"bladeburner-action"},r.default.createElement(i.GeneralActionElem,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActionPage=void 0;const o=i(n(0)),s=n(1017);t.GeneralActionPage=function(e){return o.createElement(o.Fragment,null,o.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way."),o.createElement(s.GeneralActionList,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AllPages=void 0;const o=i(n(0)),s=n(1018),l=n(1015),c=n(1012),u=n(1009),m=n(1006),p=n(410);t.AllPages=function(e){const[t,n]=o.useState("General"),a=o.useState(!1)[1];function r(e){return o.default.createElement("a",{onClick:()=>n(e.name),className:t!==e.name?"bladeburner-nav-button":"bladeburner-nav-button-inactive"},e.name)}return o.useEffect(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement(r,{name:"General"}),o.default.createElement(r,{name:"Contracts"}),o.default.createElement(r,{name:"Operations"}),o.default.createElement(r,{name:"BlackOps"}),o.default.createElement(r,{name:"Skills"}),o.default.createElement("div",{style:{display:"block",margin:"4px",padding:"4px"}},"General"===t&&o.default.createElement(s.GeneralActionPage,{bladeburner:e.bladeburner,player:e.player}),"Contracts"===t&&o.default.createElement(l.ContractPage,{bladeburner:e.bladeburner,player:e.player}),"Operations"===t&&o.default.createElement(c.OperationPage,{bladeburner:e.bladeburner,player:e.player}),"BlackOps"===t&&o.default.createElement(u.BlackOpPage,{bladeburner:e.bladeburner,player:e.player}),"Skills"===t&&o.default.createElement(m.SkillPage,{bladeburner:e.bladeburner})),o.default.createElement("span",{className:"text"},p.stealthIcon," = This action requires stealth, ",p.killIcon," = This action involves retirement"))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Console=void 0;const o=i(n(0));function s(e){return o.default.createElement("tr",null,o.default.createElement("td",{className:"bladeburner-console-line",style:{color:"var(--my-font-color)",whiteSpace:"pre-wrap"}},e.content))}t.Console=function(e){const t=o.useRef(null),n=o.useState(!1)[1],[a,r]=o.useState(e.bladeburner.consoleHistory.length);function i(){t.current&&(t.current.scrollTop=t.current.scrollHeight)}function l(){n(e=>!e)}return o.useEffect(()=>{const e=setInterval(l,1e3),t=setInterval(i,100);return()=>{clearInterval(e),clearInterval(t)}},[]),o.default.createElement("div",{ref:t,className:"bladeburner-console-div"},o.default.createElement("table",{className:"bladeburner-console-table"},o.default.createElement("tbody",null,e.bladeburner.consoleLogs.map((e,t)=>o.default.createElement(s,{key:t,content:e})),o.default.createElement("tr",{key:"input",id:"bladeburner-console-input-row",className:"bladeburner-console-input-row"},o.default.createElement("td",{className:"bladeburner-console-input-cell"},o.default.createElement("pre",null,"> "),o.default.createElement("input",{autoFocus:!0,className:"bladeburner-console-input",tabIndex:1,type:"text",onKeyDown:function(t){if(13===t.keyCode){t.preventDefault();const n=t.currentTarget.value;t.currentTarget.value="",n.length>0&&(e.bladeburner.postToConsole("> "+n),e.bladeburner.executeConsoleCommands(e.player,n),r(e.bladeburner.consoleHistory.length),l())}const n=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=a;const i=n.length;if(0===i)return;(e<0||e>i)&&r(i),0!==e&&(e-=1),r(e);const o=n[e];t.currentTarget.value=o}if(40===t.keyCode){const e=a,i=n.length;if(0==i)return;if((e<0||e>i)&&r(i),e==i||e==i-1)r(i),t.currentTarget.value="";else{r(a+1);const e=n[a+1];t.currentTarget.value=e}}}}))))))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TravelPopup=void 0;const r=a(n(0)),i=n(79),o=n(150);t.TravelPopup=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("p",null,"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise."),o.BladeburnerConstants.CityNames.map(t=>r.default.createElement("div",{key:t,className:"cmpy-mgmt-find-employee-option",onClick:()=>(function(t){e.bladeburner.city=t,i.removePopup(e.popupId)})(t)},t)))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=void 0;const o=i(n(0)),s=n(20),l=n(150),c=n(31),u=n(286),m=n(3),p=n(12),d=n(79),h=n(16),_=n(80),g=n(1021);t.Stats=function(e){const t=o.useState(!1)[1];return o.useEffect(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Rank: ",s.formatNumber(e.bladeburner.rank,2),o.default.createElement("span",{className:"tooltiptext"},"Your rank within the Bladeburner division.")),o.default.createElement("br",null),o.default.createElement("p",null,"Stamina: ",s.formatNumber(e.bladeburner.stamina,3)," / ",s.formatNumber(e.bladeburner.maxStamina,3)),o.default.createElement("div",{className:"help-tip",onClick:function(){p.dialogBoxCreate("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

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

Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}},"?"),o.default.createElement("br",null),o.default.createElement("p",null,"Stamina Penalty: ",s.formatNumber(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),o.default.createElement("br",null),o.default.createElement("p",null,"Team Size: ",s.formatNumber(e.bladeburner.teamSize,0)),o.default.createElement("p",null,"Team Members Lost: ",s.formatNumber(e.bladeburner.teamLost,0)),o.default.createElement("br",null),o.default.createElement("p",null,"Num Times Hospitalized: ",e.bladeburner.numHosp),o.default.createElement("p",null,"Money Lost From Hospitalizations: ",c.Money(e.bladeburner.moneyLost)),o.default.createElement("br",null),o.default.createElement("p",null,"Current City: ",e.bladeburner.city),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Population: ",m.numeralWrapper.formatPopulation(e.bladeburner.getCurrentCity().popEst),o.default.createElement("span",{className:"tooltiptext"},"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.")),o.default.createElement("div",{className:"help-tip",onClick:function(){p.dialogBoxCreate("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.

Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.

The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}},"?"),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Communities: ",s.formatNumber(e.bladeburner.getCurrentCity().comms,0),o.default.createElement("span",{className:"tooltiptext"},"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"City Chaos: ",s.formatNumber(e.bladeburner.getCurrentCity().chaos),o.default.createElement("span",{className:"tooltiptext"},"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",s.convertTimeMsToTimeElapsedString(e.bladeburner.storedCycles/l.BladeburnerConstants.CyclesPerSecond*1e3),o.default.createElement("br",null),o.default.createElement("span",{className:"tooltiptext"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")),o.default.createElement("p",null,"Skill Points: ",s.formatNumber(e.bladeburner.skillPoints,0)),o.default.createElement("br",null),u.StatsTable([["Aug. Success Chance mult: ",s.formatNumber(100*e.player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",s.formatNumber(100*e.player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",s.formatNumber(100*e.player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",s.formatNumber(100*e.player.bladeburner_analysis_mult,1)+"%"]]),o.default.createElement("br",null),o.default.createElement("a",{onClick:function(){const t="bladeburner-travel-popup";d.createPopup(t,g.TravelPopup,{bladeburner:e.bladeburner,popupId:t})},className:"a-link-button",style:{display:"inline-block"}},"Travel"),o.default.createElement("a",{onClick:function(){const t=h.Factions.Bladeburners;t.isMember?(e.engine.loadFactionContent(),_.displayFactionContent("Bladeburners")):e.bladeburner.rank>=l.BladeburnerConstants.RankNeededForFaction?(_.joinFaction(t),p.dialogBoxCreate("Congratulations! You were accepted into the Bladeburners faction")):p.dialogBoxCreate("You need a rank of 25 to join the Bladeburners Faction!")},className:"a-link-button tooltip",style:{display:"inline-block"}},o.default.createElement("span",{className:"tooltiptext"},"Apply to the Bladeburner Faction, or go to the faction page if you are already a member"),"Faction"),o.default.createElement("br",null),o.default.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TerritorySubpage=void 0;const r=a(n(0)),i=n(3),o=n(12),s=n(20),l=n(93);t.TerritorySubpage=function(e){function t(e){const t=100*e;return t<=0?s.formatNumber(0,2):t>=100?s.formatNumber(100,2):s.formatNumber(t,2)}const n=l.AllGangs[e.gang.facName].power,a=Object.keys(l.AllGangs).filter(t=>t!=e.gang.facName);return r.default.createElement("div",{style:{width:"70%"}},r.default.createElement("p",{className:"noselect"},"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.",r.default.createElement("br",null),r.default.createElement("br",null),"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.default.createElement("br",null),r.default.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.",r.default.createElement("br",null),r.default.createElement("br",null),"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.default.createElement("br",null),r.default.createElement("br",null)),r.default.createElement("input",{checked:e.gang.territoryWarfareEngaged,id:"warfare",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.territoryWarfareEngaged=t.target.checked}),r.default.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Engage in Territory Warfare",r.default.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"inline-block"}},"Territory Clash Chance: ",i.numeralWrapper.formatPercentage(e.gang.territoryClashChance,3)),r.default.createElement("div",{className:"help-tip noselect",style:{display:"inline-block"},onClick:function(){o.dialogBoxCreate("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}},"?"),r.default.createElement("br",null),r.default.createElement("input",{checked:e.gang.notifyMemberDeath,id:"notify",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.notifyMemberDeath=t.target.checked}),r.default.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Notify about Gang Member Deaths",r.default.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")),r.default.createElement("br",null),r.default.createElement("fieldset",{style:{display:"block",margin:"6px"}},r.default.createElement("p",null,r.default.createElement("b",null,r.default.createElement("u",null,e.gang.facName)),r.default.createElement("br",null),"Power: ",s.formatNumber(l.AllGangs[e.gang.facName].power,6),r.default.createElement("br",null),"Territory: ",t(l.AllGangs[e.gang.facName].territory),"%",r.default.createElement("br",null),r.default.createElement("br",null),a.map(e=>(function(e){const a=l.AllGangs[e].power,o=n/(a+n);return r.default.createElement("span",{key:e},r.default.createElement("u",null,e),r.default.createElement("br",null),"Power: ",s.formatNumber(a,6),r.default.createElement("br",null),"Territory: ",t(l.AllGangs[e].territory),"%",r.default.createElement("br",null),"Chance to win clash with this gang: ",i.numeralWrapper.formatPercentage(o,3),r.default.createElement("br",null),r.default.createElement("br",null))})(e)))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RecruitPopup=void 0;const o=i(n(0)),s=n(79),l=n(12);t.RecruitPopup=function(e){const[t,n]=o.useState("");function a(){""!==t?e.gang.canRecruitMember()?e.gang.recruitMember(t)?(e.onRecruit(),s.removePopup(e.popupId)):l.dialogBoxCreate("You already have a gang member with this name!"):l.dialogBoxCreate("You cannot recruit another Gang member!"):l.dialogBoxCreate("You must enter a name for your Gang member!")}function r(){s.removePopup(e.popupId)}return o.default.createElement(o.default.Fragment,null,o.default.createElement("p",{className:"noselect"},"Enter a name for your new Gang member:"),o.default.createElement("br",null),o.default.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&a(),27===e.keyCode&&r()},onChange:function(e){n(e.target.value)},className:"text-input noselect",type:"text",placeholder:"unique name"}),o.default.createElement("a",{className:"std-button",onClick:a},"Recruit Gang Member"),o.default.createElement("a",{className:"std-button",onClick:r},"Cancel"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RecruitButton=void 0;const r=a(n(0)),i=n(1024),o=n(703),s=n(20),l=n(79);t.RecruitButton=function(e){if(e.gang.members.length>=o.GangConstants.MaximumGangMembers)return r.default.createElement(r.default.Fragment,null);if(!e.gang.canRecruitMember()){const t=e.gang.getRespectNeededToRecruitMember();return r.default.createElement(r.default.Fragment,null,r.default.createElement("a",{className:"a-link-button-inactive",style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"),r.default.createElement("p",{style:{margin:"10px",color:"red",display:"inline-block"}},s.formatNumber(t,2)," respect needed to recruit next member"))}return r.default.createElement(r.default.Fragment,null,r.default.createElement("a",{className:"a-link-button",onClick:function(){const t="recruit-gang-member-popup";l.createPopup(t,i.RecruitPopup,{gang:e.gang,popupId:t,onRecruit:e.onRecruit})},style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDescription=void 0;const r=a(n(0)),i=n(300);t.TaskDescription=function(e){const t=i.GangMemberTasks[e.member.task],n=t?t.desc:i.GangMemberTasks.Unassigned.desc;return r.default.createElement("p",{className:"inline noselect",dangerouslySetInnerHTML:{__html:n}})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskSelector=void 0;const o=i(n(0)),s=n(3),l=n(286),c=n(125);t.TaskSelector=function(e){const[t,n]=o.useState(e.member.task),a=e.gang.getAllTaskNames(),r=[["Money:",c.MoneyRate(5*e.member.calculateMoneyGain(e.gang))],["Respect:",`${s.numeralWrapper.formatRespect(5*e.member.calculateRespectGain(e.gang))} / sec`],["Wanted Level:",`${s.numeralWrapper.formatWanted(5*e.member.calculateWantedLevelGain(e.gang))} / sec`],["Total Respect:",`${s.numeralWrapper.formatRespect(e.member.earnedRespect)}`]];return o.default.createElement(o.default.Fragment,null,o.default.createElement("select",{onChange:function(t){const a=t.target.value;e.member.assignToTask(a),n(a),e.onTaskChange()},className:"dropdown noselect",value:t},o.default.createElement("option",{key:0,value:"---"},"---"),a.map((e,t)=>o.default.createElement("option",{key:t+1,value:e},e))),o.default.createElement("div",null,l.StatsTable(r)))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AscensionPopup=void 0;const o=i(n(0)),s=n(3),l=n(79),c=n(12);t.AscensionPopup=function(e){const t=o.useState(!1)[1];o.useEffect(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const n=e.member.getAscensionResults();return o.default.createElement(o.default.Fragment,null,o.default.createElement("pre",null,"Are you sure you want to ascend this member? They will lose all of",o.default.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",o.default.createElement("br",null),o.default.createElement("br",null),"Furthermore, your gang will lose ",s.numeralWrapper.formatRespect(e.member.earnedRespect)," respect",o.default.createElement("br",null),o.default.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",o.default.createElement("br",null),"Hacking: x",s.numeralWrapper.format(n.hack,"0.000"),o.default.createElement("br",null),"Strength: x",s.numeralWrapper.format(n.str,"0.000"),o.default.createElement("br",null),"Defense: x",s.numeralWrapper.format(n.def,"0.000"),o.default.createElement("br",null),"Dexterity: x",s.numeralWrapper.format(n.dex,"0.000"),o.default.createElement("br",null),"Agility: x",s.numeralWrapper.format(n.agi,"0.000"),o.default.createElement("br",null),"Charisma: x",s.numeralWrapper.format(n.cha,"0.000"),o.default.createElement("br",null)),o.default.createElement("button",{className:"std-button",onClick:function(){e.onAscend();const t=e.gang.ascendMember(e.member);c.dialogBoxCreate(o.default.createElement("p",null,"You ascended ",e.member.name,"!",o.default.createElement("br",null),o.default.createElement("br",null),"Your gang lost ",s.numeralWrapper.formatRespect(t.respect)," respect.",o.default.createElement("br",null),o.default.createElement("br",null),e.member.name," gained the following stat multipliers for ascending:",o.default.createElement("br",null),"Hacking: x",s.numeralWrapper.format(t.hack,"0.000"),o.default.createElement("br",null),"Strength: x",s.numeralWrapper.format(t.str,"0.000"),o.default.createElement("br",null),"Defense: x",s.numeralWrapper.format(t.def,"0.000"),o.default.createElement("br",null),"Dexterity: x",s.numeralWrapper.format(t.dex,"0.000"),o.default.createElement("br",null),"Agility: x",s.numeralWrapper.format(t.agi,"0.000"),o.default.createElement("br",null),"Charisma: x",s.numeralWrapper.format(t.cha,"0.000"),o.default.createElement("br",null))),l.removePopup(e.popupId)}},"Ascend"),o.default.createElement("button",{className:"std-button",onClick:function(){l.removePopup(e.popupId)}},"Cancel"))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberStats=void 0;const r=a(n(0)),i=n(12),o=n(20),s=n(3),l=n(79),c=n(1028);t.GangMemberStats=function(e){const t={hack:e.member.calculateAscensionMult(e.member.hack_asc_points),str:e.member.calculateAscensionMult(e.member.str_asc_points),def:e.member.calculateAscensionMult(e.member.def_asc_points),dex:e.member.calculateAscensionMult(e.member.dex_asc_points),agi:e.member.calculateAscensionMult(e.member.agi_asc_points),cha:e.member.calculateAscensionMult(e.member.cha_asc_points)};return r.default.createElement(r.default.Fragment,null,r.default.createElement("span",{className:"tooltiptext smallfont"},"Hk: x",s.numeralWrapper.formatMultiplier(e.member.hack_mult*t.hack),"(x",s.numeralWrapper.formatMultiplier(e.member.hack_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.hack)," Asc)",r.default.createElement("br",null),"St: x",s.numeralWrapper.formatMultiplier(e.member.str_mult*t.str),"(x",s.numeralWrapper.formatMultiplier(e.member.str_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.str)," Asc)",r.default.createElement("br",null),"Df: x",s.numeralWrapper.formatMultiplier(e.member.def_mult*t.def),"(x",s.numeralWrapper.formatMultiplier(e.member.def_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.def)," Asc)",r.default.createElement("br",null),"Dx: x",s.numeralWrapper.formatMultiplier(e.member.dex_mult*t.dex),"(x",s.numeralWrapper.formatMultiplier(e.member.dex_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.dex)," Asc)",r.default.createElement("br",null),"Ag: x",s.numeralWrapper.formatMultiplier(e.member.agi_mult*t.agi),"(x",s.numeralWrapper.formatMultiplier(e.member.agi_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.agi)," Asc)",r.default.createElement("br",null),"Ch: x",s.numeralWrapper.formatMultiplier(e.member.cha_mult*t.cha),"(x",s.numeralWrapper.formatMultiplier(e.member.cha_mult)," Eq, x",s.numeralWrapper.formatMultiplier(t.cha)," Asc)"),r.default.createElement("pre",null,"Hacking: ",o.formatNumber(e.member.hack,0)," (",s.numeralWrapper.formatExp(e.member.hack_exp)," exp)",r.default.createElement("br",null),"Strength: ",o.formatNumber(e.member.str,0)," (",s.numeralWrapper.formatExp(e.member.str_exp)," exp)",r.default.createElement("br",null),"Defense: ",o.formatNumber(e.member.def,0)," (",s.numeralWrapper.formatExp(e.member.def_exp)," exp)",r.default.createElement("br",null),"Dexterity: ",o.formatNumber(e.member.dex,0)," (",s.numeralWrapper.formatExp(e.member.dex_exp)," exp)",r.default.createElement("br",null),"Agility: ",o.formatNumber(e.member.agi,0)," (",s.numeralWrapper.formatExp(e.member.agi_exp)," exp)",r.default.createElement("br",null),"Charisma: ",o.formatNumber(e.member.cha,0)," (",s.numeralWrapper.formatExp(e.member.cha_exp)," exp)",r.default.createElement("br",null)),r.default.createElement("br",null),e.member.canAscend()&&r.default.createElement(r.default.Fragment,null,r.default.createElement("button",{className:"accordion-button noselect",onClick:function(){const t=`gang-management-ascend-member ${e.member.name}`;l.createPopup(t,c.AscensionPopup,{member:e.member,gang:e.gang,popupId:t,onAscend:e.onAscend})}},"Ascend"),r.default.createElement("div",{className:"help-tip noselect",style:{marginTop:"5px"},onClick:function(){i.dialogBoxCreate(r.default.createElement(r.default.Fragment,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.default.createElement("br",null),r.default.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.default.createElement("br",null),r.default.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))}},"?")))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberAccordionContent=void 0;const o=i(n(0)),s=n(1029),l=n(1027),c=n(1026);t.GangMemberAccordionContent=function(e){const t=o.useState(!1)[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"gang-member-info-div tooltip"},o.default.createElement(s.GangMemberStats,{onAscend:()=>t(e=>!e),gang:e.gang,member:e.member})),o.default.createElement("div",{className:"gang-member-info-div"},o.default.createElement(l.TaskSelector,{onTaskChange:()=>t(e=>!e),gang:e.gang,member:e.member})),o.default.createElement("div",{className:"gang-member-info-div"},o.default.createElement(c.TaskDescription,{member:e.member})))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberAccordion=void 0;const r=a(n(0)),i=n(167),o=n(1030);t.GangMemberAccordion=function(e){return r.default.createElement(i.Accordion,{panelInitiallyOpened:!0,headerContent:r.default.createElement(r.default.Fragment,null,e.member.name),panelContent:r.default.createElement(o.GangMemberAccordionContent,{gang:e.gang,member:e.member})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgradePopup=void 0;const o=i(n(0)),s=n(20),l=n(3),c=n(183),u=n(31),m=n(79),p=n(506);function d(e){const t=o.useState(!1)[1];function n(t,n){return Object.keys(c.GangMemberUpgrades).filter(a=>{const r=c.GangMemberUpgrades[a];return!e.player.money.lt(e.gang.getUpgradeCost(r))&&(r.type===n&&!t.includes(a))}).map(e=>c.GangMemberUpgrades[e])}const a=n(e.member.upgrades,p.UpgradeType.Weapon),r=n(e.member.upgrades,p.UpgradeType.Armor),i=n(e.member.upgrades,p.UpgradeType.Vehicle),l=n(e.member.upgrades,p.UpgradeType.Rootkit),m=n(e.member.augmentations,p.UpgradeType.Augmentation);function d(e){const t=c.GangMemberUpgrades[e];return o.default.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},t.name,o.default.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:t.desc}}))}function h(n,a=!1){return o.default.createElement("a",{key:n.name,className:"a-link-button tooltip",style:{margin:"2px",padding:"2px",display:"block",fontSize:"11px"},onClick:function(){e.member.buyUpgrade(n,e.player,e.gang),t(e=>!e)}},n.name," - ",u.Money(e.gang.getUpgradeCost(n)),o.default.createElement("span",{className:a?"tooltiptextleft":"tooltiptext",dangerouslySetInnerHTML:{__html:n.desc}}))}const _=e.member.calculateAscensionMult(e.member.hack_asc_points),g=e.member.calculateAscensionMult(e.member.str_asc_points),f=e.member.calculateAscensionMult(e.member.def_asc_points),y=e.member.calculateAscensionMult(e.member.dex_asc_points),b=e.member.calculateAscensionMult(e.member.agi_asc_points),E=e.member.calculateAscensionMult(e.member.cha_asc_points);return o.default.createElement("div",{style:{border:"1px solid white"}},o.default.createElement("h1",null,e.member.name,"(",e.member.task,")"),o.default.createElement("pre",{style:{fontSize:"14px",display:"inline-block",width:"20%"}},"Hack: ",e.member.hack," (x",s.formatNumber(e.member.hack_mult*_,2),")",o.default.createElement("br",null),"Str: ",e.member.str," (x",s.formatNumber(e.member.str_mult*g,2),")",o.default.createElement("br",null),"Def: ",e.member.def," (x",s.formatNumber(e.member.def_mult*f,2),")",o.default.createElement("br",null),"Dex: ",e.member.dex," (x",s.formatNumber(e.member.dex_mult*y,2),")",o.default.createElement("br",null),"Agi: ",e.member.agi," (x",s.formatNumber(e.member.agi_mult*b,2),")",o.default.createElement("br",null),"Cha: ",e.member.cha," (x",s.formatNumber(e.member.cha_mult*E,2),")"),o.default.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades: ",e.member.upgrades.map(e=>d(e)),e.member.augmentations.map(e=>d(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Weapons"),a.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Armor"),r.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Vehicles"),i.map(e=>h(e))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Rootkits"),l.map(e=>h(e,!0))),o.default.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},o.default.createElement("h2",null,"Augmentations"),m.map(e=>h(e,!0))))}t.GangMemberUpgradePopup=function(e){const t=o.useState(!1)[1],[n,a]=o.useState("");function r(t){27===t.keyCode&&m.removePopup(e.popupId)}return o.useEffect(()=>{window.addEventListener("keydown",r);const e=setInterval(()=>t(e=>!e),1e3);return()=>{clearInterval(e),window.removeEventListener("keydown",r)}},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("input",{className:"text-input noselect",value:n,placeholder:"Filter gang member",onChange:e=>a(e.target.value)}),o.default.createElement("p",{className:"tooltip",style:{marginLeft:"6px",display:"inline-block"}},"Discount: -",l.numeralWrapper.formatPercentage(1-1/e.gang.getDiscount()),o.default.createElement("span",{className:"tooltiptext noselect"},"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")),e.gang.members.map(t=>o.default.createElement(d,{key:t.name,player:e.player,gang:e.gang,member:t})))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberList=void 0;const o=i(n(0)),s=n(1032),l=n(1031),c=n(79),u=n(1025);t.GangMemberList=function(e){const[t,n]=o.useState(""),a=o.useState(!1)[1],r=e.gang.members.filter(e=>e.name.indexOf(t)>-1||e.task.indexOf(t)>-1);return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.RecruitButton,{onRecruit:()=>a(e=>!e),gang:e.gang}),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input noselect",placeholder:"Filter gang member",style:{margin:"5px",padding:"5px"},value:t,onChange:function(e){n(e.target.value)}}),o.default.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){c.createPopup("gang-upgrade-popup",s.GangMemberUpgradePopup,{gang:e.gang,player:e.player,popupId:"gang-upgrade-popup"})}},"Manage Equipment"),o.default.createElement("ul",null,r.map(t=>o.default.createElement("li",{key:t.name},o.default.createElement(l.GangMemberAccordion,{gang:e.gang,member:t})))))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BonusTime=void 0;const o=i(n(0)),s=n(11),l=n(20);t.BonusTime=function(e){const t=1e3/s.CONSTANTS._idleSpeed;if(e.gang.storedCycles/t*1e3<=5e3)return o.createElement(o.Fragment,null);const n=e.gang.storedCycles/t*1e3;return o.createElement(o.Fragment,null,o.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",l.convertTimeMsToTimeElapsedString(n),o.createElement("span",{className:"tooltiptext noselect"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")),o.createElement("br",null))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GangStats=void 0;const r=a(n(0)),i=n(16),o=n(20),s=n(3),l=n(125),c=n(67),u=n(93),m=n(1034);t.GangStats=function(e){const t=100*u.AllGangs[e.gang.facName].territory;let n;return n=t<=0?o.formatNumber(0,2):t>=100?o.formatNumber(100,2):o.formatNumber(t,2),r.default.createElement(r.default.Fragment,null,r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Respect: ",s.numeralWrapper.formatRespect(e.gang.respect)," (",s.numeralWrapper.formatRespect(5*e.gang.respectGainRate)," / sec)",r.default.createElement("span",{className:"tooltiptext"},"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.")),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level: ",s.numeralWrapper.formatWanted(e.gang.wanted)," (",s.numeralWrapper.formatWanted(5*e.gang.wantedGainRate)," / sec)",r.default.createElement("span",{className:"tooltiptext"},"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.")),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level Penalty: -",o.formatNumber(100*(1-e.gang.getWantedPenalty()),2),"%",r.default.createElement("span",{className:"tooltiptext"},"Penalty for respect and money gain rates due to Wanted Level")),r.default.createElement("br",null),r.default.createElement("div",null,r.default.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",l.MoneyRate(5*e.gang.moneyGainRate))),r.default.createElement("br",null),r.default.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Territory: ",n,"%",r.default.createElement("span",{className:"tooltiptext"},"The percentage of total territory your Gang controls")),r.default.createElement("br",null),r.default.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",c.Reputation(i.Factions[e.gang.facName].playerReputation)),r.default.createElement("br",null),r.default.createElement(m.BonusTime,{gang:e.gang}))}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagementSubpage=void 0;const r=a(n(0)),i=n(1035),o=n(1033);t.ManagementSubpage=function(e){return r.default.createElement("div",{style:{display:"block"}},r.default.createElement("p",{className:"noselect",style:{width:"70%"}},"This page is used to manage your gang members and get an overview of your gang's stats.",r.default.createElement("br",null),r.default.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",e.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.default.createElement("br",null),r.default.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.default.createElement("br",null),r.default.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.default.createElement("br",null),r.default.createElement(i.GangStats,{gang:e.gang}),r.default.createElement("br",null),r.default.createElement(o.GangMemberList,{gang:e.gang,player:e.player}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Root=void 0;const o=i(n(0)),s=n(1036),l=n(1023),c=n(80);t.Root=function(e){const[t,n]=o.useState(!0),a=o.useState(!1)[1];return o.useEffect(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){e.engine.loadFactionContent(),c.displayFactionContent(e.gang.facName)}},"Back"),o.default.createElement("a",{className:t?"a-link-button-inactive":"a-link-button",style:{display:"inline-block"},onClick:()=>n(!0)},"Gang Management"),o.default.createElement("a",{className:t?"a-link-button":"a-link-button-inactive",style:{display:"inline-block"},onClick:()=>n(!1)},"Gang Territory"),t?o.default.createElement(s.ManagementSubpage,{gang:e.gang,player:e.player}):o.default.createElement(l.TerritorySubpage,{gang:e.gang}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchasedAugmentations=void 0;const o=i(n(0)),s=n(14),l=n(4),c=n(1),u=n(667);t.PurchasedAugmentations=function(){const e=[];let t=-1;for(let e=c.Player.queuedAugmentations.length-1;e>=0;e--)if(c.Player.queuedAugmentations[e].name===l.AugmentationNames.NeuroFluxGovernor){t=e;break}for(let n=0;no.createElement("tr",{key:e[0]},o.createElement("td",{key:"0"},o.createElement("span",null,e[0]," multiplier: ")),o.createElement("td",{key:"1",style:{textAlign:"right"}},l.numeralWrapper.formatPercentage(e[1])),function(e){let t=[];return e&&(t=[o.createElement("td",{key:"2"}," ","=>"," "),o.createElement("td",{key:"3"},l.numeralWrapper.formatPercentage(e))]),t}(e[2])))))}return o.createElement(o.Fragment,null,o.createElement("p",null,o.createElement("strong",null,o.createElement("u",null,"Multipliers:"))),o.createElement("br",null),t([["Hacking Chance ",s.Player.hacking_chance_mult,s.Player.hacking_chance_mult*e.hacking_chance_mult],["Hacking Speed ",s.Player.hacking_speed_mult,s.Player.hacking_speed_mult*e.hacking_speed_mult],["Hacking Money ",s.Player.hacking_money_mult,s.Player.hacking_money_mult*e.hacking_money_mult],["Hacking Growth ",s.Player.hacking_grow_mult,s.Player.hacking_grow_mult*e.hacking_grow_mult]]),o.createElement("br",null),t([["Hacking Level ",s.Player.hacking_mult,s.Player.hacking_mult*e.hacking_mult],["Hacking Experience ",s.Player.hacking_exp_mult,s.Player.hacking_exp_mult*e.hacking_exp_mult]]),o.createElement("br",null),t([["Strength Level ",s.Player.strength_mult,s.Player.strength_mult*e.strength_mult],["Strength Experience ",s.Player.strength_exp_mult,s.Player.strength_exp_mult*e.strength_exp_mult]]),o.createElement("br",null),t([["Defense Level ",s.Player.defense_mult,s.Player.defense_mult*e.defense_mult],["Defense Experience ",s.Player.defense_exp_mult,s.Player.defense_exp_mult*e.defense_exp_mult]]),o.createElement("br",null),t([["Dexterity Level ",s.Player.dexterity_mult,s.Player.dexterity_mult*e.dexterity_mult],["Dexterity Experience ",s.Player.dexterity_exp_mult,s.Player.dexterity_exp_mult*e.dexterity_exp_mult]]),o.createElement("br",null),t([["Agility Level ",s.Player.agility_mult,s.Player.agility_mult*e.agility_mult],["Agility Experience ",s.Player.agility_exp_mult,s.Player.agility_exp_mult*e.agility_exp_mult]]),o.createElement("br",null),t([["Charisma Level ",s.Player.charisma_mult,s.Player.charisma_mult*e.charisma_mult],["Charisma Experience ",s.Player.charisma_exp_mult,s.Player.charisma_exp_mult*e.charisma_exp_mult]]),o.createElement("br",null),t([["Hacknet Node production ",s.Player.hacknet_node_money_mult,s.Player.hacknet_node_money_mult*e.hacknet_node_money_mult],["Hacknet Node purchase cost ",s.Player.hacknet_node_purchase_cost_mult,s.Player.hacknet_node_purchase_cost_mult*e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost ",s.Player.hacknet_node_ram_cost_mult,s.Player.hacknet_node_ram_cost_mult*e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost ",s.Player.hacknet_node_core_cost_mult,s.Player.hacknet_node_core_cost_mult*e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost ",s.Player.hacknet_node_level_cost_mult,s.Player.hacknet_node_level_cost_mult*e.hacknet_node_level_cost_mult]]),o.createElement("br",null),t([["Company reputation gain ",s.Player.company_rep_mult,s.Player.company_rep_mult*e.company_rep_mult],["Faction reputation gain ",s.Player.faction_rep_mult,s.Player.faction_rep_mult*e.faction_rep_mult],["Salary ",s.Player.work_money_mult,s.Player.work_money_mult*e.work_money_mult]]),o.createElement("br",null),t([["Crime success ",s.Player.crime_success_mult,s.Player.crime_success_mult*e.crime_success_mult],["Crime money ",s.Player.crime_money_mult,s.Player.crime_money_mult*e.crime_money_mult]]),o.createElement("br",null),o.createElement(function(){return s.Player.canAccessBladeburner()?o.createElement(o.Fragment,null,t([["Bladeburner Success Chance",s.Player.bladeburner_success_chance_mult,s.Player.bladeburner_success_chance_mult*e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",s.Player.bladeburner_max_stamina_mult,s.Player.bladeburner_max_stamina_mult*e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",s.Player.bladeburner_stamina_gain_mult,s.Player.bladeburner_stamina_gain_mult*e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",s.Player.bladeburner_analysis_mult,s.Player.bladeburner_analysis_mult*e.bladeburner_analysis_mult]]),o.createElement("br",null)):o.createElement(o.Fragment,null)},null))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFileMinus1=void 0;const o=i(n(0)),s=n(1),l=n(175),c=n(167);t.SourceFileMinus1=function(){const e=s.Player.exploits;return 0===e.length?o.createElement(o.Fragment,null):o.createElement("li",{key:-1},o.createElement(c.Accordion,{headerContent:o.createElement(o.Fragment,null,"Source-File -1: Exploits in the BitNodes",o.createElement("br",null),"Level ",e.length," / ?"),panelContent:o.createElement(o.Fragment,null,o.createElement("p",null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),o.createElement("p",null,"It increases all of the player's multipliers by 0.1%"),o.createElement("br",null),o.createElement("p",null,"You have found the following exploits:"),o.createElement("ul",null,e.map(e=>o.createElement("li",{key:e},"* ",l.ExploitName(e)))))}))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFileAccordion=void 0;const o=i(n(0)),s=n(167);t.SourceFileAccordion=function(e){const t=12===e.sf.n?"∞":"3";return o.createElement(s.Accordion,{headerContent:o.createElement(o.Fragment,null,e.sf.name,o.createElement("br",null),`Level ${e.level} / ${t}`),panelContent:o.createElement("p",{dangerouslySetInnerHTML:{__html:e.sf.info}})})}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedSourceFiles=void 0;const o=i(n(0)),s=n(1),l=n(26),c=n(233),u=n(236),m=n(1041);t.OwnedSourceFiles=function(){const e=s.Player.sourceFiles.slice();l.Settings.OwnedAugmentationsOrder===c.OwnedAugmentationsOrderSetting.Alphabetically&&e.sort((e,t)=>e.n-t.n);const t=e.map(e=>{const t="SourceFile"+e.n,n=u.SourceFiles[t];return null==n?(console.error(`Invalid source file number: ${e.n}`),null):o.createElement("li",{key:e.n},o.createElement(m.SourceFileAccordion,{level:e.lvl,sf:n}))});return o.createElement(o.Fragment,null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ListConfiguration=void 0;const o=i(n(0)),s=n(63);t.ListConfiguration=function(e){return o.createElement(o.Fragment,null,o.createElement(s.StdButton,{onClick:e.expandAllButtonsFn,text:"Expand All"}),o.createElement(s.StdButton,{onClick:e.collapseAllButtonsFn,text:"Collapse All"}),o.createElement(s.StdButton,{onClick:e.sortInOrderFn,text:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source-Files in numeral order"}),o.createElement(s.StdButton,{onClick:e.sortByAcquirementTimeFn,text:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationsMetadata=void 0;const a=n(38),r=n(47),i=n(497);t.LocationsMetadata=[{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.LocationName.AevumAeroCorp,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.LocationName.AevumBachmanAndAssociates,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.LocationName.AevumClarkeIncorporated,types:[i.LocationType.Company]},{city:a.CityName.Aevum,costMult:3,expMult:2,name:r.LocationName.AevumCrushFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.LocationName.AevumECorp,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.LocationName.AevumFulcrumTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.LocationName.AevumGalacticCybersystems,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.LocationName.AevumNetLinkTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.LocationName.AevumPolice,types:[i.LocationType.Company]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.LocationName.AevumRhoConstruction,types:[i.LocationType.Company]},{city:a.CityName.Aevum,costMult:10,expMult:5,name:r.LocationName.AevumSnapFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Aevum,costMult:4,expMult:3,name:r.LocationName.AevumSummitUniversity,types:[i.LocationType.University]},{city:a.CityName.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.LocationName.AevumWatchdogSecurity,types:[i.LocationType.Company]},{city:a.CityName.Aevum,name:r.LocationName.AevumCasino,types:[i.LocationType.Casino]},{city:a.CityName.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.LocationName.ChongqingKuaiGongInternational,types:[i.LocationType.Company]},{city:a.CityName.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.LocationName.ChongqingSolarisSpaceSystems,types:[i.LocationType.Company]},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.LocationName.IshimaNovaMedical,types:[i.LocationType.Company]},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.LocationName.IshimaOmegaSoftware,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:a.CityName.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.LocationName.IshimaStormTechnologies,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.LocationName.NewTokyoDefComm,types:[i.LocationType.Company]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.LocationName.NewTokyoGlobalPharmaceuticals,types:[i.LocationType.Company]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.LocationName.NewTokyoNoodleBar,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.LocationName.NewTokyoVitaLife,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.LocationName.Sector12AlphaEnterprises,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.LocationName.Sector12BladeIndustries,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12CIA,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.LocationName.Sector12CarmichaelSecurity,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12CityHall,types:[i.LocationType.Special]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.LocationName.Sector12DeltaOne,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12FoodNStuff,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.LocationName.Sector12FourSigma,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.LocationName.Sector12IcarusMicrosystems,types:[i.LocationType.Company]},{city:a.CityName.Sector12,expMult:1,costMult:1,name:r.LocationName.Sector12IronGym,types:[i.LocationType.Gym]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.LocationName.Sector12JoesGuns,types:[i.LocationType.Company]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.LocationName.Sector12MegaCorp,types:[i.LocationType.Company]},{city:a.CityName.Sector12,name:r.LocationName.Sector12NSA,types:[i.LocationType.Company,i.LocationType.Special]},{city:a.CityName.Sector12,costMult:20,expMult:10,name:r.LocationName.Sector12PowerhouseGym,types:[i.LocationType.Gym]},{city:a.CityName.Sector12,costMult:3,expMult:2,name:r.LocationName.Sector12RothmanUniversity,types:[i.LocationType.University]},{city:a.CityName.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.LocationName.Sector12UniversalEnergy,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.LocationName.VolhavenCompuTek,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.LocationName.VolhavenHeliosLabs,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.LocationName.VolhavenLexoCorp,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,costMult:7,expMult:4,name:r.LocationName.VolhavenMilleniumFitnessGym,types:[i.LocationType.Gym]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.LocationName.VolhavenNWO,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.LocationName.VolhavenOmniTekIncorporated,types:[i.LocationType.Company,i.LocationType.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.LocationName.VolhavenOmniaCybersystems,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.LocationName.VolhavenSysCoreSecurities,types:[i.LocationType.Company]},{city:a.CityName.Volhaven,costMult:5,expMult:4,name:r.LocationName.VolhavenZBInstituteOfTechnology,types:[i.LocationType.University]},{city:null,name:r.LocationName.Hospital,types:[i.LocationType.Hospital]},{city:null,name:r.LocationName.Slums,types:[i.LocationType.Slums]},{city:null,name:r.LocationName.TravelAgency,types:[i.LocationType.TravelAgency]},{city:null,name:r.LocationName.WorldStockExchange,types:[i.LocationType.StockMarket]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Location=void 0;const a=n(47);t.Location=class{constructor(e){this.city=null,this.costMult=0,this.expMult=0,this.name=a.LocationName.Void,this.types=[],this.techVendorMaxRam=0,this.techVendorMinRam=0,e.city&&(this.city=e.city),e.costMult&&(this.costMult=e.costMult),e.expMult&&(this.expMult=e.expMult),e.infiltrationData&&(this.infiltrationData=e.infiltrationData),e.name&&(this.name=e.name),e.types&&(this.types=e.types),e.techVendorMaxRam&&(this.techVendorMaxRam=e.techVendorMaxRam),e.techVendorMinRam&&(this.techVendorMinRam=e.techVendorMinRam)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=void 0;t.City=class{constructor(e,t=[],n=""){this.name=e,this.locations=t,this.asciiArt=n}addLocation(e){this.locations.push(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFile=void 0;const a=n(133);t.SourceFile=class{constructor(e,t=""){this.lvl=1,this.owned=!1;const n="BitNode"+e,r=a.BitNodes[n];if(null==r)throw new Error("Invalid Bit Node for this Source File");this.n=e,this.name=`Source-File ${e}: ${r.name}`,this.info=t}}},,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=void 0;const o=i(n(0)),s=n(507),l={border:"1px solid red",display:"inline-block",margin:"4px",padding:"4px"};t.ErrorBoundary=class extends o.Component{constructor(e){super(e),this.state={errorInfo:"",hasError:!1}}componentDidCatch(e,t){console.error("Caught error in React ErrorBoundary. Component stack:"),console.error(t.componentStack)}componentDidMount(){const e=()=>{this.setState({hasError:!1})};this.hasEventEmitter()&&this.props.eventEmitterForReset.addSubscriber({cb:e,id:this.props.id})}componentWillUnmount(){this.hasEventEmitter()&&this.props.eventEmitterForReset.removeSubscriber(this.props.id)}hasEventEmitter(){return null!=this.props.eventEmitterForReset&&this.props.eventEmitterForReset instanceof s.EventEmitter&&null!=this.props.id&&"string"==typeof this.props.id}render(){return this.state.hasError?o.createElement("div",{style:l},o.createElement("p",null,"Error rendering UI. This is (probably) a bug. Please report to game developer."),o.createElement("p",null,"In the meantime, try refreshing the game WITHOUT saving."),o.createElement("p",null,`Error info: ${this.state.errorInfo}`)):this.props.children}static getDerivedStateFromError(e){return{errorInfo:e.message,hasError:!0}}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickersConfig=t.TickerDisplayMode=void 0;const o=i(n(0)),s=n(63);var l;!function(e){e[e.AllStocks=0]="AllStocks",e[e.Portfolio=1]="Portfolio"}(l=t.TickerDisplayMode||(t.TickerDisplayMode={}));t.StockTickersConfig=class extends o.Component{constructor(e){super(e)}renderDisplayModeButton(){let e="",t="";return this.props.tickerDisplayMode===l.Portfolio?(e="Switch to 'All Stocks' Mode",t="Displays all stocks on the WSE"):(e="Switch to 'Portfolio' Mode",t="Displays only the stocks for which you have shares or orders"),o.createElement(s.StdButton,{onClick:this.props.changeDisplayMode,text:e,tooltip:t})}render(){return o.createElement("div",null,this.renderDisplayModeButton(),o.createElement(s.StdButton,{onClick:this.props.expandAllTickers,text:"Expand Tickers"}),o.createElement(s.StdButton,{onClick:this.props.collapseAllTickers,text:"Collapse Tickers"}),o.createElement("input",{className:"text-input",id:"stock-market-watchlist-filter",onChange:this.props.changeWatchlistFilter,placeholder:"Filter Stocks by symbol (comma-separated list)",type:"text"}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerTxButton=void 0;const o=i(n(0));t.StockTickerTxButton=function(e){let t="stock-market-input std-button";return null!=e.tooltip&&(t+=" tooltip"),o.createElement("button",{className:t,onClick:e.onClick},e.text,null!=e.tooltip&&o.createElement("span",{className:"tooltiptext"},e.tooltip))}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerPositionText=void 0;const o=i(n(0)),s=n(3),l=n(31),c=n(43),u={display:"block"};t.StockTickerPositionText=class extends o.Component{renderLongPosition(){const e=this.props.stock,t=e.playerShares*e.playerAvgPx,n=(e.getBidPrice()-e.playerAvgPx)*e.playerShares;let a=n/t;return isNaN(a)&&(a=0),o.createElement("div",null,o.createElement("h3",{className:"tooltip"},"Long Position:",o.createElement("span",{className:"tooltiptext"},"Shares in the long position will increase in value if the price of the corresponding stock increases")),o.createElement("br",null),o.createElement("p",null,"Shares: ",s.numeralWrapper.formatShares(e.playerShares)),o.createElement("br",null),o.createElement("p",null,"Average Price: ",l.Money(e.playerAvgPx)," (Total Cost: ",l.Money(t),")"),o.createElement("br",null),o.createElement("p",null,"Profit: ",l.Money(n)," (",s.numeralWrapper.formatPercentage(a),")"),o.createElement("br",null))}renderShortPosition(){const e=this.props.stock,t=e.playerShortShares*e.playerAvgShortPx,n=(e.playerAvgShortPx-e.getAskPrice())*e.playerShortShares;let a=n/t;return isNaN(a)&&(a=0),8===this.props.p.bitNodeN||c.SourceFileFlags[8]>=2?o.createElement("div",null,o.createElement("h3",{className:"tooltip"},"Short Position:",o.createElement("span",{className:"tooltiptext"},"Shares in the short position will increase in value if the price of the corresponding stock decreases")),o.createElement("br",null),o.createElement("p",null,"Shares: ",s.numeralWrapper.formatShares(e.playerShortShares)),o.createElement("br",null),o.createElement("p",null,"Average Price: ",l.Money(e.playerAvgShortPx)," (Total Cost: ",l.Money(t),")"),o.createElement("br",null),o.createElement("p",null,"Profit: ",l.Money(n)," (",s.numeralWrapper.formatPercentage(a),")"),o.createElement("br",null)):null}render(){const e=this.props.stock;return o.createElement("div",{className:"stock-market-position-text"},o.createElement("p",{style:u},"Max Shares: ",s.numeralWrapper.formatShares(e.maxShares)),o.createElement("p",{className:"tooltip"},"Ask Price: ",l.Money(e.getAskPrice()),o.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),o.createElement("br",null),o.createElement("p",{className:"tooltip"},"Bid Price: ",l.Money(e.getBidPrice()),o.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),this.renderLongPosition(),this.renderShortPosition())}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerOrder=void 0;const o=i(n(0)),s=n(103),l=n(3),c=n(31);t.StockTickerOrder=class extends o.Component{constructor(e){super(e),this.handleCancelOrderClick=this.handleCancelOrderClick.bind(this)}handleCancelOrderClick(){this.props.cancelOrder({order:this.props.order})}render(){const e=this.props.order,t=e.pos===s.PositionTypes.Long?"Long Position":"Short Position",n=o.createElement(o.Fragment,null,e.type," - ",t," - ",l.numeralWrapper.formatShares(e.shares)," @ ",c.Money(e.price));return o.createElement("li",null,n,o.createElement("button",{className:"std-button stock-market-order-cancel-btn",onClick:this.handleCancelOrderClick},"Cancel Order"))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickerOrderList=void 0;const o=i(n(0)),s=n(1065);t.StockTickerOrderList=class extends o.Component{render(){const e=[];for(let t=0;tt.price&&(p.color="red"),o.createElement("pre",{style:p},m)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTicker=void 0;const o=i(n(0)),s=n(1068),l=n(1066),c=n(1064),u=n(1063),m=n(304),p=n(115),d=n(103),h=n(43),_=n(3),g=n(167),f=n(31),y=n(12),b=n(54);var E;!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(E||(E={}));t.StockTicker=class extends o.Component{constructor(e){super(e),this.state={orderType:E.Market,position:d.PositionTypes.Long,qty:""},this.getBuyTransactionCostContent=this.getBuyTransactionCostContent.bind(this),this.getSellTransactionCostContent=this.getSellTransactionCostContent.bind(this),this.handleBuyButtonClick=this.handleBuyButtonClick.bind(this),this.handleBuyMaxButtonClick=this.handleBuyMaxButtonClick.bind(this),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.handleOrderTypeChange=this.handleOrderTypeChange.bind(this),this.handlePositionTypeChange=this.handlePositionTypeChange.bind(this),this.handleQuantityChange=this.handleQuantityChange.bind(this),this.handleSellButtonClick=this.handleSellButtonClick.bind(this),this.handleSellAllButtonClick=this.handleSellAllButtonClick.bind(this)}createPlaceOrderPopupBox(e,t,n){const a=b.yesNoTxtInpBoxGetYesButton(),r=b.yesNoTxtInpBoxGetNoButton();a.innerText=e,a.addEventListener("click",()=>{const e=parseFloat(b.yesNoTxtInpBoxGetInput());if(isNaN(e))return y.dialogBoxCreate(`Invalid input for price: ${b.yesNoTxtInpBoxGetInput()}`),!1;n(e),b.yesNoTxtInpBoxClose()}),r.innerText="Cancel Order",r.addEventListener("click",()=>{b.yesNoTxtInpBoxClose()}),b.yesNoTxtInpBoxCreate(t)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const n=m.getBuyTransactionCost(e,t,this.state.position);return null==n?null:o.createElement(o.Fragment,null,"Purchasing ",_.numeralWrapper.formatShares(t)," shares (",this.state.position===d.PositionTypes.Long?"Long":"Short",") will cost ",f.Money(n),".")}getQuantity(){return Math.round(parseFloat(this.state.qty))}getSellTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;if(this.state.position===d.PositionTypes.Long){if(t>e.playerShares)return o.createElement(o.Fragment,null,"You do not have this many shares in the Long position")}else if(t>e.playerShortShares)return o.createElement(o.Fragment,null,"You do not have this many shares in the Short position");const n=m.getSellTransactionGain(e,t,this.state.position);return null==n?null:o.createElement(o.Fragment,null,"Selling ",_.numeralWrapper.formatShares(t)," shares (",this.state.position===d.PositionTypes.Long?"Long":"Short",") will result in a gain of ",f.Money(n),".")}handleBuyButtonClick(){const e=this.getQuantity();if(isNaN(e))y.dialogBoxCreate(`Invalid input for quantity (number of shares): ${this.state.qty}`);else switch(this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case E.Limit:this.createPlaceOrderPopupBox("Place Buy Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.LimitBuy,this.state.position)});break;case E.Stop:this.createPlaceOrderPopupBox("Place Buy Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.StopBuy,this.state.position)})}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let n=m.calculateBuyMaxAmount(t,this.state.position,e);switch(n=Math.min(n,Math.round(t.maxShares-t.playerShares-t.playerShortShares)),this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.buyStockShort(t,n):this.props.buyStockLong(t,n),this.props.rerenderAllTickers();break;default:y.dialogBoxCreate("ERROR: 'Buy Max' only works for Market Orders")}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const n=t.nextElementSibling;"block"===n.style.display?n.style.display="none":n.style.display="block"}handleOrderTypeChange(e){switch(e.target.value){case E.Limit:this.setState({orderType:E.Limit});break;case E.Stop:this.setState({orderType:E.Stop});break;case E.Market:default:this.setState({orderType:E.Market})}}handlePositionTypeChange(e){e.target.value===d.PositionTypes.Short?this.setState({position:d.PositionTypes.Short}):this.setState({position:d.PositionTypes.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))y.dialogBoxCreate(`Invalid input for quantity (number of shares): ${this.state.qty}`);else switch(this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case E.Limit:this.createPlaceOrderPopupBox("Place Sell Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.LimitSell,this.state.position)});break;case E.Stop:this.createPlaceOrderPopupBox("Place Sell Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,p.OrderTypes.StopSell,this.state.position)})}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case E.Market:this.state.position===d.PositionTypes.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:y.dialogBoxCreate("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||h.SourceFileFlags[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||h.SourceFileFlags[8]>=2}render(){return o.createElement("li",null,o.createElement(g.Accordion,{headerContent:o.createElement(s.StockTickerHeaderText,{p:this.props.p,stock:this.props.stock}),panelContent:o.createElement("div",null,o.createElement("input",{className:"stock-market-input",onChange:this.handleQuantityChange,placeholder:"Quantity (Shares)",value:this.state.qty}),o.createElement("select",{className:"stock-market-input dropdown",onChange:this.handlePositionTypeChange,value:this.state.position},o.createElement("option",{value:d.PositionTypes.Long},"Long"),this.hasShortAccess()&&o.createElement("option",{value:d.PositionTypes.Short},"Short")),o.createElement("select",{className:"stock-market-input dropdown",onChange:this.handleOrderTypeChange,value:this.state.orderType},o.createElement("option",{value:E.Market},E.Market),this.hasOrderAccess()&&o.createElement("option",{value:E.Limit},E.Limit),this.hasOrderAccess()&&o.createElement("option",{value:E.Stop},E.Stop)),o.createElement(u.StockTickerTxButton,{onClick:this.handleBuyButtonClick,text:"Buy",tooltip:this.getBuyTransactionCostContent()}),o.createElement(u.StockTickerTxButton,{onClick:this.handleSellButtonClick,text:"Sell",tooltip:this.getSellTransactionCostContent()}),o.createElement(u.StockTickerTxButton,{onClick:this.handleBuyMaxButtonClick,text:"Buy MAX"}),o.createElement(u.StockTickerTxButton,{onClick:this.handleSellAllButtonClick,text:"Sell ALL"}),o.createElement(c.StockTickerPositionText,{p:this.props.p,stock:this.props.stock}),o.createElement(l.StockTickerOrderList,{cancelOrder:this.props.cancelOrder,orders:this.props.orders,p:this.props.p,stock:this.props.stock}))}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockTickers=void 0;const o=i(n(0)),s=n(1069),l=n(1062),c=n(199),u=n(1061);t.StockTickers=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1,tickerDisplayMode:l.TickerDisplayMode.AllStocks,watchlistFilter:"",watchlistSymbols:[]},this.changeDisplayMode=this.changeDisplayMode.bind(this),this.changeWatchlistFilter=this.changeWatchlistFilter.bind(this),this.collapseAllTickers=this.collapseAllTickers.bind(this),this.expandAllTickers=this.expandAllTickers.bind(this),this.rerender=this.rerender.bind(this),this.listRef=o.createRef()}changeDisplayMode(){this.state.tickerDisplayMode===l.TickerDisplayMode.AllStocks?this.setState({tickerDisplayMode:l.TickerDisplayMode.Portfolio}):this.setState({tickerDisplayMode:l.TickerDisplayMode.AllStocks})}changeWatchlistFilter(e){const t=e.target.value,n=t.replace(/\s/g,"");this.setState({watchlistFilter:t}),""!==n?this.setState({watchlistSymbols:n.split(",")}):this.setState({watchlistSymbols:[]})}collapseAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}render(){const e=[];for(const t in this.props.stockMarket){const n=this.props.stockMarket[t];if(n instanceof c.Stock){if(this.state.watchlistSymbols.length>0&&!this.state.watchlistSymbols.includes(n.symbol))continue;let t=this.props.stockMarket.Orders[n.symbol];if(null==t&&(t=[]),this.state.tickerDisplayMode===l.TickerDisplayMode.Portfolio&&0===n.playerShares&&0===n.playerShortShares&&0===t.length)continue;e.push(o.createElement(s.StockTicker,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,key:n.symbol,orders:t,p:this.props.p,placeOrder:this.props.placeOrder,rerenderAllTickers:this.rerender,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stock:n}))}}const t={eventEmitterForReset:this.props.eventEmitterForReset,id:"StockTickersErrorBoundary"};return o.createElement(u.ErrorBoundary,Object.assign({},t),o.createElement(l.StockTickersConfig,{changeDisplayMode:this.changeDisplayMode,changeWatchlistFilter:this.changeWatchlistFilter,collapseAllTickers:this.collapseAllTickers,expandAllTickers:this.expandAllTickers,tickerDisplayMode:this.state.tickerDisplayMode}),o.createElement("ul",{id:"stock-market-list",ref:this.listRef},e))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InfoAndPurchases=void 0;const o=i(n(0)),s=n(255),l=n(11),c=n(63),u=n(672),m=n(31),p=n(12),d={display:"block"};t.InfoAndPurchases=class extends o.Component{constructor(e){super(e),this.handleClick4SMarketDataHelpTip=this.handleClick4SMarketDataHelpTip.bind(this),this.purchaseWseAccount=this.purchaseWseAccount.bind(this),this.purchaseTixApiAccess=this.purchaseTixApiAccess.bind(this),this.purchase4SMarketData=this.purchase4SMarketData.bind(this),this.purchase4SMarketDataTixApiAccess=this.purchase4SMarketDataTixApiAccess.bind(this)}handleClick4SMarketDataHelpTip(){p.dialogBoxCreate("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility

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.

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

A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change.")}purchaseWseAccount(){if(this.props.p.hasWseAccount)return;if(!this.props.p.canAfford(l.CONSTANTS.WSEAccountCost))return;this.props.p.hasWseAccount=!0,this.props.initStockMarket(),this.props.p.loseMoney(l.CONSTANTS.WSEAccountCost),this.props.rerender();const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}purchaseTixApiAccess(){this.props.p.hasTixApiAccess||this.props.p.canAfford(l.CONSTANTS.TIXAPICost)&&(this.props.p.hasTixApiAccess=!0,this.props.p.loseMoney(l.CONSTANTS.TIXAPICost),this.props.rerender())}purchase4SMarketData(){this.props.p.has4SData||this.props.p.canAfford(s.getStockMarket4SDataCost())&&(this.props.p.has4SData=!0,this.props.p.loseMoney(s.getStockMarket4SDataCost()),this.props.rerender())}purchase4SMarketDataTixApiAccess(){this.props.p.has4SDataTixApi||this.props.p.canAfford(s.getStockMarket4STixApiCost())&&(this.props.p.has4SDataTixApi=!0,this.props.p.loseMoney(s.getStockMarket4STixApiCost()),this.props.rerender())}renderPurchaseWseAccountButton(){if(this.props.p.hasWseAccount)return o.createElement(u.StdButtonPurchased,{text:"WSE Account - Purchased"});{const e=l.CONSTANTS.WSEAccountCost;return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e),onClick:this.purchaseWseAccount,text:o.createElement(o.Fragment,null,"Buy WSE Account - ",m.Money(e))})}}renderPurchaseTixApiAccessButton(){if(this.props.p.hasTixApiAccess)return o.createElement(u.StdButtonPurchased,{text:"TIX API Access - Purchased"});{const e=l.CONSTANTS.TIXAPICost;return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchaseTixApiAccess,style:d,text:o.createElement(o.Fragment,null,"Buy Trade Information eXchange (TIX) API Access - ",m.Money(e))})}}renderPurchase4SMarketDataButton(){if(this.props.p.has4SData)return o.createElement(u.StdButtonPurchased,{text:"4S Market Data - Purchased",tooltip:"Lets you view additional pricing and volatility information about stocks"});{const e=s.getStockMarket4SDataCost();return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchase4SMarketData,text:o.createElement(o.Fragment,null,"Buy 4S Market Data Access - ",m.Money(e)),tooltip:"Lets you view additional pricing and volatility information about stocks"})}}renderPurchase4SMarketDataTixApiAccessButton(){if(this.props.p.hasTixApiAccess){if(this.props.p.has4SDataTixApi)return o.createElement(u.StdButtonPurchased,{text:"4S Market Data TIX API - Purchased",tooltip:"Let you access 4S Market Data through Netscript"});{const e=s.getStockMarket4STixApiCost();return o.createElement(c.StdButton,{disabled:!this.props.p.canAfford(e),onClick:this.purchase4SMarketDataTixApiAccess,text:o.createElement(o.Fragment,null,"Buy 4S Market Data TIX API Access - ",m.Money(e)),tooltip:"Let you access 4S Market Data through Netscript"})}}return o.createElement(c.StdButton,{disabled:!0,text:"Buy 4S Market Data TIX API Access",tooltip:"Requires TIX API Access"})}render(){return o.createElement("div",{className:"stock-market-info-and-purchases"},o.createElement("p",null,"Welcome to the World Stock Exchange (WSE)!"),o.createElement("button",{className:"std-button"},o.createElement("a",{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia")),o.createElement("br",null),o.createElement("p",null,"To begin trading, you must first purchase an account:"),this.renderPurchaseWseAccountButton(),o.createElement("h2",null,"Trade Information eXchange (TIX) API"),o.createElement("p",null,"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies."),this.renderPurchaseTixApiAccessButton(),o.createElement("h2",null,"Four Sigma (4S) Market Data Feed"),o.createElement("p",null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies."),this.renderPurchase4SMarketDataButton(),o.createElement("button",{className:"help-tip-big",onClick:this.handleClick4SMarketDataHelpTip},"?"),this.renderPurchase4SMarketDataTixApiAccessButton(),o.createElement("p",null,"Commission Fees: Every transaction you make has a ",m.Money(l.CONSTANTS.StockMarketCommission)," commission fee."),o.createElement("br",null),o.createElement("p",null,"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!"))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StockMarketRoot=void 0;const o=i(n(0)),s=n(1071),l=n(1070);t.StockMarketRoot=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.rerender=this.rerender.bind(this)}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){return o.createElement("div",null,o.createElement(s.InfoAndPurchases,{initStockMarket:this.props.initStockMarket,p:this.props.p,rerender:this.rerender}),this.props.p.hasWseAccount&&o.createElement(l.StockTickers,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,eventEmitterForReset:this.props.eventEmitterForReset,p:this.props.p,placeOrder:this.props.placeOrder,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stockMarket:this.props.stockMarket}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitStockMetadata=void 0;const a=n(299),r=n(47);t.InitStockMetadata=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.LocationName.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.LocationName.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.LocationName.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.LocationName.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.LocationName.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.LocationName.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.LocationName.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.LocationName.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.LocationName.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.LocationName.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.LocationName.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.LocationName.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.LocationName.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.LocationName.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.LocationName.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.LocationName.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.LocationName.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.StockSymbols[r.LocationName.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.LocationName.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:a.StockSymbols[r.LocationName.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.LocationName.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:a.StockSymbols[r.LocationName.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.LocationName.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:a.StockSymbols[r.LocationName.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.LocationName.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.LocationName.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:a.StockSymbols[r.LocationName.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.LocationName.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:a.StockSymbols[r.LocationName.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.LocationName.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:a.StockSymbols[r.LocationName.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.LocationName.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:a.StockSymbols[r.LocationName.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.LocationName.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:a.StockSymbols[r.LocationName.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:a.StockSymbols["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:"Joes Guns",otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:a.StockSymbols["Joes Guns"]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:a.StockSymbols["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:a.StockSymbols["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:a.StockSymbols["Titan Laboratories"]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TicksPerCycle=void 0,t.TicksPerCycle=75},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.processOrders=void 0;const o=n(182),s=n(199),l=n(115),c=n(103),u=n(3),m=n(31),p=n(12),d=i(n(0));function h(e,t){const n=t.symbolToStockMap[e.stockSymbol];if(!(n instanceof s.Stock))return void console.error(`Could not find stock for this order: ${e.stockSymbol}`);const a=t.stockMarket.Orders[n.symbol],r={rerenderFn:t.rerenderFn,suppressDialog:!0};let i=!0,h=!1;switch(e.type){case l.OrderTypes.LimitBuy:case l.OrderTypes.StopBuy:h=!0,e.pos===c.PositionTypes.Long?i=o.buyStock(n,e.shares,null,r)&&i:e.pos===c.PositionTypes.Short&&(i=o.shortStock(n,e.shares,null,r)&&i);break;case l.OrderTypes.LimitSell:case l.OrderTypes.StopSell:e.pos===c.PositionTypes.Long?i=o.sellStock(n,e.shares,null,r)&&i:e.pos===c.PositionTypes.Short&&(i=o.sellShort(n,e.shares,null,r)&&i);break;default:return void console.warn(`Invalid order type: ${e.type}`)}const _=e.pos===c.PositionTypes.Long?"Long":"Short";if(i){for(let r=0;r=r.price&&h(r,a);break;case l.OrderTypes.LimitSell:case l.OrderTypes.StopBuy:r.pos===c.PositionTypes.Long&&e.price>=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price<=r.price&&h(r,a);break;case l.OrderTypes.StopSell:r.pos===c.PositionTypes.Long&&e.price<=r.price?h(r,a):r.pos===c.PositionTypes.Short&&e.price>=r.price&&h(r,a);break;default:return void console.warn(`Invalid order type: ${r.type}`)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Order=void 0;const a=n(115),r=n(103),i=n(27);class o{constructor(e="",t=0,n=0,i=a.OrderTypes.LimitBuy,o=r.PositionTypes.Long){let s=!1;if("number"==typeof t&&"number"==typeof n||(s=!0),(isNaN(t)||isNaN(n))&&(s=!0),"string"!=typeof e&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=e,this.shares=t,this.price=n,this.type=i,this.pos=o}toJSON(){return i.Generic_toJSON("Order",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Order=o,i.Reviver.constructors.Order=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=void 0,t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubdirectories=void 0;const a=n(94);t.getSubdirectories=function(e,t){const n=[];if(!a.isValidDirectoryPath(t))return n;let r=t;function i(e){if("/"===r&&a.isInRootDirectory(e)){const t=a.getFirstParentDirectory(e);"/"===t||n.includes(t)||n.push(t)}else if(e.startsWith(r)){const t=e.slice(r.length),i=a.getFirstParentDirectory(t);"/"===i||n.includes(i)||n.push(i)}}r.endsWith("/")||(r+="/");for(const t of e.scripts)i(t.filename);for(const t of e.textFiles)i(t.fn);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMemberUpgrade=void 0;const a=n(506),r=n(3);t.GangMemberUpgrade=class{constructor(e="",t=0,n=a.UpgradeType.Weapon,r={}){this.name=e,this.cost=t,this.type=n,this.mults=r,this.desc=this.createDescription()}createDescription(){const e=["Effects:"];return null!=this.mults.str&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.str-1,0)} strength skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.str-1)/4,2)} strength exp`)),null!=this.mults.def&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.def-1,0)} defense skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.def-1)/4,2)} defense exp`)),null!=this.mults.dex&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.dex-1,0)} dexterity skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.dex-1)/4,2)} dexterity exp`)),null!=this.mults.agi&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.agi-1,0)} agility skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.agi-1)/4,2)} agility exp`)),null!=this.mults.cha&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.cha-1,0)} charisma skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.cha-1)/4,2)} charisma exp`)),null!=this.mults.hack&&(e.push(`+${r.numeralWrapper.formatPercentage(this.mults.hack-1,0)} hacking skill`),e.push(`+${r.numeralWrapper.formatPercentage((this.mults.hack-1)/4,2)} hacking exp`)),e.join("
")}getType(){switch(this.type){case a.UpgradeType.Weapon:return"Weapon";case a.UpgradeType.Armor:return"Armor";case a.UpgradeType.Vehicle:return"Vehicle";case a.UpgradeType.Rootkit:return"Rootkit";case a.UpgradeType.Augmentation:return"Augmentation";default:return""}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GangMember=void 0;const a=n(702),r=n(300),i=n(183),o=n(93),s=n(27);class l{constructor(e=""){this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_points=0,this.str_asc_points=0,this.def_asc_points=0,this.dex_asc_points=0,this.agi_asc_points=0,this.cha_asc_points=0,this.upgrades=[],this.augmentations=[],this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.GangMemberTasks.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof a.GangMemberTask&&(this.task=this.task.name),r.GangMemberTasks.hasOwnProperty(this.task)?r.GangMemberTasks[this.task]:r.GangMemberTasks.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.respect)/100);if(isNaN(a)||a<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*n*a*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.wanted)/100);if(isNaN(a)||a<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*n*a;const r=7*t.baseWanted/Math.pow(3*n*a,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const a=Math.max(.005,Math.pow(100*o.AllGangs[e.facName].territory,t.territory.money)/100);if(isNaN(a)||a<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*n*a*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.GangMemberTasks.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e,a=this.expMult();this.hack_exp+=t.hackWeight/1500*n*a.hack,this.str_exp+=t.strWeight/1500*n*a.str,this.def_exp+=t.defWeight/1500*n*a.def,this.dex_exp+=t.dexWeight/1500*n*a.dex,this.agi_exp+=t.agiWeight/1500*n*a.agi,this.cha_exp+=t.chaWeight/1500*n*a.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getAscensionResults(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack)/this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points+e.str)/this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points+e.def)/this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex)/this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi)/this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)/this.calculateAscensionMult(this.cha_asc_points)}}ascend(){const e=this.getAscensionResults(),t=this.getGainedAscensionPoints();this.hack_asc_points+=t.hack,this.str_asc_points+=t.str,this.def_asc_points+=t.def,this.dex_asc_points+=t.dex,this.agi_asc_points+=t.agi,this.cha_asc_points+=t.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DarkWebItem=void 0;t.DarkWebItem=class{constructor(e,t,n){this.program=e,this.price=t,this.description=n}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;class a{constructor(e){this.parent=null,this.stopFlag=!1,this.vars={},e instanceof a&&(this.vars=Object.assign({},e.vars)),this.parent=e}lookup(e){let t=this;for(;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null}get(e){if(e in this.vars)return this.vars[e];throw new Error(`Undefined variable ${e}`)}set(e,t){const n=this.lookup(e);return null!==n?n.vars[e]=t:this.vars[e]=t}def(e,t){return this.vars[e]=t}}t.Environment=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidNumber=void 0,t.isValidNumber=function(e){return"number"==typeof e&&!isNaN(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serverMetadata=void 0;const a=n(47),r=n(139);t.serverMetadata=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:a.LocationName.AevumECorp},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:a.LocationName.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:a.LocationName.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[r.LiteratureNames.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:a.LocationName.Sector12BladeIndustries},{hackDifficulty:99,hostname:"nwo",literature:[r.LiteratureNames.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:a.LocationName.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[r.LiteratureNames.BeyondMan,r.LiteratureNames.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:a.LocationName.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:a.LocationName.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[r.LiteratureNames.CodedIntelligence,r.LiteratureNames.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:a.LocationName.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:a.LocationName.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:a.LocationName.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:a.LocationName.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[r.LiteratureNames.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:a.LocationName.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:a.LocationName.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:"Fulcrum Secret Technologies Server"},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:a.LocationName.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:a.LocationName.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[r.LiteratureNames.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:a.LocationName.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:[r.LiteratureNames.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:a.LocationName.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:a.LocationName.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:a.LocationName.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:a.LocationName.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:a.LocationName.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[r.LiteratureNames.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[r.LiteratureNames.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[r.LiteratureNames.AGreenTomorrow,r.LiteratureNames.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:a.LocationName.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:a.LocationName.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:[r.LiteratureNames.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:a.LocationName.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:a.LocationName.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[r.LiteratureNames.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:a.LocationName.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[r.LiteratureNames.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[r.LiteratureNames.AGreenTomorrow,r.LiteratureNames.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:a.LocationName.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:a.LocationName.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:a.LocationName.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:a.LocationName.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[r.LiteratureNames.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:a.LocationName.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:a.LocationName.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:a.LocationName.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:a.LocationName.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:a.LocationName.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:a.LocationName.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[r.LiteratureNames.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:a.LocationName.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:a.LocationName.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:a.LocationName.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[r.LiteratureNames.SecretSocieties,r.LiteratureNames.TheFailedFrontier,r.LiteratureNames.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:a.LocationName.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:a.LocationName.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:a.LocationName.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:a.LocationName.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[r.LiteratureNames.SecretSocieties,r.LiteratureNames.TheFailedFrontier,r.LiteratureNames.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:a.LocationName.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:a.LocationName.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:a.LocationName.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[r.LiteratureNames.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:[r.LiteratureNames.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:a.LocationName.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:a.LocationName.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[r.LiteratureNames.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:a.LocationName.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:a.LocationName.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:a.LocationName.NewTokyoNoodleBar},{hackDifficulty:10,hostname:"foodnstuff",literature:[r.LiteratureNames.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:a.LocationName.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:a.LocationName.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:a.LocationName.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[r.LiteratureNames.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[r.LiteratureNames.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[r.LiteratureNames.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[r.LiteratureNames.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:a.LocationName.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:a.LocationName.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:a.LocationName.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20,specialName:a.LocationName.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:a.LocationName.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:a.LocationName.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:a.LocationName.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[r.LiteratureNames.SimulatedReality,r.LiteratureNames.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"BitRunners Server"},{hackDifficulty:0,hostname:"I.I.I.I",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:"The Black Hand Server"},{hackDifficulty:0,hostname:"avmnite-02h",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:"NiteSec Server"},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"The Dark Army Server"},{hackDifficulty:0,hostname:"CSEC",literature:[r.LiteratureNames.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:"CyberSec Server"},{hackDifficulty:0,hostname:"The-Cave",literature:[r.LiteratureNames.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:"Daedalus Server"},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:"w0r1d_d43m0n"}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomString=void 0;const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t.createRandomString=function(e){let t="";for(let n=0;nr.default.createElement(r.default.Fragment,null,"Sold for ",o.Money(1e6*e)),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:e=>r.default.createElement(r.default.Fragment,null,"Sold for ",o.Money(1e9*e)," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:e=>r.default.createElement(r.default.Fragment,null,"Improves training by $",20*e,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",e,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",i.numeralWrapper.format(100*e,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:e=>r.default.createElement(r.default.Fragment,null,"Acquired a total of ",i.numeralWrapper.format(10*e,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:e=>r.default.createElement(r.default.Fragment,null,"Generated ",e," contracts."),value:1}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgrade=void 0;t.HashUpgrade=class{constructor(e){this.costPerLevel=0,this.desc="",this.hasTargetServer=!1,this.name="",this.value=0,this.effectText=(()=>null),null!=e.cost&&(this.cost=e.cost),null!=e.effectText&&(this.effectText=e.effectText),this.costPerLevel=e.costPerLevel,this.desc=e.desc,this.hasTargetServer=!!e.hasTargetServer&&e.hasTargetServer,this.name=e.name,this.value=e.value}getCost(e){return"number"==typeof this.cost?this.cost:Math.round((e+1)*this.costPerLevel)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomByte=void 0;const a=n(36);t.getRandomByte=function(e){const t=Math.max(Math.min(e,255),0);return a.getRandomInt(0,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CodingContractPopup=void 0;const o=i(n(0)),s=n(44),l=n(99),c=n(170),u=n(706);t.CodingContractPopup=function(e){const[t,n]=o.useState(""),a=l.CodingContractTypes[e.c.type],r=[];for(const[t,n]of a.desc(e.c.data).split("\n").entries())r.push(o.default.createElement("span",{key:t,dangerouslySetInnerHTML:{__html:n+"
"}}));return o.default.createElement("div",null,o.default.createElement(c.CopyableText,{value:e.c.type,tag:c.ClickableTag.Tag_h1}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"You are attempting to solve a Coding Contract. You have ",e.c.getMaxNumTries()-e.c.tries," tries remaining, after which the contract will self-destruct."),o.default.createElement("br",null),o.default.createElement("p",null,r),o.default.createElement("br",null),o.default.createElement("input",{className:"text-input",style:{width:"50%",marginTop:"8px"},autoFocus:!0,placeholder:"Enter Solution here",value:t,onChange:function(e){n(e.target.value)},onKeyDown:function(n){const a=n.target.value;n.keyCode===s.KEY.ENTER&&""!==a?(n.preventDefault(),e.onAttempt(t)):n.keyCode===s.KEY.ESC&&(n.preventDefault(),e.onClose())}}),o.default.createElement(u.PopupCloseButton,{popup:e.popupId,onClose:()=>e.onAttempt(t),text:"Solve"}),o.default.createElement(u.PopupCloseButton,{popup:e.popupId,onClose:e.onClose,text:"Close"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codingContractTypesMetadata=void 0;const a=n(36);function r(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function i(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let n=e.toString();n=["[",n,"]"].join(""),t.push(n)}),t.join(",").replace(/\s/g,"")}t.codingContractTypesMetadata=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>a.getRandomInt(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let n=2,a=e;for(;a>(n-1)*(n-1);){for(;a%n==0;)a=Math.round(a/n);++n}return(1===a?n-1:a)===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",`${e.toString()}`].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(5,40),t=[];t.length=e;for(let n=0;n{const n=e.slice();for(let e=1;e["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>a.getRandomInt(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const n=[1];n.length=e+1,n.fill(0,1);for(let t=1;t{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");for(const n of e)t+=`${n.toString()},\n`;return t+=["\nHere is an example of what spiral order should be:","\nExample:","    [\n","        [1, 2, 3],\n","        [4, 5, 6],\n","        [7, 8, 9]\n","    ] should result in [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n","    [\n","        [1, 2, 3, 4]\n","        [5, 6, 7, 8]\n","        [9, 10, 11, 12]\n","    ] should result in [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7"].join(" ")},difficulty:2,gen:()=>{const e=a.getRandomInt(1,15),t=a.getRandomInt(1,15),n=[];n.length=e;for(let a=0;a{const n=[];let a=0,i=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)n[l]=e[a][t],++l;if(++a>i)break;for(let t=a;t<=i;t++)n[l]=e[t][s],++l;if(--s=o;t--)n[l]=e[i][t],++l;if(--i=a;t--)n[l]=e[t][o],++l;if(++o>s)break}const c=r(t).replace(/\s/g,"").split(",");for(let e=0;e["You are given the following array of integers:\n\n",`${e}\n\n`,"Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=a.getRandomInt(3,25),t=[];t.length=e;for(let e=0;e{const n=e.length;let a=0;for(let t=0;a["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=a.getRandomInt(3,20);for(let n=0;n{const n=e.slice();n.sort((e,t)=>e[0]-t[0]);const a=[];let i=n[0][0],s=n[0][1];for(const e of n)e[0]<=s?s=Math.max(s,e[1]):(a.push([i,s]),i=e[0],s=e[1]);a.push([i,s]);const l=o(a),c=t.replace(/\s/g,"");return l===c||l===r(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",`${e}\n\n`,"Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=a.getRandomInt(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const n=[];for(let t=1;t<=3;++t)for(let a=1;a<=3;++a)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(t+a+r+i===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+a),10),l=parseInt(e.substring(t+a,t+a+r),10),c=parseInt(e.substring(t+a+r,t+a+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&n.push(t)}}const a=r(t).replace(/\s/g,"").split(",");if(a.length!==n.length)return!1;for(const e of a)if(!n.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n{let n=0,a=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n{let n=0;for(let t=1;t["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",`${e}\n\n`,"Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=a.getRandomInt(3,50),t=[];t.length=e;for(let n=0;n{let n=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const t of e)i=Math.max(i,a+t),a=Math.max(a,r-t),r=Math.max(r,n+t),n=Math.max(n,-1*t);return i.toString()===t}},{desc:e=>{return["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" ")},difficulty:8,gen:()=>{const e=a.getRandomInt(2,10),t=a.getRandomInt(3,50),n=[];n.length=t;for(let e=0;e{const n=e[0],a=e[1],r=a.length;if(r<2)return 0===parseInt(t);if(n>r/2){let e=0;for(let t=1;t0;--e)o[e]=Math.max(o[e],i[e]+s),i[e]=Math.max(i[e],o[e-1]-s)}return parseInt(t)===o[n]}},{desc:e=>{return["Given a triangle, find the minimum path sum from top to bottom. In each step","of the path, you may only move to adjacent numbers in the row below.","The triangle is represented as a 2D array of numbers:\n\n",`${function(e){return["[\n",function e(t,n=0){const a=t.length;if(n>=a)return"";let r=[" ".repeat(a-n+1),"[",t[n].toString(),"]"].join("");return n 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=a.getRandomInt(3,12);e.length=t;for(let n=0;n{const n=e.length,a=e[n-1].slice();for(let t=n-2;t>-1;--t)for(let n=0;n{const t=e[0],n=e[1];return["You are in a grid with",`${t} rows and ${n} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${t}, ${n}]`].join(" ")},difficulty:3,gen:()=>{return[a.getRandomInt(2,14),a.getRandomInt(2,14)]},name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{const n=e[0],a=e[1],r=[];r.length=n;for(let e=0;e{let t="";for(const n of e)t+=`${n.toString()},\n`;return["You are located in the top-left corner of the following grid:\n\n",`${t}\n`,"You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=a.getRandomInt(2,12),t=a.getRandomInt(2,12),n=[];n.length=e;for(let a=0;a{const n=[];n.length=e.length;for(let t=0;t0?n[e-1][t]:0)+(t>0?n[e][t-1]:0);return n[n.length-1][n[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",`${e}\n\n`,"remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=a.getRandomInt(6,20),t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let n=1;n{let n=0,a=0;const i=[];for(let t=0;t0?--n:++a);!function e(t,n,a,r,i,o,s){if(i.length!==n)"("===i[n]?(a>0&&e(t,n+1,a-1,r,i,o,s),e(t+1,n+1,a,r,i,o+i[n],s)):")"===i[n]?(r>0&&e(t,n+1,a,r-1,i,o,s),t>0&&e(t-1,n+1,a,r,i,o+i[n],s)):e(t,n+1,a,r,i,o+i[n],s);else if(0===a&&0===r&&0===t){for(let e=0;e{const t=e[0],n=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",`${t}\n\n`,`You are also given a target number of ${n}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${n}]\n\n`,"NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const e=a.getRandomInt(4,12),t=[];t.length=e;for(let e=0;e{const n=e[0],a=e[1];const o=r(t).split(",");for(let e=0;en&&(t=n),this.setState({amt:t})}getPurchaseCost(){if(isNaN(this.state.amt))return 1/0;const e=100-this.props.sleeve.memory;return this.state.amt>e?1/0:this.props.sleeve.getMemoryUpgradeCost(this.state.amt)}purchaseMemory(){const e=this.getPurchaseCost();this.props.p.canAfford(e)&&(this.props.sleeve.upgradeMemory(this.state.amt),this.props.p.loseMoney(e),this.props.rerender())}render(){const e=`sleeve-${this.props.index}-memory-upgrade-input`,t=100-this.props.sleeve.memory,n=this.getPurchaseCost(),a=!this.props.p.canAfford(n);let r;return r=isNaN(this.state.amt)?o.createElement(o.Fragment,null,"Invalid value"):this.state.amt>t?o.createElement(o.Fragment,null,"Memory cannot exceed 100?"):o.createElement(o.Fragment,null,"Purchase ",this.state.amt," memory - ",c.Money(n),"?"),o.createElement("div",null,o.createElement("h2",null,o.createElement("u",null,"Upgrade Memory")),o.createElement("p",null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current: ",s.numeralWrapper.formatSleeveMemory(this.props.sleeve.memory),")"),o.createElement("label",{htmlFor:e},"Amount of memory to purchase (must be an integer):"),o.createElement("input",{className:"text-input",id:e,onChange:this.changePurchaseAmount,type:"number",value:this.state.amt}),o.createElement("br",null),o.createElement(l.StdButton,{disabled:a,onClick:this.purchaseMemory,text:r}))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantSleeveUpgrades=void 0;const o=i(n(0)),s=n(1150);t.CovenantSleeveUpgrades=class extends o.Component{render(){return o.createElement("div",{className:"bladeburner-action"},o.createElement("h1",null,"Duplicate Sleeve ",this.props.index),o.createElement(s.CovenantSleeveMemoryUpgrade,Object.assign({},this.props)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CovenantPurchasesRoot=void 0;const o=i(n(0)),s=n(1151),l=n(186),c=n(709),u=n(706),m=n(63),p=n(31),d=n(12);t.CovenantPurchasesRoot=function(e){const[t,n]=o.useState(0);function a(){return(e.p.sleevesFromCovenant+1)*c.BaseCostPerSleeve}function r(){n(t+1)}let i=!1;e.p.canAfford(a())||(i=!0),e.p.sleevesFromCovenant>=c.MaxSleevesFromCovenant&&(i=!0);const h=[];for(let t=0;t=c.MaxSleevesFromCovenant||(e.p.canAfford(a())?(e.p.loseMoney(a()),e.p.sleevesFromCovenant+=1,e.p.sleeves.push(new l.Sleeve(e.p)),r()):d.dialogBoxCreate("You cannot afford to purchase a Duplicate Sleeve",!1))},text:"Purchase"}),o.default.createElement("br",null),o.default.createElement("br",null),o.default.createElement("p",null,"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes."),h)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;const o=i(n(0)),s=n(63);t.Option=class extends o.Component{render(){return o.createElement("div",{className:"faction-work-div"},o.createElement("div",{className:"faction-work-div-wrapper"},o.createElement(s.StdButton,{onClick:this.props.onClick,text:this.props.buttonText}),o.createElement("p",null,this.props.infoText)))}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ParagraphWithTooltip=void 0;const o=i(n(0));t.ParagraphWithTooltip=class extends o.Component{render(){return o.createElement("div",{className:"tooltip",style:this.props.style},o.createElement("p",null,this.props.content),o.createElement("span",{className:"tooltiptext"},this.props.tooltip))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoupdatingParagraph=void 0;const o=i(n(0));t.AutoupdatingParagraph=class extends o.Component{constructor(e){super(e),this.interval=0,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}hasTooltip(){return null==this.props.getTooltip||!!this.props.getTooltip()}tooltip(){return this.props.getTooltip?this.props.getTooltip():o.createElement(o.Fragment,null)}render(){return o.createElement("p",{className:"tooltip",style:this.props.style},this.props.getContent(),this.hasTooltip()&&o.createElement("span",{className:"tooltiptext"},this.tooltip()))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const o=i(n(0)),s=n(1298),l=n(1297),c=n(67),u=n(749),m=n(1296),p={display:"block"},d={display:"block",width:"70%"};t.Info=class extends o.Component{constructor(e){super(e),this.getFavorGainContent=this.getFavorGainContent.bind(this),this.getReputationContent=this.getReputationContent.bind(this)}getFavorGainContent(){const e=this.props.faction.getFavorGain()[0];return o.createElement(o.Fragment,null,"You will earn ",u.Favor(e)," faction favor upon resetting after installing an Augmentation",o.createElement(m.MathComponent,{tex:String.raw`r = \text{total faction reputation}`}),o.createElement(m.MathComponent,{tex:String.raw`favor=\left\lfloor\log_{1.02}\left(\frac{r+25000}{25500}\right)\right\rfloor`}))}getReputationContent(){return o.createElement(o.Fragment,null,"Reputation: ",c.Reputation(this.props.faction.playerReputation))}render(){const e=o.createElement(o.Fragment,null,"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the faction",o.createElement(m.MathComponent,{tex:String.raw`r = reputation`}),o.createElement(m.MathComponent,{tex:String.raw`\Delta r = \Delta r \times \frac{100+favor}{100}`})),t={__html:this.props.factionInfo.infoText};return o.createElement("div",null,o.createElement("pre",null,o.createElement("i",{className:"text",dangerouslySetInnerHTML:t})),o.createElement("p",{style:p},"-------------------------"),o.createElement(s.AutoupdatingParagraph,{intervalTime:5e3,getContent:this.getReputationContent,getTooltip:this.getFavorGainContent}),o.createElement("p",{style:p},"-------------------------"),o.createElement(l.ParagraphWithTooltip,{content:o.createElement(o.Fragment,null,"Faction Favor: ",u.Favor(this.props.faction.favor)),tooltip:e}),o.createElement("p",{style:p},"-------------------------"),o.createElement("p",{style:d},"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities."))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DonateOption=void 0;const o=i(n(0)),s=n(11),l=n(31),c=n(67),u=n(63),m=n(3),p=n(12),d={margin:"5px",height:"26px"};t.DonateOption=class extends o.Component{constructor(e){super(e),this.blockStyle={display:"block"},this.state={donateAmt:0,status:e.disabled?o.createElement(o.Fragment,null,"Unlocked at ",e.favorToDonate," favor with ",e.faction.name):o.createElement(o.Fragment,null)},this.calculateRepGain=this.calculateRepGain.bind(this),this.donate=this.donate.bind(this),this.handleChange=this.handleChange.bind(this)}calculateRepGain(e){return e/s.CONSTANTS.DonateMoneyToRepDivisor*this.props.p.faction_rep_mult}donate(){const e=this.props.faction,t=this.state.donateAmt;if(isNaN(t)||t<=0)p.dialogBoxCreate("Invalid amount entered!");else if(this.props.p.canAfford(t)){this.props.p.loseMoney(t);const n=this.calculateRepGain(t);this.props.faction.playerReputation+=n,p.dialogBoxCreate(o.createElement(o.Fragment,null,"You just donated ",l.Money(t)," to ",e.name," to gain ",c.Reputation(n)," reputation")),this.props.rerender()}else p.dialogBoxCreate("You cannot afford to donate this much money!")}handleChange(e){const t=m.numeralWrapper.parseMoney(e.target.value);if(isNaN(t))this.setState({donateAmt:0,status:o.createElement(o.Fragment,null,"Invalid donate amount entered!")});else{const e=this.calculateRepGain(t);this.setState({donateAmt:t,status:o.createElement(o.Fragment,null,"This donation will result in ",c.Reputation(e)," reputation gain")})}}render(){return o.createElement("div",{className:"faction-work-div"},o.createElement("div",{className:"faction-work-div-wrapper"},o.createElement("input",{className:"text-input",onChange:this.handleChange,placeholder:"Donation amount",style:d,disabled:this.props.disabled}),o.createElement(u.StdButton,{onClick:this.donate,text:"Donate Money",disabled:this.props.disabled}),o.createElement("p",{style:this.blockStyle},this.state.status)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentation=void 0;const o=i(n(0));t.Augmentation=function(e){return o.createElement("span",{className:"samefont",style:{color:"white"}},e)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PurchaseableAugmentation=void 0;const o=i(n(0)),s=n(80),l=n(14),c=n(4),u=n(26),m=n(31),p=n(67),d=n(63),h=n(1301),_={margin:"4px",padding:"4px"},g={display:"inline-block"};t.PurchaseableAugmentation=class extends o.Component{constructor(e){super(e);const t=l.Augmentations[this.props.augName];if(null==t)throw new Error(`aug ${this.props.augName} does not exists`);this.aug=t,this.handleClick=this.handleClick.bind(this)}getMoneyCost(){return this.aug.baseCost*this.props.faction.getInfo().augmentationPriceMult}getRepCost(){return this.aug.baseRepRequirement*this.props.faction.getInfo().augmentationRepRequirementMult}handleClick(){u.Settings.SuppressBuyAugmentationConfirmation?s.purchaseAugmentation(this.aug,this.props.faction):s.purchaseAugmentationBoxCreate(this.aug,this.props.faction)}hasPrereqs(){return s.hasAugmentationPrereqs(this.aug)}hasReputation(){return this.props.faction.playerReputation>=this.getRepCost()}owned(){let e=!1;for(const t of this.props.p.queuedAugmentations)if(t.name===this.props.augName){e=!0;break}for(const t of this.props.p.augmentations)if(t.name===this.props.augName){e=!0;break}return e}render(){if(null==this.aug)return console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${this.props.augName}`),null;const e=this.getMoneyCost(),t=this.getRepCost();let n=!1,a=o.createElement(o.Fragment,null),r="";this.hasPrereqs()?this.aug.name!==c.AugmentationNames.NeuroFluxGovernor&&(this.aug.owned||this.owned())?n=!0:this.hasReputation()?a=o.createElement(o.Fragment,null,"UNLOCKED (at ",p.Reputation(t)," faction reputation) - ",m.Money(e)):(n=!0,a=o.createElement(o.Fragment,null,"LOCKED (Requires ",p.Reputation(t)," faction reputation - ",m.Money(e),")"),r="red"):(n=!0,a=o.createElement(o.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>h.Augmentation(e))," as prerequisite)"),r="red");const i={display:"inline-block"};""!==r&&(i.color=r);let l=this.aug.name;this.aug.name===c.AugmentationNames.NeuroFluxGovernor&&(l+=` - Level ${s.getNextNeurofluxLevel()}`);let u=o.createElement(o.Fragment,null);return u="string"==typeof this.aug.info?o.createElement(o.Fragment,null,o.createElement("span",{dangerouslySetInnerHTML:{__html:this.aug.info}}),o.createElement("br",null),o.createElement("br",null),this.aug.stats):o.createElement(o.Fragment,null,this.aug.info,o.createElement("br",null),o.createElement("br",null),this.aug.stats),o.createElement("li",null,o.createElement("span",{style:_},o.createElement(d.StdButton,{disabled:n,onClick:this.handleClick,style:g,text:l,tooltip:u}),o.createElement("p",{style:i},a)))}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationsPage=void 0;const o=i(n(0)),s=n(1302),l=n(14),c=n(4),u=n(233),m=n(26),p=n(63),d={width:"70%"};t.AugmentationsPage=class extends o.Component{constructor(e){super(e),this.isPlayersGang=e.p.inGang()&&e.p.getGangName()===e.faction.name,this.state={rerenderFlag:!1,sortOrder:u.PurchaseAugmentationsOrderSetting.Default},this.rerender=this.rerender.bind(this)}getAugs(){if(this.isPlayersGang){const e=[];for(const t in l.Augmentations)l.Augmentations[t].isSpecial||e.push(t);return e}return this.props.faction.augmentations.slice()}getAugsSorted(){switch(m.Settings.PurchaseAugmentationsOrder){case u.PurchaseAugmentationsOrderSetting.Cost:return this.getAugsSortedByCost();case u.PurchaseAugmentationsOrderSetting.Reputation:return this.getAugsSortedByReputation();default:return this.getAugsSortedByDefault()}}getAugsSortedByCost(){const e=this.getAugs();return e.sort((e,t)=>{const n=l.Augmentations[e],a=l.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),e}getAugsSortedByReputation(){const e=this.getAugs();return e.sort((e,t)=>{const n=l.Augmentations[e],a=l.Augmentations[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement}),e}getAugsSortedByDefault(){return this.getAugs()}switchSortOrder(e){m.Settings.PurchaseAugmentationsOrder=e,this.rerender()}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=this.getAugsSorted(),t=e.filter(e=>e===c.AugmentationNames.NeuroFluxGovernor||!this.props.p.augmentations.some(t=>t.name===e)&&!this.props.p.queuedAugmentations.some(t=>t.name===e)),n=e=>o.createElement(s.PurchaseableAugmentation,{augName:e,faction:this.props.faction,key:e,p:this.props.p,rerender:this.rerender}),a=t.map(e=>n(e));let r=o.createElement(o.Fragment,null);const i=e.filter(e=>!t.includes(e));return 0!==i.length&&(r=o.createElement(o.Fragment,null,o.createElement("br",null),o.createElement("h2",null,"Purchased Augmentations"),o.createElement("p",{style:d},"This factions also offers these augmentations but you already own them."),i.map(e=>n(e)))),o.createElement("div",null,o.createElement(p.StdButton,{onClick:this.props.routeToMainPage,text:"Back"}),o.createElement("h1",null,"Faction Augmentations"),o.createElement("p",{style:d},"These are all of the Augmentations that are available to purchase from ",this.props.faction.name,". Augmentations are powerful upgrades that will enhance your abilities."),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Cost),text:"Sort by Cost"}),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Reputation),text:"Sort by Reputation"}),o.createElement(p.StdButton,{onClick:()=>this.switchSortOrder(u.PurchaseAugmentationsOrderSetting.Default),text:"Sort by Default Order"}),o.createElement("br",null),a,r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.programsMetadata=void 0;const a=n(11);function r(e){return function(t){return t.hacking_skill>=e}}t.programsMetadata=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:r(1),time:a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:r(50),time:2*a.CONSTANTS.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:r(100),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:r(250),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:r(500),time:a.CONSTANTS.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:r(750),time:a.CONSTANTS.MillisecondsPer8Hours}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:r(75),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:r(400),time:a.CONSTANTS.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:r(75),time:a.CONSTANTS.MillisecondsPerHalfHour}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:r(25),time:a.CONSTANTS.MillisecondsPerQuarterHour}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:a.CONSTANTS.MillisecondsPerFiveMinutes/20}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Program=void 0;t.Program=class{constructor(e,t){this.name="",this.name=e,this.create=t}htmlID(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.companiesMetadata=void 0;const o=i(n(65)),s=n(47),l={},c={},u={},m={},p={},d={},h={},_={},g={},f={},y={},b={},E={},v={},C={},k={},P={},S={},O={};o.SoftwareCompanyPositions.forEach(e=>{l[e]=!0,p[e]=!0}),o.ITCompanyPositions.forEach(e=>{c[e]=!0,p[e]=!0}),o.NetworkEngineerCompanyPositions.forEach(e=>{u[e]=!0,p[e]=!0}),p[o.SecurityEngineerCompanyPositions[0]]=!0,m[o.SecurityEngineerCompanyPositions[0]]=!0,o.BusinessCompanyPositions.forEach(e=>{d[e]=!0}),o.SecurityCompanyPositions.forEach(e=>{_[e]=!0}),o.AgentCompanyPositions.forEach(e=>{h[e]=!0}),o.SoftwareConsultantCompanyPositions.forEach(e=>{g[e]=!0}),o.BusinessConsultantCompanyPositions.forEach(e=>{f[e]=!0});for(let e=0;e skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=void 0;const a=n(150),r=n(36),i=n(27),o=n(238);class s{constructor(e=a.BladeburnerConstants.CityNames[2]){this.name="",this.pop=0,this.popEst=0,this.comms=0,this.commsEst=0,this.chaos=0,this.name=e,this.pop=r.getRandomInt(a.BladeburnerConstants.PopulationThreshold,1.5*a.BladeburnerConstants.PopulationThreshold),this.popEst=this.pop*(Math.random()+.5),this.comms=r.getRandomInt(5,150),this.commsEst=this.comms+r.getRandomInt(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}changeChaosByPercentage(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");0!==e&&(this.chaos+=this.chaos*(e/100),this.chaos<0&&(this.chaos=0))}improvePopulationEstimateByCount(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEstthis.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}changeChaosByCount(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))}toJSON(){return i.Generic_toJSON("City",this)}static fromJSON(e){return i.Generic_fromJSON(s,e.data)}}t.City=s,i.Reviver.constructors.City=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SkillNames=void 0,t.SkillNames={BladesIntuition:"Blade's Intuition",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Tracer:"Tracer",Overclock:"Overclock",Reaper:"Reaper",EvasiveSystem:"Evasive System",Datamancer:"Datamancer",CybersEdge:"Cyber's Edge",HandsOfMidas:"Hands of Midas",Hyperdrive:"Hyperdrive"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=void 0;const a=n(518),r=n(27);class i extends a.Action{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return r.Generic_toJSON("Contract",this)}static fromJSON(e){return r.Generic_fromJSON(i,e.data)}}t.Contract=i,r.Reviver.constructors.Contract=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionIdentifier=void 0;const a=n(27);class r{constructor(e={}){this.name="",this.type=-1,e.name&&(this.name=e.name),e.type&&(this.type=e.type)}toJSON(){return a.Generic_toJSON("ActionIdentifier",this)}static fromJSON(e){return a.Generic_fromJSON(r,e.data)}}t.ActionIdentifier=r,a.Reviver.constructors.ActionIdentifier=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literature=void 0;t.Literature=class{constructor(e,t,n){this.title=e,this.fn=t,this.txt=n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literatures=void 0;const a=n(1312),r=n(139);t.Literatures={},function(){let e,n,i;e="The Beginner's Guide to Hacking",n=r.LiteratureNames.HackersStartingHandbook,i="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

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

-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game

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

-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",t.Literatures[n]=new a.Literature(e,n,i),e="The Complete Handbook for Creating a Successful Corporation",n=r.LiteratureNames.CorporationManagementHandbook,i="Getting Started with Corporations
To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.

Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.

The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.

Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.

Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.

Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.

These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

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

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

-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.

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

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

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

-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales

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

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",t.Literatures[n]=new a.Literature(e,n,i),e="A Brief History of Synthoids",n=r.LiteratureNames.HistoryOfSynthoids,i="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.

Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.

All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.

It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.

In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

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

Nobody knows what happened to the terrorist group Ascendis Totalis.",t.Literatures[n]=new a.Literature(e,n,i),e="A Green Tomorrow",n=r.LiteratureNames.AGreenTomorrow,i="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.

The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",t.Literatures[n]=new a.Literature(e,n,i),e="Alpha and Omega",n=r.LiteratureNames.AlphaOmega,i="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'

And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",t.Literatures[n]=new a.Literature(e,n,i),e="Are We Living in a Computer Simulation?",n=r.LiteratureNames.SimulatedReality,i="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.

Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened.

Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",t.Literatures[n]=new a.Literature(e,n,i),e="Beyond Man",n=r.LiteratureNames.BeyondMan,i="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?

Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",t.Literatures[n]=new a.Literature(e,n,i),e="Brighter than the Sun",n=r.LiteratureNames.BrighterThanTheSun,i="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.

The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",t.Literatures[n]=new a.Literature(e,n,i),e="Democracy is Dead: The Fall of an Empire",n=r.LiteratureNames.DemocracyIsDead,i="They rose from the shadows in the street.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
And now democracy is dead, in the USA.",t.Literatures[n]=new a.Literature(e,n,i),e="Figures Show Rising Crime Rates in Sector-12",n=r.LiteratureNames.Sector12Crime,i="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.

CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",t.Literatures[n]=new a.Literature(e,n,i),e="Man and the Machine",n=r.LiteratureNames.ManAndMachine,i="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",t.Literatures[n]=new a.Literature(e,n,i),e="Secret Societies",n=r.LiteratureNames.SecretSocieties,i="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.

However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.

Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",t.Literatures[n]=new a.Literature(e,n,i),e="Space: The Failed Frontier",n=r.LiteratureNames.TheFailedFrontier,i="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.

But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.

And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",t.Literatures[n]=new a.Literature(e,n,i),e="Coded Intelligence: Myth or Reality?",n=r.LiteratureNames.CodedIntelligence,i="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.

We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",t.Literatures[n]=new a.Literature(e,n,i),e="Synthetic Muscles",n=r.LiteratureNames.SyntheticMuscles,i="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.

As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",t.Literatures[n]=new a.Literature(e,n,i),e="Tensions rise in global tech race",n=r.LiteratureNames.TensionsInTechRace,i="Have we entered a new Cold War? Is WWIII just beyond the horizon?

After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",t.Literatures[n]=new a.Literature(e,n,i),e="The Cost of Immortality",n=r.LiteratureNames.CostOfImmortality,i="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.

Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.

Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",t.Literatures[n]=new a.Literature(e,n,i),e="The Hidden World",n=r.LiteratureNames.TheHiddenWorld,i="WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.

OPEN YOUR EYES

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

THEY ARE ALL AROUND YOU

After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",t.Literatures[n]=new a.Literature(e,n,i),e="The New God",n=r.LiteratureNames.TheNewGod,i="Everyone has a moment in their life when they wonder about the bigger questions.

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

Some people dare to think even bigger.

What will the fate of the human race be?

We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into ",t.Literatures[n]=new a.Literature(e,n,i),e="The New Triads",n=r.LiteratureNames.NewTriads,i="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.

It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.

Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",t.Literatures[n]=new a.Literature(e,n,i),e="The Secret War",n=r.LiteratureNames.TheSecretWar,i="",t.Literatures[n]=new a.Literature(e,n,i)}()},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;const o=i(n(0));t.Popup=function(e){function t(t){"Escape"===t.key&&e.removePopup(e.id)}return o.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)})),o.default.createElement("div",{className:"popup-box-content",id:`${e.id}-content`},o.default.createElement(e.content,e.props))}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCityMap=void 0;const a=n(173);t.createCityMap=function(e){const t={},n=Object.keys(a.Cities);for(let a=0;a0&&(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.text}
${r.numeralWrapper.format(this.cost,"0,0")} Scientific Research`+''+`${n.desc}`+"",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let n=0;ne.name<=t.name?-1:1);const t=e.map(e=>{const t=l.Augmentations[e.name];let n=null;return e.name===c.AugmentationNames.NeuroFluxGovernor&&(n=e.level),o.createElement("li",{key:e.name},o.createElement(p.AugmentationAccordion,{aug:t,level:n}))});return o.createElement(o.Fragment,null,t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InstalledAugmentationsAndSourceFiles=void 0;const o=i(n(0)),s=n(1324),l=n(1043),c=n(1042),u=n(1040),m=n(26),p=n(233);t.InstalledAugmentationsAndSourceFiles=class extends o.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.collapseAllHeaders=this.collapseAllHeaders.bind(this),this.expandAllHeaders=this.expandAllHeaders.bind(this),this.sortByAcquirementTime=this.sortByAcquirementTime.bind(this),this.sortInOrder=this.sortInOrder.bind(this),this.listRef=o.createRef()}collapseAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e({rerenderFlag:!e.rerenderFlag}))}sortByAcquirementTime(){m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.AcquirementTime,this.rerender()}sortInOrder(){m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.Alphabetically,this.rerender()}render(){return o.createElement(o.Fragment,null,o.createElement(l.ListConfiguration,{collapseAllButtonsFn:this.collapseAllHeaders,expandAllButtonsFn:this.expandAllHeaders,sortByAcquirementTimeFn:this.sortByAcquirementTime,sortInOrderFn:this.sortInOrder}),o.createElement("ul",{className:"augmentations-list",ref:this.listRef},o.createElement(u.SourceFileMinus1,null),o.createElement(c.OwnedSourceFiles,null),o.createElement(s.InstalledAugmentations,null)))}}},,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repToFavor=t.favorToRep=void 0,t.favorToRep=function(e){function t(e,t,n){return e*t+n}const n=t(e,Math.log(51)-Math.log(50),Math.log(51));return t(500,Math.exp(n),-25e3)},t.repToFavor=function(e){return-Math.log(25500/(e+25e3))/Math.log(1.02)}}]); //# sourceMappingURL=engine.bundle.js.map \ No newline at end of file diff --git a/src/Faction/formulas/favor.ts b/src/Faction/formulas/favor.ts index b0d91ae80..e387aca62 100644 --- a/src/Faction/formulas/favor.ts +++ b/src/Faction/formulas/favor.ts @@ -2,8 +2,15 @@ // These formulas were derived on wolfram alpha. // Wolfram Alpha: sum from 0 to n of 500*1.02^n +// 500 * ((pow(51, f+1)) / pow(50,f) - 50) +// Then we use https://herbie.uwplse.org/demo/ to simplify it and prevent +// Infinity issues. export function favorToRep(f: number): number { - return 500 * ((Math.pow(51, f+1)) / Math.pow(50,f) - 50); + function fma(a: number, b: number, c: number): number { + return a * b + c; + } + const ex = fma(f, (Math.log(51.0) - Math.log(50.0)), Math.log(51.0)); + return fma(500.0, Math.exp(ex), -25000.0); } // Wolfram Alpha: 500 (50^(-n) 51^(n + 1) - 50) solve for n diff --git a/src/Faction/ui/Info.tsx b/src/Faction/ui/Info.tsx index bbe68eb11..d579efcba 100644 --- a/src/Faction/ui/Info.tsx +++ b/src/Faction/ui/Info.tsx @@ -41,7 +41,11 @@ export class Info extends React.Component { getFavorGainContent(): JSX.Element { const favorGain = this.props.faction.getFavorGain()[0]; - return <>You will earn {Favor(favorGain)} faction favor upon resetting after installing an Augmentation + return (<> + You will earn {Favor(favorGain)} faction favor upon resetting after installing an Augmentation + + + ); } getReputationContent(): JSX.Element { @@ -54,10 +58,11 @@ export class Info extends React.Component { 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 - - + + ; + const infoText: IInnerHTMLMarkup = { __html: this.props.factionInfo.infoText, } diff --git a/src/Gang/Gang.ts b/src/Gang/Gang.ts index 8d7dab069..b530b38b5 100644 --- a/src/Gang/Gang.ts +++ b/src/Gang/Gang.ts @@ -125,7 +125,6 @@ export class Gang { this.respectGainRate = respectGains; this.wantedGainRate = wantedLevelGains; this.moneyGainRate = moneyGains; - const gain = respectGains * numCycles; this.respect += gain; // Faction reputation gains is respect gain divided by some constant @@ -135,6 +134,7 @@ export class Gang { throw new Error('Could not find the faction associated with this gang.'); } const favorMult = 1 + (fac.favor / 100); + fac.playerReputation += ((player.faction_rep_mult * gain * favorMult) / GangConstants.GangRespectToReputationRatio); // Keep track of respect gained per member From 008b233c9d6c5f9ee210808224f4b70f55cdd237 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 3 Sep 2021 17:42:23 -0400 Subject: [PATCH 02/12] reword faction reputation and favor tooltips --- src/Faction/ui/Info.tsx | 7 ++++--- src/ui/React/AutoupdatingParagraph.tsx | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Faction/ui/Info.tsx b/src/Faction/ui/Info.tsx index d579efcba..f3bbaaa5e 100644 --- a/src/Faction/ui/Info.tsx +++ b/src/Faction/ui/Info.tsx @@ -42,7 +42,7 @@ export class Info extends React.Component { getFavorGainContent(): JSX.Element { const favorGain = this.props.faction.getFavorGain()[0]; return (<> - You will earn {Favor(favorGain)} faction favor upon resetting after installing an Augmentation + You will have {Favor(this.props.faction.favor+favorGain)} faction favor after installing an Augmentation. ); @@ -56,8 +56,9 @@ export class Info extends React.Component { const favorTooltip = <> 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 + install an Augmentation. The amount of + favor you gain depends on the total amount of reputation you earned with this faction. + Across all resets. ; diff --git a/src/ui/React/AutoupdatingParagraph.tsx b/src/ui/React/AutoupdatingParagraph.tsx index 9fc9d747e..5fd435932 100644 --- a/src/ui/React/AutoupdatingParagraph.tsx +++ b/src/ui/React/AutoupdatingParagraph.tsx @@ -58,13 +58,13 @@ export class AutoupdatingParagraph extends React.Component { render(): React.ReactNode { return ( -

- {this.props.getContent()} +

+

{this.props.getContent()}

{ this.hasTooltip() && {this.tooltip()} } -

+
) } } From e1cb0e529cfb82c75a423a1c35883932ac9ab2e0 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 3 Sep 2021 18:04:05 -0400 Subject: [PATCH 03/12] Tech vendors give a tip that you can buy bigger servers via scripts. --- src/Locations/ui/TechVendorLocation.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Locations/ui/TechVendorLocation.tsx b/src/Locations/ui/TechVendorLocation.tsx index 11fb1eecf..dfdfb350b 100644 --- a/src/Locations/ui/TechVendorLocation.tsx +++ b/src/Locations/ui/TechVendorLocation.tsx @@ -78,6 +78,9 @@ export class TechVendorLocation extends React.Component { return (
{purchaseServerButtons} +
+

"You can order bigger servers via scripts. We don't take custom order in person."

+
{ this.state.torPurchased ? ( Date: Sat, 4 Sep 2021 01:39:34 -0400 Subject: [PATCH 04/12] gave some love to the donations --- src/Faction/formulas/donation.ts | 6 ++ src/Faction/ui/DonateOption.tsx | 141 ++++++++++++++----------------- src/Faction/ui/Info.tsx | 2 +- 3 files changed, 71 insertions(+), 78 deletions(-) create mode 100644 src/Faction/formulas/donation.ts diff --git a/src/Faction/formulas/donation.ts b/src/Faction/formulas/donation.ts new file mode 100644 index 000000000..cd9fd0d6c --- /dev/null +++ b/src/Faction/formulas/donation.ts @@ -0,0 +1,6 @@ +import { CONSTANTS } from "../../Constants"; +import { IPlayer } from "../../PersonObjects/IPlayer"; + +export function repFromDonation(amt: number, player: IPlayer): number { + return amt / CONSTANTS.DonateMoneyToRepDivisor * player.faction_rep_mult; +} \ No newline at end of file diff --git a/src/Faction/ui/DonateOption.tsx b/src/Faction/ui/DonateOption.tsx index be6575170..d1c68039a 100644 --- a/src/Faction/ui/DonateOption.tsx +++ b/src/Faction/ui/DonateOption.tsx @@ -1,11 +1,12 @@ /** * React component for a donate option on the Faction UI */ -import * as React from "react"; +import React, { useState } from "react"; import { CONSTANTS } from "../../Constants"; import { Faction } from "../../Faction/Faction"; import { IPlayer } from "../../PersonObjects/IPlayer"; +import { repFromDonation } from "../formulas/donation"; import { Money } from "../../ui/React/Money"; import { Reputation } from "../../ui/React/Reputation"; @@ -15,6 +16,7 @@ import { StdButton } from "../../ui/React/StdButton"; import { numeralWrapper } from "../../ui/numeralFormat"; import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { MathComponent } from 'mathjax-react'; type IProps = { faction: Faction; @@ -24,93 +26,78 @@ type IProps = { rerender: () => void; } -type IState = { - donateAmt: number; - status: JSX.Element; -} const inputStyleMarkup = { margin: "5px", height: "26px", } -export class DonateOption extends React.Component { - // Style markup for block elements. Stored as property - blockStyle: any = { display: "block" }; +const blockStyle = { display: "block" }; - constructor(props: IProps) { - super(props); +export function DonateOption(props: IProps): React.ReactElement { + const [donateAmt, setDonateAmt] = useState(null); + const digits = (CONSTANTS.DonateMoneyToRepDivisor+'').length-1; + function canDonate(): boolean { + if(donateAmt === null) return false; + if (isNaN(donateAmt) || donateAmt <= 0) return false; + if(props.p.money.lt(donateAmt)) return false; + return true; + } - this.state = { - donateAmt: 0, - status: props.disabled ? <>Unlocked at {props.favorToDonate} favor with {props.faction.name} : <>, + function onChange(event: React.ChangeEvent): void { + const amt = numeralWrapper.parseMoney(event.target.value); + if(event.target.value === "" || isNaN(amt)) setDonateAmt(null); + else setDonateAmt(amt); + } + + function donate(): void { + const fac = props.faction; + const amt = donateAmt; + if(amt === null) return; + if(!canDonate()) return; + props.p.loseMoney(amt); + const repGain = repFromDonation(amt, props.p); + props.faction.playerReputation += repGain; + dialogBoxCreate(<> + You just donated {Money(amt)} to {fac.name} to gain {Reputation(repGain)} reputation. + ); + props.rerender(); + } + + function Status(): React.ReactElement { + if(donateAmt === null) return (<>); + if(!canDonate()) { + if(props.p.money.lt(donateAmt)) + return (

Insufficient funds

); + return (

Invalid donate amount entered!

); } - - this.calculateRepGain = this.calculateRepGain.bind(this); - this.donate = this.donate.bind(this); - this.handleChange = this.handleChange.bind(this); + return (

This donation will result in {Reputation(repFromDonation(donateAmt, props.p))} reputation gain

); } - // Returns rep gain for a given donation amount - calculateRepGain(amt: number): number { - return amt / CONSTANTS.DonateMoneyToRepDivisor * this.props.p.faction_rep_mult; - } - donate(): void { - const fac = this.props.faction; - const amt = this.state.donateAmt; - if (isNaN(amt) || amt <= 0) { - dialogBoxCreate(`Invalid amount entered!`); - } else if (!this.props.p.canAfford(amt)) { - dialogBoxCreate(`You cannot afford to donate this much money!`); - } else { - this.props.p.loseMoney(amt); - const repGain = this.calculateRepGain(amt); - this.props.faction.playerReputation += repGain; - dialogBoxCreate(<> - You just donated {Money(amt)} to {fac.name} to gain {Reputation(repGain)} reputation - ); - this.props.rerender(); - } - } - - handleChange(e: React.ChangeEvent): void { - const amt = numeralWrapper.parseMoney(e.target.value); - - if (isNaN(amt)) { - this.setState({ - donateAmt: 0, - status: <>Invalid donate amount entered!, - }); - } else { - const repGain = this.calculateRepGain(amt); - this.setState({ - donateAmt: amt, - status: <>This donation will result in {Reputation(repGain)} reputation gain, - }); - } - } - - render(): React.ReactNode { - return ( -
-
- - -

{this.state.status}

-
-
- ) - } + return (
+
+ + + + { + props.disabled ? +

Unlocked at {props.favorToDonate} favor with {props.faction.name}

: +
+ +
+ } +
+
); } diff --git a/src/Faction/ui/Info.tsx b/src/Faction/ui/Info.tsx index f3bbaaa5e..5dbec5bec 100644 --- a/src/Faction/ui/Info.tsx +++ b/src/Faction/ui/Info.tsx @@ -11,7 +11,7 @@ import { AutoupdatingParagraph } from "../../ui/React/AutoupdatingParagraph"; import { ParagraphWithTooltip } from "../../ui/React/ParagraphWithTooltip"; import { Reputation } from "../../ui/React/Reputation"; import { Favor } from "../../ui/React/Favor"; -import { MathComponent } from 'mathjax-react' +import { MathComponent } from 'mathjax-react'; type IProps = { faction: Faction; From 3a943e0e505dd3bc65cc9d1d4791ab5a11510e7b Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 4 Sep 2021 02:21:31 -0400 Subject: [PATCH 05/12] made tech vendors button a tad smarter. --- src/Locations/LocationsHelpers.tsx | 39 --------- src/Locations/ui/CoresButton.tsx | 64 ++++++++++++++ src/Locations/ui/RamButton.tsx | 49 +++++++++++ src/Locations/ui/TechVendorLocation.tsx | 108 ++++++------------------ src/Locations/ui/TorButton.tsx | 46 ++++++++++ src/Server/ServerPurchases.ts | 5 +- 6 files changed, 186 insertions(+), 125 deletions(-) create mode 100644 src/Locations/ui/CoresButton.tsx create mode 100644 src/Locations/ui/RamButton.tsx create mode 100644 src/Locations/ui/TorButton.tsx diff --git a/src/Locations/LocationsHelpers.tsx b/src/Locations/LocationsHelpers.tsx index 866a6e6ed..56d55c662 100644 --- a/src/Locations/LocationsHelpers.tsx +++ b/src/Locations/LocationsHelpers.tsx @@ -248,45 +248,6 @@ Purchasing an additional core (for a total of {p.getHomeComputer().cpuCores + 1} cost {Money(cost)}); } -/** - * Create a popup that lets the player upgrade the RAM on his/her home computer - * @param {IPlayer} p - Player object - */ -export function createUpgradeHomeRamPopup(p: IPlayer): void { - const cost: number = p.getUpgradeHomeRamCost(); - const ram: number = p.getHomeComputer().maxRam; - - const yesBtn = yesNoBoxGetYesButton(); - const noBtn = yesNoBoxGetNoButton(); - if (yesBtn == null || noBtn == null) { return; } - - const homeComputer = p.getHomeComputer(); - if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) { - dialogBoxCreate(<> - You have the maximum amount of RAM on your home computer. - ); - return; - } - - yesBtn.innerText = "Purchase"; - yesBtn.addEventListener("click", ()=>{ - purchaseRamForHomeComputer(cost, p); - yesNoBoxClose(); - }); - - noBtn.innerText = "Cancel"; - noBtn.addEventListener("click", ()=>{ - yesNoBoxClose(); - }); - - yesNoBoxCreate(<> - Would you like to purchase additional RAM for your home computer?

- This will upgrade your RAM from {numeralWrapper.formatRAM(ram)} to {numeralWrapper.formatRAM(ram*2)}.

- This will cost {Money(cost)} - ); -} - - /** * Attempt to purchase a TOR router * @param {IPlayer} p - Player object diff --git a/src/Locations/ui/CoresButton.tsx b/src/Locations/ui/CoresButton.tsx new file mode 100644 index 000000000..10930a96f --- /dev/null +++ b/src/Locations/ui/CoresButton.tsx @@ -0,0 +1,64 @@ +import React, { useState } from "react"; + +import { Location } from "../Location"; +import { createPurchaseServerPopup, + createUpgradeHomeCoresPopup, + purchaseTorRouter } from "../LocationsHelpers"; + +import { CONSTANTS } from "../../Constants"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { purchaseRamForHomeComputer } from "../../Server/ServerPurchases"; + +import { StdButtonPurchased } from "../../ui/React/StdButtonPurchased"; +import { StdButton } from "../../ui/React/StdButton"; +import { Money } from "../../ui/React/Money"; + +type IProps = { + p: IPlayer; +} + +export function CoresButton(props: IProps): React.ReactElement { + const setRerender = useState(false)[1]; + function rerender(): void { + setRerender(old => !old); + } + + const btnStyle = { display: "block" }; + + const homeComputer = props.p.getHomeComputer(); + const maxCores = homeComputer.cpuCores >= 8; + if(maxCores) { + return (); + } + + const allCosts = [ + 0, + 10e9, + 250e9, + 5e12, + 100e12, + 1e15, + 20e15, + 200e15, + ]; + const cost: number = allCosts[homeComputer.cpuCores]; + + + function buy(): void { + if(maxCores) return; + if (!props.p.canAfford(cost)) return; + props.p.loseMoney(cost); + homeComputer.cpuCores++; + rerender(); + } + + return (Upgrade 'home' cores ({homeComputer.cpuCores} -> {homeComputer.cpuCores+1}) - {Money(cost)}} + />); +} diff --git a/src/Locations/ui/RamButton.tsx b/src/Locations/ui/RamButton.tsx new file mode 100644 index 000000000..ace7cbc67 --- /dev/null +++ b/src/Locations/ui/RamButton.tsx @@ -0,0 +1,49 @@ +import React, { useState } from "react"; + +import { Location } from "../Location"; +import { createPurchaseServerPopup, + createUpgradeHomeCoresPopup, + purchaseTorRouter } from "../LocationsHelpers"; + +import { CONSTANTS } from "../../Constants"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { purchaseRamForHomeComputer } from "../../Server/ServerPurchases"; + +import { StdButtonPurchased } from "../../ui/React/StdButtonPurchased"; +import { StdButton } from "../../ui/React/StdButton"; +import { Money } from "../../ui/React/Money"; + +type IProps = { + p: IPlayer; +} + +export function RamButton(props: IProps): React.ReactElement { + const setRerender = useState(false)[1]; + function rerender(): void { + setRerender(old => !old); + } + + const btnStyle = { display: "block" }; + + const homeComputer = props.p.getHomeComputer(); + if(homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) { + return (); + } + + const cost = props.p.getUpgradeHomeRamCost(); + + function buy(): void { + purchaseRamForHomeComputer(props.p); + rerender(); + } + + return (Upgrade 'home' RAM ({homeComputer.maxRam}GB -> {homeComputer.maxRam*2}GB) - {Money(cost)}} + />); +} diff --git a/src/Locations/ui/TechVendorLocation.tsx b/src/Locations/ui/TechVendorLocation.tsx index dfdfb350b..92cf2ae5b 100644 --- a/src/Locations/ui/TechVendorLocation.tsx +++ b/src/Locations/ui/TechVendorLocation.tsx @@ -8,8 +8,10 @@ import * as React from "react"; import { Location } from "../Location"; import { createPurchaseServerPopup, createUpgradeHomeCoresPopup, - createUpgradeHomeRamPopup, purchaseTorRouter } from "../LocationsHelpers"; +import { RamButton } from "./RamButton"; +import { TorButton } from "./TorButton"; +import { CoresButton } from "./CoresButton"; import { CONSTANTS } from "../../Constants"; import { IPlayer } from "../../PersonObjects/IPlayer"; @@ -24,89 +26,29 @@ type IProps = { p: IPlayer; } -export class TechVendorLocation extends React.Component { - /** - * Stores button styling that sets them all to block display - */ - btnStyle: any; +export function TechVendorLocation(props: IProps): React.ReactElement { + const btnStyle = { display: "block" }; - constructor(props: IProps) { - super(props); - - this.btnStyle = { display: "block" }; - - this.state = { - torPurchased: props.p.hasTorRouter(), - } - - this.createUpgradeHomeCoresPopup = this.createUpgradeHomeCoresPopup.bind(this); - this.createUpgradeHomeRamPopup = this.createUpgradeHomeRamPopup.bind(this); - this.purchaseTorRouter = this.purchaseTorRouter.bind(this); - } - - createUpgradeHomeCoresPopup(): void { - createUpgradeHomeCoresPopup(this.props.p); - } - - createUpgradeHomeRamPopup(): void { - createUpgradeHomeRamPopup(this.props.p); - } - - purchaseTorRouter(): void { - purchaseTorRouter(this.props.p); - this.setState({ - torPurchased: this.props.p.hasTorRouter(), - }); - } - - render(): React.ReactNode { - const loc: Location = this.props.loc; - - const purchaseServerButtons: React.ReactNode[] = []; - for (let i = loc.techVendorMinRam; i <= loc.techVendorMaxRam; i *= 2) { - const cost = getPurchaseServerCost(i); - purchaseServerButtons.push( - createPurchaseServerPopup(i, this.props.p)} - style={this.btnStyle} - text={<>Purchase {i}GB Server - {Money(cost)}} - />, - ) - } - - return ( -
- {purchaseServerButtons} -
-

"You can order bigger servers via scripts. We don't take custom order in person."

-
- { - this.state.torPurchased ? ( - - ) : ( - Purchase TOR Router - {Money(CONSTANTS.TorRouterCost)}} - /> - ) - - } - - -
+ const purchaseServerButtons: React.ReactNode[] = []; + for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) { + const cost = getPurchaseServerCost(i); + purchaseServerButtons.push( + createPurchaseServerPopup(i, props.p)} + style={btnStyle} + text={<>Purchase {i}GB Server - {Money(cost)}} + />, ) } + + return (
+ {purchaseServerButtons} +
+

"You can order bigger servers via scripts. We don't take custom order in person."

+
+ + + +
); } diff --git a/src/Locations/ui/TorButton.tsx b/src/Locations/ui/TorButton.tsx new file mode 100644 index 000000000..b3e78378f --- /dev/null +++ b/src/Locations/ui/TorButton.tsx @@ -0,0 +1,46 @@ +import React, { useState } from "react"; + +import { Location } from "../Location"; +import { createPurchaseServerPopup, + createUpgradeHomeCoresPopup, + purchaseTorRouter } from "../LocationsHelpers"; + +import { CONSTANTS } from "../../Constants"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { purchaseRamForHomeComputer } from "../../Server/ServerPurchases"; + +import { StdButtonPurchased } from "../../ui/React/StdButtonPurchased"; +import { StdButton } from "../../ui/React/StdButton"; +import { Money } from "../../ui/React/Money"; + +type IProps = { + p: IPlayer; +} + +export function TorButton(props: IProps): React.ReactElement { + const setRerender = useState(false)[1]; + function rerender(): void { + setRerender(old => !old); + } + + const btnStyle = { display: "block" }; + + function buy(): void { + purchaseTorRouter(props.p); + rerender(); + } + + if(props.p.hasTorRouter()) { + return (); + } + + return (Purchase TOR router - {Money(CONSTANTS.TorRouterCost)}} + />); +} diff --git a/src/Server/ServerPurchases.ts b/src/Server/ServerPurchases.ts index 6863a4493..187821914 100644 --- a/src/Server/ServerPurchases.ts +++ b/src/Server/ServerPurchases.ts @@ -96,7 +96,8 @@ export function purchaseServer(ram: number, p: IPlayer): void { } // Manually upgrade RAM on home computer (NOT through Netscript) -export function purchaseRamForHomeComputer(cost: number, p: IPlayer): void { +export function purchaseRamForHomeComputer(p: IPlayer): void { + const cost = p.getUpgradeHomeRamCost(); if (!p.canAfford(cost)) { dialogBoxCreate("You do not have enough money to purchase additional RAM for your home computer"); return; @@ -111,6 +112,4 @@ export function purchaseRamForHomeComputer(cost: number, p: IPlayer): void { homeComputer.maxRam *= 2; p.loseMoney(cost); - - dialogBoxCreate("Purchased additional RAM for home computer! It now has " + homeComputer.maxRam + "GB of RAM."); } From 6e013e4e6ad19461c9f86acb85ae7660def94616 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 4 Sep 2021 03:27:31 -0400 Subject: [PATCH 06/12] Change money to automatically color grey when something cannot be bought. --- css/styles.scss | 4 +++ src/Augmentation/Augmentation.tsx | 2 +- src/Bladeburner/ui/Stats.tsx | 2 +- src/Casino/Blackjack.tsx | 8 ++--- src/Casino/Roulette.tsx | 4 +-- src/Casino/SlotMachine.tsx | 2 +- src/DarkWeb/DarkWeb.tsx | 2 +- src/Faction/ui/DonateOption.tsx | 2 +- src/Faction/ui/PurchaseableAugmentation.tsx | 4 +-- src/Gang/ui/GangMemberUpgradePopup.tsx | 2 +- src/Hacknet/data/HashUpgradesMetadata.tsx | 4 +-- src/Infiltration/ui/Victory.tsx | 2 +- src/Locations/LocationsHelpers.tsx | 6 ++-- src/Locations/ui/CoresButton.tsx | 2 +- src/Locations/ui/GymLocation.tsx | 8 ++--- src/Locations/ui/HospitalLocation.tsx | 4 +-- src/Locations/ui/RamButton.tsx | 2 +- src/Locations/ui/TechVendorLocation.tsx | 2 +- src/Locations/ui/TorButton.tsx | 2 +- src/Locations/ui/UniversityLocation.tsx | 10 +++---- src/PersonObjects/Resleeving/ResleevingUI.tsx | 5 ++-- ...tationsUI.ts => SleeveAugmentationsUI.tsx} | 3 +- src/PersonObjects/Sleeve/SleeveUI.tsx | 7 +++-- .../Sleeve/ui/CovenantPurchasesRoot.tsx | 2 +- .../Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx | 2 +- .../Sleeve/ui/MoreEarningsContent.tsx | 6 ++-- src/StockMarket/BuyingAndSelling.tsx | 12 ++++---- src/StockMarket/OrderProcessing.tsx | 4 +-- src/StockMarket/ui/InfoAndPurchases.tsx | 10 +++---- src/StockMarket/ui/StockTicker.tsx | 4 +-- src/StockMarket/ui/StockTickerOrder.tsx | 2 +- .../ui/StockTickerPositionText.tsx | 12 ++++---- src/ui/ActiveScripts/ScriptProduction.tsx | 6 ++-- .../ActiveScripts/WorkerScriptAccordion.tsx | 8 ++--- src/ui/CharacterInfo.tsx | 30 +++++++++---------- src/ui/React/Money.tsx | 14 +++++++-- src/ui/React/MoneyRate.tsx | 3 +- 37 files changed, 112 insertions(+), 92 deletions(-) rename src/PersonObjects/Sleeve/{SleeveAugmentationsUI.ts => SleeveAugmentationsUI.tsx} (97%) diff --git a/css/styles.scss b/css/styles.scss index ae6f1f2a9..0377e2865 100644 --- a/css/styles.scss +++ b/css/styles.scss @@ -345,6 +345,10 @@ a:visited { color: $light-yellow; } +.unbuyable { + color: #66CFBC; +} + .failure { color: $alert-red; text-shadow: 0 0 0 $alert-red; diff --git a/src/Augmentation/Augmentation.tsx b/src/Augmentation/Augmentation.tsx index 405052364..b0d1259c3 100644 --- a/src/Augmentation/Augmentation.tsx +++ b/src/Augmentation/Augmentation.tsx @@ -167,7 +167,7 @@ function generateStatsDescription(mults: IMap, programs?: string[], star desc = <>{desc}
+{f(mults.bladeburner_success_chance_mult-1)} Bladeburner Contracts and Operations success chance if(startingMoney) - desc = <>{desc}
Start with {Money(startingMoney)} after installing Augmentations. + desc = <>{desc}
Start with after installing Augmentations. if(programs) desc = <>{desc}
Start with {programs.join(' and ')} after installing Augmentations. diff --git a/src/Bladeburner/ui/Stats.tsx b/src/Bladeburner/ui/Stats.tsx index f2393cb11..103f6240b 100644 --- a/src/Bladeburner/ui/Stats.tsx +++ b/src/Bladeburner/ui/Stats.tsx @@ -97,7 +97,7 @@ export function Stats(props: IProps): React.ReactElement {

Team Size: {formatNumber(props.bladeburner.teamSize, 0)}

Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)}


Num Times Hospitalized: {props.bladeburner.numHosp}

-

Money Lost From Hospitalizations: {Money(props.bladeburner.moneyLost)}


+

Money Lost From Hospitalizations:


Current City: {props.bladeburner.city}

Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)} diff --git a/src/Casino/Blackjack.tsx b/src/Casino/Blackjack.tsx index e2ee8e957..8a41b1f1c 100644 --- a/src/Casino/Blackjack.tsx +++ b/src/Casino/Blackjack.tsx @@ -314,7 +314,7 @@ export class Blackjack extends Game { label={ <> {"Wager (Max: "} - {Money(MAX_BET)} + {")"} } @@ -333,7 +333,7 @@ export class Blackjack extends Game {

{"Total earnings this session: "} - {Money(gains)} +

@@ -404,13 +404,13 @@ export class Blackjack extends Game { {this.isPlayerWinResult(result) && ( <> {" You gained "} - {Money(this.state.bet)} + )} {result === Result.DealerWon && ( <> {" You lost "} - {Money(this.state.bet)} + )}

diff --git a/src/Casino/Roulette.tsx b/src/Casino/Roulette.tsx index 5cb2e833c..f48132013 100644 --- a/src/Casino/Roulette.tsx +++ b/src/Casino/Roulette.tsx @@ -202,10 +202,10 @@ export class Roulette extends Game { } if(playerWin) { gain = this.state.investment*this.state.strategy.payout; - status = <>won {Money(gain)}; + status = <>won ; } else { gain = -this.state.investment; - status = <>lost {Money(-gain)}; + status = <>lost ; } this.win(this.props.p, gain); this.setState({ diff --git a/src/Casino/SlotMachine.tsx b/src/Casino/SlotMachine.tsx index 149904e00..720ea06f8 100644 --- a/src/Casino/SlotMachine.tsx +++ b/src/Casino/SlotMachine.tsx @@ -170,7 +170,7 @@ export class SlotMachine extends Game { } this.setState({ - status: <>{gains>0?"gained":"lost"} {Money(Math.abs(gains))}, + status: <>{gains>0?"gained":"lost"} , canPlay: true, }) if(this.reachedLimit(this.props.p)) return; diff --git a/src/DarkWeb/DarkWeb.tsx b/src/DarkWeb/DarkWeb.tsx index c3369aaf6..c778d12b3 100644 --- a/src/DarkWeb/DarkWeb.tsx +++ b/src/DarkWeb/DarkWeb.tsx @@ -51,7 +51,7 @@ export function executeDarkwebTerminalCommand(commandArray: string[]): void { function listAllDarkwebItems(): void { for(const key in DarkWebItems) { const item = DarkWebItems[key]; - postElement(<>{item.program} - {Money(item.price)} - {item.description}); + postElement(<>{item.program} - - {item.description}); } } diff --git a/src/Faction/ui/DonateOption.tsx b/src/Faction/ui/DonateOption.tsx index d1c68039a..f4ec7aff6 100644 --- a/src/Faction/ui/DonateOption.tsx +++ b/src/Faction/ui/DonateOption.tsx @@ -60,7 +60,7 @@ export function DonateOption(props: IProps): React.ReactElement { const repGain = repFromDonation(amt, props.p); props.faction.playerReputation += repGain; dialogBoxCreate(<> - You just donated {Money(amt)} to {fac.name} to gain {Reputation(repGain)} reputation. + You just donated to {fac.name} to gain {Reputation(repGain)} reputation. ); props.rerender(); } diff --git a/src/Faction/ui/PurchaseableAugmentation.tsx b/src/Faction/ui/PurchaseableAugmentation.tsx index 7d9e5cfe6..c61a13320 100644 --- a/src/Faction/ui/PurchaseableAugmentation.tsx +++ b/src/Faction/ui/PurchaseableAugmentation.tsx @@ -119,10 +119,10 @@ export class PurchaseableAugmentation extends React.Component { } else if (this.aug.name !== AugmentationNames.NeuroFluxGovernor && (this.aug.owned || this.owned())) { disabled = true; } else if (this.hasReputation()) { - status = <>UNLOCKED (at {Reputation(repCost)} faction reputation) - {Money(moneyCost)}; + status = <>UNLOCKED (at {Reputation(repCost)} faction reputation) - ; } else { disabled = true; - status = <>LOCKED (Requires {Reputation(repCost)} faction reputation - {Money(moneyCost)}); + status = <>LOCKED (Requires {Reputation(repCost)} faction reputation - ); color = "red"; } diff --git a/src/Gang/ui/GangMemberUpgradePopup.tsx b/src/Gang/ui/GangMemberUpgradePopup.tsx index ce7b6e21a..0a21d4ae8 100644 --- a/src/Gang/ui/GangMemberUpgradePopup.tsx +++ b/src/Gang/ui/GangMemberUpgradePopup.tsx @@ -51,7 +51,7 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement { setRerender(old => !old); } return ( - {upg.name} - {Money(props.gang.getUpgradeCost(upg))} + {upg.name} - ); } diff --git a/src/Hacknet/data/HashUpgradesMetadata.tsx b/src/Hacknet/data/HashUpgradesMetadata.tsx index db9d2a85b..6244d7dd2 100644 --- a/src/Hacknet/data/HashUpgradesMetadata.tsx +++ b/src/Hacknet/data/HashUpgradesMetadata.tsx @@ -10,14 +10,14 @@ export const HashUpgradesMetadata: IConstructorParams[] = [ costPerLevel: 4, desc: "Sell hashes for $1m", name: "Sell for Money", - effectText: (level: number): JSX.Element | null => (<>Sold for {Money(1e6*level)}), + effectText: (level: number): JSX.Element | null => (<>Sold for ), value: 1e6, }, { costPerLevel: 100, desc: "Sell hashes for $1b in Corporation funds", name: "Sell for Corporation Funds", - effectText: (level: number): JSX.Element | null => (<>Sold for {Money(1e9*level)} Corporation funds.), + effectText: (level: number): JSX.Element | null => (<>Sold for Corporation funds.), value: 1e9, }, { diff --git a/src/Infiltration/ui/Victory.tsx b/src/Infiltration/ui/Victory.tsx index 164d38886..e44f863b2 100644 --- a/src/Infiltration/ui/Victory.tsx +++ b/src/Infiltration/ui/Victory.tsx @@ -67,7 +67,7 @@ export function Victory(props: IProps): React.ReactElement { {"Trade for "}{Reputation(repGain)}{" reputation"}} /> - {"Sell for "}{Money(moneyGain)}} /> + {"Sell for "}} /> diff --git a/src/Locations/LocationsHelpers.tsx b/src/Locations/LocationsHelpers.tsx index 56d55c662..439bcefe9 100644 --- a/src/Locations/LocationsHelpers.tsx +++ b/src/Locations/LocationsHelpers.tsx @@ -79,7 +79,7 @@ export function createTravelPopup(destination: CityName, travelFn: TravelFunctio }); yesNoBoxCreate(Would you like to travel to {destination}? The trip will - cost {Money(cost)}.); + cost .); } /** @@ -107,7 +107,7 @@ export function createPurchaseServerPopup(ram: number, p: IPlayer): void { yesNoTxtInpBoxClose(); }); - yesNoTxtInpBoxCreate(<>Would you like to purchase a new server with {numeralWrapper.formatRAM(ram)} of RAM for {Money(cost)}? + yesNoTxtInpBoxCreate(<>Would you like to purchase a new server with {numeralWrapper.formatRAM(ram)} of RAM for ?

Please enter the server hostname below:
); } @@ -245,7 +245,7 @@ export function createUpgradeHomeCoresPopup(p: IPlayer): void { 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.

Purchasing an additional core (for a total of {p.getHomeComputer().cpuCores + 1}) will -cost {Money(cost)}); +cost ); } /** diff --git a/src/Locations/ui/CoresButton.tsx b/src/Locations/ui/CoresButton.tsx index 10930a96f..051293d98 100644 --- a/src/Locations/ui/CoresButton.tsx +++ b/src/Locations/ui/CoresButton.tsx @@ -59,6 +59,6 @@ export function CoresButton(props: IProps): React.ReactElement { disabled={!props.p.canAfford(cost)} onClick={buy} style={btnStyle} - text={<>Upgrade 'home' cores ({homeComputer.cpuCores} -> {homeComputer.cpuCores+1}) - {Money(cost)}} + text={<>Upgrade 'home' cores ({homeComputer.cpuCores} -> {homeComputer.cpuCores+1}) - } />); } diff --git a/src/Locations/ui/GymLocation.tsx b/src/Locations/ui/GymLocation.tsx index 100ca3847..fa4bbc0b9 100644 --- a/src/Locations/ui/GymLocation.tsx +++ b/src/Locations/ui/GymLocation.tsx @@ -77,22 +77,22 @@ export class GymLocation extends React.Component { Train Strength ({Money(cost)} / sec)} + text={<>Train Strength ( / sec)} /> Train Defense ({Money(cost)} / sec)} + text={<>Train Defense ( / sec)} /> Train Dexterity ({Money(cost)} / sec)} + text={<>Train Dexterity ( / sec)} /> Train Agility ({Money(cost)} / sec)} + text={<>Train Agility ( / sec)} /> ) diff --git a/src/Locations/ui/HospitalLocation.tsx b/src/Locations/ui/HospitalLocation.tsx index f8892d0f8..2528cdc78 100644 --- a/src/Locations/ui/HospitalLocation.tsx +++ b/src/Locations/ui/HospitalLocation.tsx @@ -60,7 +60,7 @@ export class HospitalLocation extends React.Component { currHp: this.props.p.hp, }); - dialogBoxCreate(<>You were healed to full health! The hospital billed you for {Money(cost)}); + dialogBoxCreate(<>You were healed to full health! The hospital billed you for ); } render(): React.ReactNode { @@ -70,7 +70,7 @@ export class HospitalLocation extends React.Component { Get treatment for wounds - {Money(cost)}} + text={<>Get treatment for wounds - } /> ) } diff --git a/src/Locations/ui/RamButton.tsx b/src/Locations/ui/RamButton.tsx index ace7cbc67..34ba08939 100644 --- a/src/Locations/ui/RamButton.tsx +++ b/src/Locations/ui/RamButton.tsx @@ -44,6 +44,6 @@ export function RamButton(props: IProps): React.ReactElement { disabled={!props.p.canAfford(cost)} onClick={buy} style={btnStyle} - text={<>Upgrade 'home' RAM ({homeComputer.maxRam}GB -> {homeComputer.maxRam*2}GB) - {Money(cost)}} + text={<>Upgrade 'home' RAM ({homeComputer.maxRam}GB -> {homeComputer.maxRam*2}GB) - } />); } diff --git a/src/Locations/ui/TechVendorLocation.tsx b/src/Locations/ui/TechVendorLocation.tsx index 92cf2ae5b..246b50c04 100644 --- a/src/Locations/ui/TechVendorLocation.tsx +++ b/src/Locations/ui/TechVendorLocation.tsx @@ -37,7 +37,7 @@ export function TechVendorLocation(props: IProps): React.ReactElement { key={i} onClick={() => createPurchaseServerPopup(i, props.p)} style={btnStyle} - text={<>Purchase {i}GB Server - {Money(cost)}} + text={<>Purchase {i}GB Server - } />, ) } diff --git a/src/Locations/ui/TorButton.tsx b/src/Locations/ui/TorButton.tsx index b3e78378f..db6ee2132 100644 --- a/src/Locations/ui/TorButton.tsx +++ b/src/Locations/ui/TorButton.tsx @@ -41,6 +41,6 @@ export function TorButton(props: IProps): React.ReactElement { disabled={!props.p.canAfford(CONSTANTS.TorRouterCost)} onClick={buy} style={btnStyle} - text={<>Purchase TOR router - {Money(CONSTANTS.TorRouterCost)}} + text={<>Purchase TOR router - } />); } diff --git a/src/Locations/ui/UniversityLocation.tsx b/src/Locations/ui/UniversityLocation.tsx index 6ceaafd71..fd0e1fe73 100644 --- a/src/Locations/ui/UniversityLocation.tsx +++ b/src/Locations/ui/UniversityLocation.tsx @@ -103,31 +103,31 @@ export class UniversityLocation extends React.Component { Take Data Structures course ({Money(dataStructuresCost)} / sec)} + text={<>Take Data Structures course ( / sec)} tooltip={earnHackingExpTooltip} /> Take Networks course ({Money(networksCost)} / sec)} + text={<>Take Networks course ( / sec)} tooltip={earnHackingExpTooltip} /> Take Algorithms course ({Money(algorithmsCost)} / sec)} + text={<>Take Algorithms course ( / sec)} tooltip={earnHackingExpTooltip} /> Take Management course ({Money(managementCost)} / sec)} + text={<>Take Management course ( / sec)} tooltip={earnCharismaExpTooltip} /> Take Leadership course ({Money(leadershipCost)} / sec)} + text={<>Take Leadership course ( / sec)} tooltip={earnCharismaExpTooltip} /> diff --git a/src/PersonObjects/Resleeving/ResleevingUI.tsx b/src/PersonObjects/Resleeving/ResleevingUI.tsx index 9dab831a9..008d7f785 100644 --- a/src/PersonObjects/Resleeving/ResleevingUI.tsx +++ b/src/PersonObjects/Resleeving/ResleevingUI.tsx @@ -254,6 +254,7 @@ function createResleeveUi(resleeve: Resleeve): IResleeveUIElems { costText: null, buyButton: null, }; + if(playerRef === null) return elems; if (!routing.isOn(Page.Resleeves)) { return elems; } @@ -334,7 +335,7 @@ function createResleeveUi(resleeve: Resleeve): IResleeveUIElems { const cost: number = resleeve.getCost(); elems.costPanel = createElement("div", { class: "resleeve-panel", width: "20%" }); elems.costText = createElement("p", { - innerHTML: `It costs ${renderToStaticMarkup(Money(cost))} ` + + innerHTML: `It costs ${renderToStaticMarkup()} ` + `to purchase this Sleeve.`, }); elems.buyButton = createElement("button", { @@ -343,7 +344,7 @@ function createResleeveUi(resleeve: Resleeve): IResleeveUIElems { clickListener: () => { if(playerRef == null) throw new Error("playerRef is null in buyButton.click()"); if (purchaseResleeve(resleeve, playerRef)) { - dialogBoxCreate((<>You re-sleeved for {Money(cost)}!), false); + dialogBoxCreate((<>You re-sleeved for !), false); } else { dialogBoxCreate(`You cannot afford to re-sleeve into this body`, false); } diff --git a/src/PersonObjects/Sleeve/SleeveAugmentationsUI.ts b/src/PersonObjects/Sleeve/SleeveAugmentationsUI.tsx similarity index 97% rename from src/PersonObjects/Sleeve/SleeveAugmentationsUI.ts rename to src/PersonObjects/Sleeve/SleeveAugmentationsUI.tsx index 2c020dfdb..55cbdb591 100644 --- a/src/PersonObjects/Sleeve/SleeveAugmentationsUI.ts +++ b/src/PersonObjects/Sleeve/SleeveAugmentationsUI.tsx @@ -2,6 +2,7 @@ * Module for handling the UI for purchasing Sleeve Augmentations * This UI is a popup, not a full page */ +import React from 'react'; import { Sleeve } from "./Sleeve"; import { findSleevePurchasableAugs } from "./SleeveHelpers"; @@ -102,7 +103,7 @@ export function createSleevePurchaseAugsPopup(sleeve: Sleeve, p: IPlayer): void innerHTML: [ `

${aug.name}


`, - `Cost: ${renderToStaticMarkup(Money(aug.startingCost))}

`, + `Cost: ${renderToStaticMarkup()}

`, `${info}`, ].join(" "), padding: "2px", diff --git a/src/PersonObjects/Sleeve/SleeveUI.tsx b/src/PersonObjects/Sleeve/SleeveUI.tsx index a1b0c9115..5b38fd4f1 100644 --- a/src/PersonObjects/Sleeve/SleeveUI.tsx +++ b/src/PersonObjects/Sleeve/SleeveUI.tsx @@ -1,6 +1,7 @@ /** * Module for handling the Sleeve UI */ +import React from 'react'; import { createSleevePurchaseAugsPopup } from "./SleeveAugmentationsUI"; import { Sleeve } from "./Sleeve"; import { SleeveTaskType } from "./SleeveTaskTypesEnum"; @@ -202,6 +203,7 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { currentEarningsInfo: null, totalEarningsButton: null, } + if(playerRef === null) return elems; if (!routing.isOn(Page.Sleeves)) { return elems; } @@ -223,13 +225,14 @@ function createSleeveUi(sleeve: Sleeve, allSleeves: Sleeve[]): ISleeveUIElems { class: "std-button", innerText: "Travel", clickListener: () => { + if(playerRef === null) return; const popupId = "sleeve-travel-popup"; const popupArguments: HTMLElement[] = []; popupArguments.push(createPopupCloseButton(popupId, { class: "std-button" })); popupArguments.push(createElement("p", { innerHTML: "Have this sleeve travel to a different city. This affects " + "the gyms and universities at which this sleeve can study. " + - `Traveling to a different city costs ${renderToStaticMarkup(Money(CONSTANTS.TravelCost))}. ` + + `Traveling to a different city costs ${renderToStaticMarkup()}. ` + "It will also CANCEL the sleeve's current task (setting it to idle)", })); for (const cityName in Cities) { @@ -346,7 +349,7 @@ function updateSleeveUi(sleeve: Sleeve, elems: ISleeveUIElems): void { if (sleeve.currentTask === SleeveTaskType.Crime) { const data = [ - [`Money`, Money(parseFloat(sleeve.currentTaskLocation)), `(on success)`], + [`Money`, , `(on success)`], [`Hacking Exp`, numeralWrapper.formatExp(sleeve.gainRatesForTask.hack), `(2x on success)`], [`Strength Exp`, numeralWrapper.formatExp(sleeve.gainRatesForTask.str), `(2x on success)`], [`Defense Exp`, numeralWrapper.formatExp(sleeve.gainRatesForTask.def), `(2x on success)`], diff --git a/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx b/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx index 91fd3f8f3..6f1fd3070 100644 --- a/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx +++ b/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx @@ -75,7 +75,7 @@ export function CovenantPurchasesRoot(props: IProps): React.ReactElement {

Would you like to purchase an additional Duplicate Sleeve from The Covenant - for {Money(purchaseCost())}? + for ?


diff --git a/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx b/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx index d89789b5d..98880b897 100644 --- a/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx +++ b/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx @@ -79,7 +79,7 @@ export class CovenantSleeveMemoryUpgrade extends React.Component } else if (this.state.amt > maxMemory) { purchaseBtnContent = <>Memory cannot exceed 100?; } else { - purchaseBtnContent = <>Purchase {this.state.amt} memory - {Money(cost)}?; + purchaseBtnContent = <>Purchase {this.state.amt} memory - ?; } return ( diff --git a/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx b/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx index dde778947..9e51f5116 100644 --- a/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx +++ b/src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx @@ -7,7 +7,7 @@ import { StatsTable } from "../../../ui/React/StatsTable"; export function MoreEarningsContent(sleeve: Sleeve): React.ReactElement { return (<> {StatsTable([ - ['Money ', Money(sleeve.earningsForTask.money)], + ['Money ', ], ['Hacking Exp ', numeralWrapper.formatExp(sleeve.earningsForTask.hack)], ['Strength Exp ', numeralWrapper.formatExp(sleeve.earningsForTask.str)], ['Defense Exp ', numeralWrapper.formatExp(sleeve.earningsForTask.def)], @@ -17,7 +17,7 @@ export function MoreEarningsContent(sleeve: Sleeve): React.ReactElement { ], 'Earnings for Current Task:')}
{StatsTable([ - ['Money: ', Money(sleeve.earningsForPlayer.money)], + ['Money: ', ], ['Hacking Exp: ', numeralWrapper.formatExp(sleeve.earningsForPlayer.hack)], ['Strength Exp: ', numeralWrapper.formatExp(sleeve.earningsForPlayer.str)], ['Defense Exp: ', numeralWrapper.formatExp(sleeve.earningsForPlayer.def)], @@ -27,7 +27,7 @@ export function MoreEarningsContent(sleeve: Sleeve): React.ReactElement { ], 'Total Earnings for Host Consciousness:')}
{StatsTable([ - ['Money: ', Money(sleeve.earningsForSleeves.money)], + ['Money: ', ], ['Hacking Exp: ', numeralWrapper.formatExp(sleeve.earningsForSleeves.hack)], ['Strength Exp: ', numeralWrapper.formatExp(sleeve.earningsForSleeves.str)], ['Defense Exp: ', numeralWrapper.formatExp(sleeve.earningsForSleeves.def)], diff --git a/src/StockMarket/BuyingAndSelling.tsx b/src/StockMarket/BuyingAndSelling.tsx index cbabd494e..bd12cf4c0 100644 --- a/src/StockMarket/BuyingAndSelling.tsx +++ b/src/StockMarket/BuyingAndSelling.tsx @@ -60,7 +60,7 @@ export function buyStock(stock: Stock, shares: number, workerScript: WorkerScrip if (workerScript) { workerScript.log("buyStock", `You do not have enough money to purchase this position. You need ${numeralWrapper.formatMoney(totalPrice)}.`); } else if (opts.suppressDialog !== true) { - dialogBoxCreate(<>You do not have enough money to purchase this. You need {Money(totalPrice)}); + dialogBoxCreate(<>You do not have enough money to purchase this. You need ); } return false; @@ -92,7 +92,7 @@ export function buyStock(stock: Stock, shares: number, workerScript: WorkerScrip `Paid ${numeralWrapper.formatMoney(CONSTANTS.StockMarketCommission)} in commission fees.` workerScript.log("buyStock", resultTxt) } else if (opts.suppressDialog !== true) { - dialogBoxCreate(<>Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for {Money(totalPrice)}. Paid {Money(CONSTANTS.StockMarketCommission)} in commission fees.); + dialogBoxCreate(<>Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid in commission fees.); } return true; @@ -150,7 +150,7 @@ export function sellStock(stock: Stock, shares: number, workerScript: WorkerScri `After commissions, you gained a total of ${numeralWrapper.formatMoney(gains)}.`; workerScript.log("sellStock", resultTxt) } else if (opts.suppressDialog !== true) { - dialogBoxCreate(<>Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of {Money(gains)}.); + dialogBoxCreate(<>Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of .); } return true; @@ -188,7 +188,7 @@ export function shortStock(stock: Stock, shares: number, workerScript: WorkerScr "money to purchase this short position. You need " + numeralWrapper.formatMoney(totalPrice)); } else if (opts.suppressDialog !== true) { - dialogBoxCreate(<>You do not have enough money to purchase this short position. You need {Money(totalPrice)}); + dialogBoxCreate(<>You do not have enough money to purchase this short position. You need ); } return false; @@ -222,7 +222,7 @@ export function shortStock(stock: Stock, shares: number, workerScript: WorkerScr `in commission fees.`; workerScript.log("shortStock", resultTxt); } else if (!opts.suppressDialog) { - dialogBoxCreate(<>Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for {Money(totalPrice)}. Paid {Money(CONSTANTS.StockMarketCommission)} in commission fees.); + dialogBoxCreate(<>Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid in commission fees.); } return true; @@ -287,7 +287,7 @@ export function sellShort(stock: Stock, shares: number, workerScript: WorkerScri `After commissions, you gained a total of ${numeralWrapper.formatMoney(totalGain)}`; workerScript.log("sellShort", resultTxt); } else if (!opts.suppressDialog) { - dialogBoxCreate(<>Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of {Money(totalGain)}); + dialogBoxCreate(<>Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of ); } return true; diff --git a/src/StockMarket/OrderProcessing.tsx b/src/StockMarket/OrderProcessing.tsx index f6a5e5d37..a44a71a59 100644 --- a/src/StockMarket/OrderProcessing.tsx +++ b/src/StockMarket/OrderProcessing.tsx @@ -150,7 +150,7 @@ function executeOrder(order: Order, refs: IProcessOrderRefs): void { for (let i = 0; i < stockOrders.length; ++i) { if (order == stockOrders[i]) { stockOrders.splice(i, 1); - dialogBoxCreate(<>{order.type} for {stock.symbol} @ {Money(order.price)} ({pos}) was filled ({numeralWrapper.formatShares(Math.round(order.shares))} shares)); + dialogBoxCreate(<>{order.type} for {stock.symbol} @ ({pos}) was filled ({numeralWrapper.formatShares(Math.round(order.shares))} shares)); refs.rerenderFn(); return; } @@ -160,7 +160,7 @@ function executeOrder(order: Order, refs: IProcessOrderRefs): void { console.error(order); } else { if (isBuy) { - dialogBoxCreate(<>Failed to execute {order.type} for {stock.symbol} @ {Money(order.price)} ({pos}). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares); + dialogBoxCreate(<>Failed to execute {order.type} for {stock.symbol} @ ({pos}). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares); } } } diff --git a/src/StockMarket/ui/InfoAndPurchases.tsx b/src/StockMarket/ui/InfoAndPurchases.tsx index a4bd49230..349959db4 100644 --- a/src/StockMarket/ui/InfoAndPurchases.tsx +++ b/src/StockMarket/ui/InfoAndPurchases.tsx @@ -107,7 +107,7 @@ export class InfoAndPurchases extends React.Component { Buy WSE Account - {Money(cost)}} + text={<>Buy WSE Account - } /> ) } @@ -125,7 +125,7 @@ export class InfoAndPurchases extends React.Component { disabled={!this.props.p.canAfford(cost) || !this.props.p.hasWseAccount} onClick={this.purchaseTixApiAccess} style={blockStyleMarkup} - text={<>Buy Trade Information eXchange (TIX) API Access - {Money(cost)}} + text={<>Buy Trade Information eXchange (TIX) API Access - } /> ) } @@ -145,7 +145,7 @@ export class InfoAndPurchases extends React.Component { Buy 4S Market Data Access - {Money(cost)}} + text={<>Buy 4S Market Data Access - } tooltip={"Lets you view additional pricing and volatility information about stocks"} /> ) @@ -174,7 +174,7 @@ export class InfoAndPurchases extends React.Component { Buy 4S Market Data TIX API Access - {Money(cost)}} + text={<>Buy 4S Market Data TIX API Access - } tooltip={"Let you access 4S Market Data through Netscript"} /> ) @@ -216,7 +216,7 @@ export class InfoAndPurchases extends React.Component { {this.renderPurchase4SMarketDataTixApiAccessButton()}

Commission Fees: Every transaction you make has - a {Money(CONSTANTS.StockMarketCommission)} commission fee. + a commission fee.


WARNING: When you reset after installing Augmentations, the Stock diff --git a/src/StockMarket/ui/StockTicker.tsx b/src/StockMarket/ui/StockTicker.tsx index a5165344e..dc6de5280 100644 --- a/src/StockMarket/ui/StockTicker.tsx +++ b/src/StockMarket/ui/StockTicker.tsx @@ -115,7 +115,7 @@ export class StockTicker extends React.Component { const cost = getBuyTransactionCost(stock, qty, this.state.position); if (cost == null) { return null; } - return <>Purchasing {numeralWrapper.formatShares(qty)} shares ({this.state.position === PositionTypes.Long ? "Long" : "Short"}) will cost {Money(cost)}.; + return <>Purchasing {numeralWrapper.formatShares(qty)} shares ({this.state.position === PositionTypes.Long ? "Long" : "Short"}) will cost .; } getQuantity(): number { @@ -140,7 +140,7 @@ export class StockTicker extends React.Component { const cost = getSellTransactionGain(stock, qty, this.state.position); if (cost == null) { return null; } - return <>Selling {numeralWrapper.formatShares(qty)} shares ({this.state.position === PositionTypes.Long ? "Long" : "Short"}) will result in a gain of {Money(cost)}.; + return <>Selling {numeralWrapper.formatShares(qty)} shares ({this.state.position === PositionTypes.Long ? "Long" : "Short"}) will result in a gain of .; } handleBuyButtonClick(): void { diff --git a/src/StockMarket/ui/StockTickerOrder.tsx b/src/StockMarket/ui/StockTickerOrder.tsx index e6d5b2b50..f055f80ce 100644 --- a/src/StockMarket/ui/StockTickerOrder.tsx +++ b/src/StockMarket/ui/StockTickerOrder.tsx @@ -29,7 +29,7 @@ export class StockTickerOrder extends React.Component { const order = this.props.order; const posTxt = order.pos === PositionTypes.Long ? "Long Position" : "Short Position"; - const txt = <>{order.type} - {posTxt} - {numeralWrapper.formatShares(order.shares)} @ {Money(order.price)} + const txt = <>{order.type} - {posTxt} - {numeralWrapper.formatShares(order.shares)} @ return (

  • diff --git a/src/StockMarket/ui/StockTickerPositionText.tsx b/src/StockMarket/ui/StockTickerPositionText.tsx index dbb1977aa..06a11b8bb 100644 --- a/src/StockMarket/ui/StockTickerPositionText.tsx +++ b/src/StockMarket/ui/StockTickerPositionText.tsx @@ -43,10 +43,10 @@ export class StockTickerPositionText extends React.Component { Shares: {numeralWrapper.formatShares(stock.playerShares)}


    - Average Price: {Money(stock.playerAvgPx)} (Total Cost: {Money(totalCost)}) + Average Price: (Total Cost:


    - Profit: {Money(gains)} ({numeralWrapper.formatPercentage(percentageGains)}) + Profit: ({numeralWrapper.formatPercentage(percentageGains)})


    ) @@ -75,10 +75,10 @@ export class StockTickerPositionText extends React.Component { Shares: {numeralWrapper.formatShares(stock.playerShortShares)}


    - Average Price: {Money(stock.playerAvgShortPx)} (Total Cost: {Money(totalCost)}) + Average Price: (Total Cost: )


    - Profit: {Money(gains)} ({numeralWrapper.formatPercentage(percentageGains)}) + Profit: ({numeralWrapper.formatPercentage(percentageGains)})


    ) @@ -96,13 +96,13 @@ export class StockTickerPositionText extends React.Component { Max Shares: {numeralWrapper.formatShares(stock.maxShares)}

    - Ask Price: {Money(stock.getAskPrice())} + Ask Price: See Investopedia for details on what this is


    - Bid Price: {Money(stock.getBidPrice())} + Bid Price: See Investopedia for details on what this is diff --git a/src/ui/ActiveScripts/ScriptProduction.tsx b/src/ui/ActiveScripts/ScriptProduction.tsx index d82d430dc..eac508871 100644 --- a/src/ui/ActiveScripts/ScriptProduction.tsx +++ b/src/ui/ActiveScripts/ScriptProduction.tsx @@ -26,18 +26,18 @@ export function ScriptProduction(props: IProps): React.ReactElement { Total online production of Active scripts:  - {Money(onlineProduction)} + / sec
    Total online production since last Aug installation:  - {Money(props.p.scriptProdSinceLastAug)} +  ( - {Money(prodRateSinceLastAug)} + / sec )

    diff --git a/src/ui/ActiveScripts/WorkerScriptAccordion.tsx b/src/ui/ActiveScripts/WorkerScriptAccordion.tsx index f055fd07a..5bb690bd1 100644 --- a/src/ui/ActiveScripts/WorkerScriptAccordion.tsx +++ b/src/ui/ActiveScripts/WorkerScriptAccordion.tsx @@ -53,13 +53,13 @@ export function WorkerScriptAccordion(props: IProps): React.ReactElement {
    Args: {arrayToString(props.workerScript.args)}
    Online Time: {convertTimeMsToTimeElapsedString(scriptRef.onlineRunningTime * 1e3)}
    Offline Time: {convertTimeMsToTimeElapsedString(scriptRef.offlineRunningTime * 1e3)}
    -
    Total online production: {Money(scriptRef.onlineMoneyMade)}
    +
    Total online production: 
    {(Array(26).join(" ") + numeralWrapper.formatExp(scriptRef.onlineExpGained) + " hacking exp")}
    -
    Online production rate: {Money(onlineMps)} / second
    +
    Online production rate:  / second
    {(Array(25).join(" ") + numeralWrapper.formatExp(onlineEps) + " hacking exp / second")}
    -
    Total offline production: {Money(scriptRef.offlineMoneyMade)}
    +
    Total offline production: 
    {(Array(27).join(" ") + numeralWrapper.formatExp(scriptRef.offlineExpGained) + " hacking exp")}
    -
    Offline production rate: {Money(offlineMps)} / second
    +
    Offline production rate:  / second
    {(Array(26).join(" ") + numeralWrapper.formatExp(offlineEps) +  " hacking exp / second")}
    ]]; + if (src.bladeburner) { parts.push([`Bladeburner:`, ]) } + if (src.codingcontract) { parts.push([`Coding Contracts:`, ]) } + if (src.work) { parts.push([`Company Work:`, ]) } + if (src.class) { parts.push([`Class:`, ]) } + if (src.corporation) { parts.push([`Corporation:`, ]) } + if (src.crime) { parts.push([`Crimes:`, ]) } + if (src.gang) { parts.push([`Gang:`, ]) } + if (src.hacking) { parts.push([`Hacking:`, ]) } + if (src.hacknetnode) { parts.push([`Hacknet Nodes:`, ]) } + if (src.hospitalization) { parts.push([`Hospitalization:`, ]) } + if (src.infiltration) { parts.push([`Infiltration:`, ]) } + if (src.stock) { parts.push([`Stock Market:`, ]) } + if (src.casino) { parts.push([`Casino:`, ]) } + if (src.sleeves) { parts.push([`Sleeves:`, ]) } return StatsTable(parts); } diff --git a/src/ui/React/Money.tsx b/src/ui/React/Money.tsx index eb2b2927d..4dd49c09d 100644 --- a/src/ui/React/Money.tsx +++ b/src/ui/React/Money.tsx @@ -1,6 +1,16 @@ import * as React from "react"; import { numeralWrapper } from "../../ui/numeralFormat"; +import { IPlayer } from "../../PersonObjects/IPlayer"; -export function Money(money: number | string): JSX.Element { - return {typeof money === 'number' ? numeralWrapper.formatMoney(money) : money} +interface IProps { + money: number | string; + player?: IPlayer; +} +export function Money(props: IProps): JSX.Element { + if(props.player !== undefined) { + if(typeof props.money !== 'number') throw new Error('if player if provided, money should be number, contact dev'); + if(!props.player.canAfford(props.money)) + return {numeralWrapper.formatMoney(props.money)} + } + return {typeof props.money === 'number' ? numeralWrapper.formatMoney(props.money) : props.money} } \ No newline at end of file diff --git a/src/ui/React/MoneyRate.tsx b/src/ui/React/MoneyRate.tsx index 6e03a06f5..611a94fe1 100644 --- a/src/ui/React/MoneyRate.tsx +++ b/src/ui/React/MoneyRate.tsx @@ -1,6 +1,7 @@ +import React from 'react'; import { numeralWrapper } from "../../ui/numeralFormat"; import { Money } from "../../ui/React/Money"; export function MoneyRate(money: number): JSX.Element { - return Money(`${numeralWrapper.formatMoney(money)} / sec`); + return ; } \ No newline at end of file From c9efa977fbc02fc5e9fad9c172a20be1fcba20fa Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 4 Sep 2021 12:15:16 -0400 Subject: [PATCH 07/12] BN10 now has the sleeve you would gain but inside, also it starts with 25-25 sync-shock --- dist/engine.bundle.js | 4 +- dist/engineStyle.bundle.js | 2 +- dist/engineStyle.css | 9 ++ dist/vendor.bundle.js | 30 +++--- .../Player/PlayerObjectGeneralMethods.jsx | 100 +++--------------- 5 files changed, 43 insertions(+), 102 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index bf09321a4..7a8574845 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],m=0,p=[];m${e}`;r.getElementById("terminal-input").insertAdjacentHTML("beforebegin",a),function(){const e=r.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.postError=function(e){i(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){i(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){i(e,{id:"hack-progress"})},t.postElement=function(e){i(a.renderToStaticMarkup(e))},t.postContent=i},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamCost=t.RamCosts=t.RamCostConstants=void 0,t.RamCostConstants={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},t.RamCosts={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>t.RamCostConstants.ScriptScanRamCost,hack:()=>t.RamCostConstants.ScriptHackRamCost,hackAnalyzeThreads:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackChance:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>t.RamCostConstants.ScriptGrowRamCost,growthAnalyze:()=>t.RamCostConstants.ScriptGrowthAnalyzeRamCost,weaken:()=>t.RamCostConstants.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>t.RamCostConstants.ScriptPortProgramRamCost,brutessh:()=>t.RamCostConstants.ScriptPortProgramRamCost,ftpcrack:()=>t.RamCostConstants.ScriptPortProgramRamCost,relaysmtp:()=>t.RamCostConstants.ScriptPortProgramRamCost,httpworm:()=>t.RamCostConstants.ScriptPortProgramRamCost,sqlinject:()=>t.RamCostConstants.ScriptPortProgramRamCost,run:()=>t.RamCostConstants.ScriptRunRamCost,exec:()=>t.RamCostConstants.ScriptExecRamCost,spawn:()=>t.RamCostConstants.ScriptSpawnRamCost,kill:()=>t.RamCostConstants.ScriptKillRamCost,killall:()=>t.RamCostConstants.ScriptKillRamCost,exit:()=>0,scp:()=>t.RamCostConstants.ScriptScpRamCost,ls:()=>t.RamCostConstants.ScriptScanRamCost,ps:()=>t.RamCostConstants.ScriptScanRamCost,hasRootAccess:()=>t.RamCostConstants.ScriptHasRootAccessRamCost,getIp:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHostname:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHackingLevel:()=>t.RamCostConstants.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getServer:()=>t.RamCostConstants.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxMoney:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerGrowth:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerNumPortsRequired:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRam:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxRam:()=>t.RamCostConstants.ScriptGetServerMaxRam,getServerUsedRam:()=>t.RamCostConstants.ScriptGetServerUsedRam,serverExists:()=>t.RamCostConstants.ScriptGetServerRamCost,fileExists:()=>t.RamCostConstants.ScriptFileExistsRamCost,isRunning:()=>t.RamCostConstants.ScriptIsRunningRamCost,getStockSymbols:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockAskPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockBidPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPosition:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockMaxShares:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPurchaseCost:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockSaleGain:()=>t.RamCostConstants.ScriptGetStockRamCost,buyStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,shortStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellShort:()=>t.RamCostConstants.ScriptBuySellStockRamCost,placeOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,cancelOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getOrders:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockVolatility:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockForecast:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketData:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>t.RamCostConstants.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>t.RamCostConstants.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>t.RamCostConstants.ScriptGetPurchaseServerRamCost,purchaseServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,deleteServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,getPurchasedServers:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,write:()=>t.RamCostConstants.ScriptReadWriteRamCost,tryWrite:()=>t.RamCostConstants.ScriptReadWriteRamCost,read:()=>t.RamCostConstants.ScriptReadWriteRamCost,peek:()=>t.RamCostConstants.ScriptReadWriteRamCost,clear:()=>t.RamCostConstants.ScriptReadWriteRamCost,getPortHandle:()=>10*t.RamCostConstants.ScriptReadWriteRamCost,rm:()=>t.RamCostConstants.ScriptReadWriteRamCost,scriptRunning:()=>t.RamCostConstants.ScriptArbScriptRamCost,scriptKill:()=>t.RamCostConstants.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>t.RamCostConstants.ScriptGetScriptRamCost,getHackTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getGrowTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getWeakenTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getScriptIncome:()=>t.RamCostConstants.ScriptGetScriptRamCost,getScriptExpGain:()=>t.RamCostConstants.ScriptGetScriptRamCost,getRunningScript:()=>t.RamCostConstants.ScriptGetRunningScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>t.RamCostConstants.ScriptGetFavorToDonate,universityCourse:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,gymWorkout:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,travelToCity:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseTor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseProgram:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getCurrentServer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,connect:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,manualHack:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,installBackdoor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getStats:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getPlayer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,hospitalize:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,isBusy:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,stopAction:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/2,workForCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,applyToCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getCompanyRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,joinFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,workForFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getFactionRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,donateToFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,createProgram:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,commitCrime:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeChance:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationCost:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,softReset:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,installAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,gang:{createGang:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,inGang:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getMemberNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,recruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getTaskNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getTaskStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,setMemberTask:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,ascendMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,switchCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getStamina:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost,getContractType:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getData:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getDescription:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToShockRecovery:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToSynchronize:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCommitCrime:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,travel:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCompanyWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToFactionWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToGymWorkout:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveStats:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getTask:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getInformation:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>t.RamCostConstants.ScriptSleeveBaseRamCost},heart:{break:()=>0}},t.getRamCost=function(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=t.RamCosts[e[0]];for(let t=1;t
    In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

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

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

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

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

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

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

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

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

    There are six different types of Nodes:

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

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

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

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

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

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

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

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

    Other Notes:

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

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

    -Miscellaneous Nodes slowly raise their defense over time

    -Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.52.9 - 2021-08-27 Less lag! (hydroflame & community)\n -------------------------------------------\n\n ** Active Scripts page **\n\n * Now less laggy, has pagination.\n\n ** File diagnostic ** \n\n * Added a popup found under options that shows the files you own and how\n large they are. This help find bugs and leftover massive logs files.\n\n ** Corporation **\n\n * Added safeguard against a very specific bug that causes NaN money. I'm\n still not sure what the root cause is but it should prevent corp from\n breaking.\n\n ** Netscript ** \n\n * tprintf is a new function that doesn't print the filename.\n\n ** Misc. **\n\n * Infiltration kills you if you try to automate it. (@threehams)\n * Fix beautify button not working\n * Added bladeburner_analysis_mult to getPlayer() (@brusby)\n * Fixed joining bladeburner via netscript functions. (@omuretsu)\n * All bladeburner actions are click-to-copy\n * nerf noodle bar\n"}},function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.dialogBoxCreate=t.MessagePopup=void 0;const r=n(79),i=n(36),o=a(n(0));function s(e){return o.default.createElement(o.default.Fragment,null,e.content)}t.MessagePopup=s,t.dialogBoxCreate=function(e,t=!1){const n="popup-"+Array.from(Array(16)).map(()=>`${i.getRandomInt(0,9)}`).join("");"string"==typeof e?t?r.createPopup(n,s,{content:o.default.createElement("pre",{dangerouslySetInnerHTML:{__html:e}})}):r.createPopup(n,s,{content:o.default.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"
    ")}})}):r.createPopup(n,s,{content:e})}},function(e,t,n){"use strict";function a(e,t={}){const n=document.createElement(e);return void 0!==t.id&&(n.id=t.id),void 0!==t.class&&(n.className=t.class),void 0!==t.innerHTML&&(n.innerHTML=t.innerHTML),void 0!==t.innerText&&(n.innerText=t.innerText),void 0!==t.tabIndex&&(n.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(n,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(n,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(n,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onkeydown&&e.addEventListener("keydown",t.onkeydown),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(n,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.height&&(e.style.height=t.height),void 0!==t.top&&(e.style.top=t.top),void 0!==t.left&&(e.style.left=t.left),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(a("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=void 0,t.createElement=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentations=void 0,t.Augmentations={}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetFaction=t.initFactions=t.factionExists=t.AddToFactions=t.loadFactions=t.Factions=void 0;const a=n(131),r=n(756),i=n(27);function o(e){const n=e.name;t.Factions[n]=e}function s(e){return t.Factions.hasOwnProperty(e)}function l(e){if(!(e instanceof a.Faction))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");const n=e.name;s(n)&&(e.favor=t.Factions[n].favor,delete t.Factions[n]),o(e)}t.Factions={},t.loadFactions=function(e){t.Factions=JSON.parse(e,i.Reviver)},t.AddToFactions=o,t.factionExists=s,t.initFactions=function(){for(const e in r.FactionInfos)l(new a.Faction(e))},t.resetFaction=l},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return _e});var a=n(20),r=n(14),i=n(87),o=n(4),s=n(133),l=n(100),c=n(826),u=n(468),m=n(184),p=n(35),d=n(41),h=n(11),_=n(557),g=n(16),f=n(80),y=n(825),b=n(824),E=n(823),v=n(822),C=n(114),k=n(46),P=n(28),S=n(50),O=n(47),M=n(477),T=n(95),x=n(89),w=n(116),A=n(88),R=(n(24),n(1)),N=n(180),D=n(322),B=n(108),I=n(118),L=n(774),W=n(23),F=n(26),j=n(43),U=n(45),H=n(52),G=n(761),K=n(82),q=n(186),$=n(473),Y=n(551),z=n(149),V=n(760),J=n(19),X=n(759),Q=n(31),Z=n(132),ee=n(67),te=n(550),ne=n(758),ae=n(34),re=n(757),ie=n(79),oe=n(12),se=n(321),le=n(97),ce=n(549),ue=n(44),me=(n(941),n(940),n(0)),pe=n.n(me),de=n(22),he=n.n(de);e(document).keydown(function(e){if(!0!==F.Settings.DisableHotkeys){if(!(R.Player.isWorking||B.redPillFlag||x.c||u.a))if(e.keyCode==ue.KEY.T&&e.altKey)e.preventDefault(),_e.loadTerminalContent();else if(e.keyCode===ue.KEY.C&&e.altKey)e.preventDefault(),_e.loadCharacterContent();else if(e.keyCode===ue.KEY.E&&e.altKey)e.preventDefault(),_e.loadScriptEditorContent();else if(e.keyCode===ue.KEY.S&&e.altKey)e.preventDefault(),_e.loadActiveScriptsContent();else if(e.keyCode===ue.KEY.H&&e.altKey)e.preventDefault(),_e.loadHacknetNodesContent();else if(e.keyCode===ue.KEY.W&&e.altKey)e.preventDefault(),_e.loadLocationContent();else if(e.keyCode===ue.KEY.J&&e.altKey)e.preventDefault(),_e.loadJobContent();else if(e.keyCode===ue.KEY.R&&e.altKey)e.preventDefault(),_e.loadTravelContent();else if(e.keyCode===ue.KEY.P&&e.altKey)e.preventDefault(),_e.loadCreateProgramContent();else if(e.keyCode===ue.KEY.F&&e.altKey){if(J.routing.isOn(J.Page.Terminal)&&k.FconfSettings.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),_e.loadFactionsContent()}else e.keyCode===ue.KEY.A&&e.altKey?(e.preventDefault(),_e.loadAugmentationsContent()):e.keyCode===ue.KEY.U&&e.altKey?(e.preventDefault(),_e.loadTutorialContent()):e.keyCode===ue.KEY.B&&e.altKey?(e.preventDefault(),_e.loadBladeburnerContent()):e.keyCode===ue.KEY.G&&e.altKey&&(e.preventDefault(),_e.loadGangContent());e.keyCode===ue.KEY.O&&e.altKey&&(e.preventDefault(),Object(se.b)())}});const _e={Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null},Display:{terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,createProgramContent:null,factionsContent:null,factionContent:null,augmentationsContent:null,milestonesContent:null,tutorialContent:null,infiltrationContent:null,stockMarketContent:null,gangContent:null,bladeburnerContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},indexedDb:void 0,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){_e.hideAllContent(),_e.Display.terminalContent.style.display="block",J.routing.navigateTo(J.Page.Terminal),ae.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){_e.hideAllContent(),_e.Display.characterContent.style.display="block",_e.updateCharacterInfo(),J.routing.navigateTo(J.Page.CharacterInfo),ae.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){_e.hideAllContent(),_e.Display.scriptEditorContent.style.display="block",J.routing.navigateTo(J.Page.ScriptEditor),he.a.render(pe.a.createElement(L.Root,{filename:e,code:t,player:R.Player,engine:this}),_e.Display.scriptEditorContent),ae.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){_e.hideAllContent(),_e.Display.activeScriptsContent.style.display="block",J.routing.navigateTo(J.Page.ActiveScripts),he.a.render(pe.a.createElement(te.ActiveScriptsRoot,{p:R.Player,workerScripts:w.workerScripts}),_e.Display.activeScriptsContent),ae.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){_e.hideAllContent(),_e.Display.hacknetNodesContent.style.display="block",J.routing.navigateTo(J.Page.HacknetNodes),Object(P.q)(),ae.MainMenuLinks.HacknetNodes.classList.add("active")},loadCreateProgramContent:function(){_e.hideAllContent(),_e.Display.createProgramContent.style.display="block",Object(D.a)(),J.routing.navigateTo(J.Page.CreateProgram),ae.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){_e.hideAllContent(),_e.Display.factionsContent.style.display="block",J.routing.navigateTo(J.Page.Factions),he.a.render(pe.a.createElement(y.FactionList,{player:R.Player,engine:this}),_e.Display.factionsContent),ae.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){_e.hideAllContent(),_e.Display.factionContent.style.display="block",J.routing.navigateTo(J.Page.Faction)},loadAugmentationsContent:function(){_e.hideAllContent(),_e.Display.augmentationsContent.style.display="block",J.routing.navigateTo(J.Page.Augmentations),Object(i.c)(_e.Display.augmentationsContent),ae.MainMenuLinks.Augmentations.classList.add("active")},loadMilestonesContent:function(){_e.hideAllContent(),_e.Display.milestonesContent.style.display="block",J.routing.navigateTo(J.Page.Milestones),Object(G.displayMilestonesContent)(),ae.MainMenuLinks.Milestones.classList.add("active")},loadTutorialContent:function(){_e.hideAllContent(),_e.Display.tutorialContent.style.display="block",J.routing.navigateTo(J.Page.Tutorial),ae.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){_e.hideAllContent(),Object(_.b)(),J.routing.navigateTo(J.Page.DevMenu),ae.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(e=!0){_e.hideAllContent(),_e.Display.locationContent.style.display="block",ae.MainMenuLinks.City.classList.add("active"),J.routing.navigateTo(J.Page.Location);const t=pe.a.createElement(M.LocationRoot,{initiallyInCity:e,engine:_e,p:R.Player});he.a.render(t,_e.Display.locationContent)},loadTravelContent:function(){_e.hideAllContent(),R.Player.gotoLocation(O.LocationName.TravelAgency),_e.Display.locationContent.style.display="block",ae.MainMenuLinks.Travel.classList.add("active"),J.routing.navigateTo(J.Page.Location);const e=pe.a.createElement(M.LocationRoot,{initiallyInCity:!1,engine:_e,p:R.Player});he.a.render(e,_e.Display.locationContent)},loadJobContent:function(){if(""==R.Player.companyName)return void Object(oe.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.");_e.hideAllContent(),R.Player.gotoLocation(R.Player.companyName),_e.Display.locationContent.style.display="block",ae.MainMenuLinks.Job.classList.add("active"),J.routing.navigateTo(J.Page.Location);const e=pe.a.createElement(M.LocationRoot,{initiallyInCity:!1,engine:_e,p:R.Player});he.a.render(e,_e.Display.locationContent)},loadWorkInProgressContent:function(){_e.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",_e.Display.workInProgressContent.style.display="block",J.routing.navigateTo(J.Page.WorkInProgress)},loadRedPillContent:function(){_e.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",_e.Display.redPillContent.style.display="block",J.routing.navigateTo(J.Page.RedPill)},loadCinematicTextContent:function(){_e.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",_e.Display.cinematicTextContent.style.display="block",J.routing.navigateTo(J.Page.CinematicText)},loadInfiltrationContent:function(e,t,n){_e.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",_e.Display.infiltrationContent.style.display="block",J.routing.navigateTo(J.Page.Infiltration),Object(v.displayInfiltrationContent)(this,R.Player,e,t,n)},loadStockMarketContent:function(){_e.hideAllContent(),_e.Display.stockMarketContent.style.display="block",J.routing.navigateTo(J.Page.StockMarket),Object(H.displayStockMarketContent)()},loadGangContent:function(){_e.hideAllContent(),R.Player.inGang()?(_e.Display.gangContent.style.display="block",J.routing.navigateTo(J.Page.Gang),Object(b.displayGangContent)(this,R.Player.gang,R.Player)):(_e.loadTerminalContent(),J.routing.navigateTo(J.Page.Terminal))},loadMissionContent:function(){_e.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",_e.Display.missionContent.style.display="block",J.routing.navigateTo(J.Page.Mission)},loadCorporationContent:function(){R.Player.corporation instanceof d.c&&(_e.hideAllContent(),J.routing.navigateTo(J.Page.Corporation),R.Player.corporation.createUI())},loadBladeburnerContent:function(){R.Player.bladeburner instanceof l.Bladeburner&&(_e.hideAllContent(),J.routing.navigateTo(J.Page.Bladeburner),_e.Display.bladeburnerContent.style.display="block",he.a.render(pe.a.createElement(E.Root,{bladeburner:R.Player.bladeburner,player:R.Player,engine:this}),_e.Display.bladeburnerContent),ae.MainMenuLinks.Bladeburner.classList.add("active"))},loadSleevesContent:function(){try{_e.hideAllContent(),J.routing.navigateTo(J.Page.Sleeves),Object($.createSleevesPage)(R.Player)}catch(e){Object(le.exceptionAlert)(e)}},loadResleevingContent:function(){try{_e.hideAllContent(),J.routing.navigateTo(J.Page.Resleeves),Object(Y.createResleevesPage)(R.Player)}catch(e){Object(le.exceptionAlert)(e)}},hideAllContent:function(){_e.Display.terminalContent.style.display="none",_e.Display.characterContent.style.display="none",_e.Display.scriptEditorContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.scriptEditorContent),_e.Display.activeScriptsContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.activeScriptsContent),_e.Display.infiltrationContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.infiltrationContent),Object(P.a)(),_e.Display.createProgramContent.style.display="none",_e.Display.factionsContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.factionsContent),_e.Display.factionContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.factionContent),_e.Display.augmentationsContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.augmentationsContent),_e.Display.milestonesContent.style.display="none",_e.Display.tutorialContent.style.display="none",_e.Display.locationContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.locationContent),_e.Display.gangContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.gangContent),_e.Display.bladeburnerContent.style.display="none",he.a.unmountComponentAtNode(_e.Display.bladeburnerContent),_e.Display.workInProgressContent.style.display="none",_e.Display.redPillContent.style.display="none",_e.Display.cinematicTextContent.style.display="none",_e.Display.stockMarketContent.style.display="none",_e.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),R.Player.corporation instanceof d.c&&R.Player.corporation.clearUI(),Object(Y.clearResleevesPage)(),Object($.clearSleevesPage)(),_e.inactivateMainMenuLinks(),Object(_.a)()},inactivateMainMenuLinks:function(){ae.MainMenuLinks.Terminal.classList.remove("active"),ae.MainMenuLinks.ScriptEditor.classList.remove("active"),ae.MainMenuLinks.ActiveScripts.classList.remove("active"),ae.MainMenuLinks.CreateProgram.classList.remove("active"),ae.MainMenuLinks.Stats.classList.remove("active"),ae.MainMenuLinks.Factions.classList.remove("active"),ae.MainMenuLinks.Augmentations.classList.remove("active"),ae.MainMenuLinks.HacknetNodes.classList.remove("active"),ae.MainMenuLinks.Sleeves.classList.remove("active"),ae.MainMenuLinks.City.classList.remove("active"),ae.MainMenuLinks.Travel.classList.remove("active"),ae.MainMenuLinks.Job.classList.remove("active"),ae.MainMenuLinks.StockMarket.classList.remove("active"),ae.MainMenuLinks.Gang.classList.remove("active"),ae.MainMenuLinks.Bladeburner.classList.remove("active"),ae.MainMenuLinks.Corporation.classList.remove("active"),ae.MainMenuLinks.Gang.classList.remove("active"),ae.MainMenuLinks.Milestones.classList.remove("active"),ae.MainMenuLinks.Tutorial.classList.remove("active"),ae.MainMenuLinks.Options.classList.remove("active"),ae.MainMenuLinks.DevMenu.classList.remove("active")},displayCharacterOverviewInfo:function(){he.a.render(pe.a.createElement(c.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");F.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},updateCharacterInfo:function(){he.a.render(Object(V.CharacterInfo)(R.Player),_e.Display.characterInfo)},idleTimer:function(){const e=(new Date).getTime();let t=e-_e._lastUpdate;const n=t%_e._idleSpeed;(t=Math.floor(t/_e._idleSpeed))>0&&(_e._lastUpdate=e-n,R.Player.lastUpdate=e-n,_e.updateGame(t)),window.requestAnimationFrame(_e.idleTimer)},updateGame:function(e=1){const t=e*_e._idleSpeed;null==R.Player.totalPlaytime&&(R.Player.totalPlaytime=0),null==R.Player.playtimeSinceLastAug&&(R.Player.playtimeSinceLastAug=0),null==R.Player.playtimeSinceLastBitnode&&(R.Player.playtimeSinceLastBitnode=0),R.Player.totalPlaytime+=t,R.Player.playtimeSinceLastAug+=t,R.Player.playtimeSinceLastBitnode+=t,!0===K.a.actionStarted&&(_e._totalActionTime=K.a.actionTime,_e._actionTimeLeft=K.a.actionTime,_e._actionInProgress=!0,_e._actionProgressBarCount=1,_e._actionProgressStr="[ ]",_e._actionTimeStr="Time left: ",K.a.actionStarted=!1),R.Player.isWorking&&(R.Player.workType==h.CONSTANTS.WorkTypeFaction?R.Player.workForFaction(e):R.Player.workType==h.CONSTANTS.WorkTypeCreateProgram?R.Player.createProgramWork(e):R.Player.workType==h.CONSTANTS.WorkTypeStudyClass?R.Player.takeClass(e):R.Player.workType==h.CONSTANTS.WorkTypeCrime?R.Player.commitCrime(e):R.Player.workType==h.CONSTANTS.WorkTypeCompanyPartTime?R.Player.workPartTime(e):R.Player.work(e)),R.Player.hasWseAccount&&Object(H.processStockPrices)(e),R.Player.inGang()&&R.Player.gang.process(e,R.Player),x.c&&x.b&&x.b.process(e),R.Player.corporation instanceof d.c&&R.Player.corporation.storeCycles(e),R.Player.bladeburner instanceof l.Bladeburner&&R.Player.bladeburner.storeCycles(e);for(let t=0;t0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),_e.Counters.createProgramNotifications=10}if(_e.Counters.augmentationsNotifications<=0){e=R.Player.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),_e.Counters.augmentationsNotifications=10}if(_e.Counters.checkFactionInvitations<=0){var n=R.Player.checkForFactionInvitations();if(n.length>0){!1===R.Player.firstFacInvRecvd&&(R.Player.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=n[Math.floor(Math.random()*n.length)];Object(f.inviteToFaction)(a)}const e=R.Player.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),_e.Counters.checkFactionInvitations=100}if(_e.Counters.passiveFactionGrowth<=0){var i=Math.floor(5-_e.Counters.passiveFactionGrowth);Object(f.processPassiveFactionRepGain)(i),_e.Counters.passiveFactionGrowth=5}if(_e.Counters.messages<=0&&(Object(T.b)(),r.Augmentations[o.AugmentationNames.TheRedPill].owned?_e.Counters.messages=4500:_e.Counters.messages=150),_e.Counters.mechanicProcess<=0){if(R.Player.corporation instanceof d.c&&R.Player.corporation.process(),R.Player.bladeburner instanceof l.Bladeburner)try{R.Player.bladeburner.process(R.Player)}catch(e){Object(le.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}_e.Counters.mechanicProcess=5}_e.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(m.generateRandomContract)(),_e.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*_e._idleSpeed;_e._actionTimeLeft-=t/1e3,_e._actionTimeLeft=Math.max(_e._actionTimeLeft,0);for(var n=Math.round(100*(1-_e._actionTimeLeft/_e._totalActionTime));2*_e._actionProgressBarCount<=n;)_e._actionProgressStr=Object(a.replaceAt)(_e._actionProgressStr,_e._actionProgressBarCount,"|"),_e._actionProgressBarCount+=1;_e._actionTimeStr="Time left: "+Math.max(0,Math.round(_e._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=_e._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=_e._actionProgressStr.replace(/ /g," "),n>=100&&(_e._actionInProgress=!1,K.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;te===1.0777-1?"7.77%":e===1.777-1?"77.7%":c.numeralWrapper.formatPercentage(e,t);let r=o.createElement(o.Fragment,null,"Effects:");return e.hacking_mult&&e.hacking_mult==e.strength_mult&&e.hacking_mult==e.defense_mult&&e.hacking_mult==e.dexterity_mult&&e.hacking_mult==e.agility_mult&&e.hacking_mult==e.charisma_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_mult-1)," all skills"):(e.hacking_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_mult-1)," hacking skill")),e.strength_mult&&e.strength_mult==e.defense_mult&&e.strength_mult==e.dexterity_mult&&e.strength_mult==e.agility_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_mult-1)," combat skills"):(e.strength_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_mult-1)," strength skill")),e.defense_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.defense_mult-1)," defense skill")),e.dexterity_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.dexterity_mult-1)," dexterity skill")),e.agility_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.agility_mult-1)," agility skill"))),e.charisma_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.charisma_mult-1)," Charisma skill"))),e.hacking_exp_mult&&e.hacking_exp_mult===e.strength_exp_mult&&e.hacking_exp_mult===e.defense_exp_mult&&e.hacking_exp_mult===e.dexterity_exp_mult&&e.hacking_exp_mult===e.agility_exp_mult&&e.hacking_exp_mult===e.charisma_exp_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_exp_mult-1)," exp for all skills"):(e.hacking_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_exp_mult-1)," hacking exp")),e.strength_exp_mult&&e.strength_exp_mult===e.defense_exp_mult&&e.strength_exp_mult===e.dexterity_exp_mult&&e.strength_exp_mult===e.agility_exp_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_exp_mult-1)," combat exp"):(e.strength_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.strength_exp_mult-1)," strength exp")),e.defense_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.defense_exp_mult-1)," defense exp")),e.dexterity_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.dexterity_exp_mult-1)," dexterity exp")),e.agility_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.agility_exp_mult-1)," agility exp"))),e.charisma_exp_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.charisma_exp_mult-1)," charisma exp"))),e.hacking_speed_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_speed_mult-1)," faster hacking")),e.hacking_chance_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_chance_mult-1)," hack() success chance")),e.hacking_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_money_mult-1)," hack() power")),e.hacking_grow_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacking_grow_mult-1)," grow() power")),e.faction_rep_mult&&e.faction_rep_mult===e.company_rep_mult?r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.faction_rep_mult-1)," reputation from factions and companies"):(e.faction_rep_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.faction_rep_mult-1)," reputation from factions")),e.company_rep_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.company_rep_mult-1)," reputation from companies"))),e.crime_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.crime_money_mult-1)," crime money")),e.crime_success_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.crime_success_mult-1)," crime success rate")),e.work_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.work_money_mult-1)," work money")),e.hacknet_node_money_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.hacknet_node_money_mult-1)," hacknet production")),e.hacknet_node_purchase_cost_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"-",a(-(e.hacknet_node_purchase_cost_mult-1))," hacknet nodes cost")),e.hacknet_node_level_cost_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"-",a(-(e.hacknet_node_level_cost_mult-1))," hacknet nodes upgrade cost")),e.bladeburner_max_stamina_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_max_stamina_mult-1)," Bladeburner Max Stamina")),e.bladeburner_stamina_gain_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_stamina_gain_mult-1)," Bladeburner Stamina gain")),e.bladeburner_analysis_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_analysis_mult-1)," Bladeburner Field Analysis effectiveness")),e.bladeburner_success_chance_mult&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"+",a(e.bladeburner_success_chance_mult-1)," Bladeburner Contracts and Operations success chance")),n&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"Start with ",u.Money(n)," after installing Augmentations.")),t&&(r=o.createElement(o.Fragment,null,r,o.createElement("br",null),"Start with ",t.join(" and ")," after installing Augmentations.")),r}(this.mults,e.programs,e.startingMoney)}addToFactions(e){for(let t=0;t{let t=`${e%1e3}`;for(;t.length<3;)t="0"+t;return t})(),u=t?`${l}.${c}`:`${l}`;let m="";return a>0&&(m+=`${a} days `),i>0&&(m+=`${i} hours `),s>0&&(m+=`${s} minutes `),m+=`${u} seconds`},t.longestCommonStart=function(e){if(!r(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],a=t[t.length-1],i=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;a{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.serverMetadata){const i={hostname:e.hostname,ip:u(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(i[t]=o(e[t]));const s=new a.Server(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&r.SpecialServerIps.addIp(e.specialName,s.ip),m(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},c=e=>e[Math.floor(Math.random()*e.length)],p=(e,t)=>{for(const n of e)l(n,t())};p(t[0],()=>e);for(let e=1;ec(t[e-1]))},t.prestigeAllServers=function(){for(const e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBackdoorInstalled=t.getServerOnNetwork=t.getServer=t.GetServerByHostname=t.prestigeHomeComputer=t.processSingleServerGrowth=t.numCycleForGrowth=t.safetlyCreateUniqueServer=void 0;const a=n(23),r=n(508),i=n(547),o=n(21),s=n(11),l=n(32),c=n(139),u=n(1139),m=n(704);function p(e,t,n){let a=1+(s.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;a>s.CONSTANTS.ServerMaxGrowthRate&&(a=s.CONSTANTS.ServerMaxGrowthRate);const r=e.serverGrowth/100;return Math.log(t)/(Math.log(a)*n.hacking_grow_mult*r*o.BitNodeMultipliers.ServerGrowthRate)}function d(e){for(const t in a.AllServers)if(a.AllServers.hasOwnProperty(t)&&a.AllServers[t].hostname==e)return a.AllServers[t];return null}t.safetlyCreateUniqueServer=function(e){if(null!=e.ip&&a.ipExists(e.ip)&&(e.ip=a.createUniqueRandomIp()),null!=d(e.hostname)){let t=e.hostname;for(let n=0;n<200&&null!=d(t=`${e.hostname}-${n}`);++n);e.hostname=t}return new r.Server(e)},t.numCycleForGrowth=p,t.processSingleServerGrowth=function(e,t,n,a=1){let r=i.calculateServerGrowth(e,t,n,a);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const o=e.moneyAvailable;if(e.moneyAvailable*=r,u.isValidNumber(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),u.isValidNumber(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),o!==e.moneyAvailable){let t=p(e,e.moneyAvailable/o,n);t=Math.max(0,t),e.fortify(2*s.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/o},t.prestigeHomeComputer=function(e){const t=e.programs.includes(l.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.Programs.NukeProgram.name),t&&e.programs.push(l.Programs.BitFlume.name),e.scripts.forEach(function(t){t.updateRamUsage(e.scripts)}),e.messages.length=0,e.messages.push(c.LiteratureNames.HackersStartingHandbook)},t.GetServerByHostname=d,t.getServer=function(e){return m.isValidIPAddress(e)?void 0!==a.AllServers[e]?a.AllServers[e]:null:d(e)},t.getServerOnNetwork=function(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):a.AllServers[e.serversOnNetwork[t]]},t.isBackdoorInstalled=function(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions=void 0,t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=void 0;const a=n(233),r={AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1};t.Settings={AutosaveInterval:r.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:r.DisableASCIIArt,DisableHotkeys:r.DisableHotkeys,DisableTextEffects:r.DisableTextEffects,Locale:"en",MaxLogCapacity:r.MaxLogCapacity,MaxPortCapacity:r.MaxPortCapacity,OwnedAugmentationsOrder:a.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:a.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:r.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:r.SuppressFactionInvites,SuppressHospitalizationPopup:r.SuppressHospitalizationPopup,SuppressMessages:r.SuppressMessages,SuppressTravelConfirmation:r.SuppressTravelConfirmation,SuppressBladeburnerPopup:r.SuppressBladeburnerPopup,MonacoTheme:"vs-dark",MonacoInsertSpaces:!1,init(){Object.assign(t.Settings,r)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";function a(e,t){var n;if(null==t)return console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0;if("object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data){if("AllServersMap"===t.ctor)return console.log("Converting AllServersMap for v0.43.1"),t.data;if("function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON)return n.fromJSON(t)}return t}function r(e,t,n){var a,r;n||(n=Object.keys(t)),a={};for(let e=0;e0}function P(){if(m.ITutorial.isRunning){if(m.ITutorial.currStep!==m.iTutorialSteps.HacknetNodesIntroduction)return;Object(m.iTutorialNextStep)()}const e=p.Player.hacknetNodes.length;if(k()){const t=M();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return p.Player.canAfford(t)?(p.Player.loseMoney(t),p.Player.createHacknetServer(),j(),e):-1}{const t=O();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!p.Player.canAfford(t))return-1;const n="hacknet-node-"+e,r=new a.HacknetNode(n,p.Player.hacknet_node_money_mult);return p.Player.loseMoney(t),p.Player.hacknetNodes.push(r),e}}function S(){return k()&&p.Player.hacknetNodes.length>=o.HacknetServerConstants.MaxServers}function O(){return Object(r.calculateNodeCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function M(){return Object(i.calculateServerCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function T(e,t){if(null==t)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateLevelUpgradeCost(1,p.Player.hacknet_node_level_cost_mult)))return 0;let n=1,a=t-1,r=t-e.level;if(p.Player.money.gt(e.calculateLevelUpgradeCost(r,p.Player.hacknet_node_level_cost_mult)))return r;for(;n<=a;){var i=(n+a)/2|0;if(i!==t&&p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult))&&p.Player.money.lt(e.calculateLevelUpgradeCost(i+1,p.Player.hacknet_node_level_cost_mult)))return Math.min(r,i);if(p.Player.money.lt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))a=i-1;else{if(!p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))return Math.min(r,i);n=i+1}}return 0}function x(e,t){if(null==t)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateRamUpgradeCost(1,p.Player.hacknet_node_ram_cost_mult)))return 0;let n;if(n=e instanceof s.HacknetServer?Math.round(Math.log2(t/e.maxRam)):Math.round(Math.log2(t/e.ram)),p.Player.money.gt(e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult)))return n;for(let t=n-1;t>=0;--t)if(p.Player.money.gt(e.calculateRamUpgradeCost(t,p.Player.hacknet_node_ram_cost_mult)))return t;return 0}function w(e,t){if(null==t)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateCoreUpgradeCost(1,p.Player.hacknet_node_core_cost_mult)))return 0;let n=1,a=t-1;const r=t-e.cores;if(p.Player.money.gt(e.calculateCoreUpgradeCost(r,p.Player.hacknet_node_core_cost_mult)))return r;for(;n<=a;){let i=(n+a)/2|0;if(i!=t&&p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult))&&p.Player.money.lt(e.calculateCoreUpgradeCost(i+1,p.Player.hacknet_node_core_cost_mult)))return Math.min(r,i);if(p.Player.money.lt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))a=i-1;else{if(!p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))return Math.min(r,i);n=i+1}}return 0}function A(e,t){if(null==t)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!p.Player.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,a=t-1;const r=t-e.cache;if(p.Player.canAfford(e.calculateCacheUpgradeCost(r)))return r;for(;n<=a;){let i=(n+a)/2|0;if(i!=t&&p.Player.canAfford(e.calculateCacheUpgradeCost(i))&&!p.Player.canAfford(e.calculateCacheUpgradeCost(i+1)))return Math.min(r,i);if(p.Player.canAfford(e.calculateCacheUpgradeCost(i))){if(!p.Player.canAfford(e.calculateCacheUpgradeCost(i)))return Math.min(r,i);n=i+1}else a=i-1}return 0}function R(e,t=1){const n=Math.round(t),a=e.calculateLevelUpgradeCost(n,p.Player.hacknet_node_level_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.level>=(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel))return!1;if(e.level+n>(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)){return R(e,Math.max(0,(r?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)-e.level))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeLevel(n,p.Player.hacknet_node_money_mult),!0)}function N(e,t=1){const n=Math.round(t),a=e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.ram>=(r?o.HacknetServerConstants.MaxRam:o.HacknetNodeConstants.MaxRam))return!1;if(r){if(e.maxRam*Math.pow(2,n)>o.HacknetServerConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetServerConstants.MaxRam/e.maxRam))))}}else if(e.ram*Math.pow(2,n)>o.HacknetNodeConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetNodeConstants.MaxRam/e.ram))))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeRam(n,p.Player.hacknet_node_money_mult),!0)}function D(e,t=1){const n=Math.round(t),a=e.calculateCoreUpgradeCost(n,p.Player.hacknet_node_core_cost_mult);if(isNaN(a)||a<=0||n<0)return!1;const r=e instanceof s.HacknetServer;if(e.cores>=(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores))return!1;if(e.cores+n>(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)){return D(e,Math.max(0,(r?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)-e.cores))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeCore(n,p.Player.hacknet_node_money_mult),!0)}function B(e,t=1){const n=Math.round(t),a=e.calculateCacheUpgradeCost(n);if(isNaN(a)||a<=0||n<0)return!1;if(!(e instanceof s.HacknetServer))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>o.HacknetServerConstants.MaxCache){return B(e,Math.max(0,o.HacknetServerConstants.MaxCache-e.cache))}return!!p.Player.canAfford(a)&&(p.Player.loseMoney(a),e.upgradeCache(n),!0)}function I(){g.routing.isOn(g.Page.HacknetNodes)&&E.a.render(y.a.createElement(v.a,null),C)}function L(){C instanceof HTMLElement&&E.a.unmountComponentAtNode(C),C.style.display="none"}function W(e){return 0===p.Player.hacknetNodes.length?0:k()?function(e){if(!(p.Player.hashManager instanceof l.HashManager))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let t=0;for(let n=0;n
    Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"
    Recommended starting Industry: NO",Utilities:"Distribute water and provide wastewater services.

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

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

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

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

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

    Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"
    Recommended starting Industry: YES",Chemical:"Produce industrial chemicals.

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

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

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

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

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

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

    Starting cost: "+r.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"
    Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:a.getBaseResearchTreeCopy(),Utilities:a.getBaseResearchTreeCopy(),Agriculture:a.getBaseResearchTreeCopy(),Fishing:a.getBaseResearchTreeCopy(),Mining:a.getBaseResearchTreeCopy(),Food:a.getProductIndustryResearchTreeCopy(),Tobacco:a.getProductIndustryResearchTreeCopy(),Chemical:a.getBaseResearchTreeCopy(),Pharmaceutical:a.getProductIndustryResearchTreeCopy(),Computer:a.getProductIndustryResearchTreeCopy(),Robotics:a.getProductIndustryResearchTreeCopy(),Software:a.getProductIndustryResearchTreeCopy(),Healthcare:a.getProductIndustryResearchTreeCopy(),RealEstate:a.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=a.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=a.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuLinks=t.MainMenuLinks=void 0;const a=n(56),r=(()=>{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})();t.MainMenuLinks={Terminal:r,ScriptEditor:r,ActiveScripts:r,CreateProgram:r,Stats:r,Factions:r,Augmentations:r,HacknetNodes:r,Sleeves:r,City:r,Travel:r,Job:r,StockMarket:r,Bladeburner:r,Corporation:r,Gang:r,Milestones:r,Tutorial:r,Options:r,DevMenu:r},t.initializeMainMenuLinks=function(){try{function e(e){const t=a.clearEventListeners(e);if(null==t)throw new Error(`clearEventListeners() failed for element with id: ${e}`);return t}t.MainMenuLinks.Terminal=e("terminal-menu-link"),t.MainMenuLinks.ScriptEditor=e("create-script-menu-link"),t.MainMenuLinks.ActiveScripts=e("active-scripts-menu-link"),t.MainMenuLinks.CreateProgram=e("create-program-menu-link"),t.MainMenuLinks.Stats=e("stats-menu-link"),t.MainMenuLinks.Factions=e("factions-menu-link"),t.MainMenuLinks.Augmentations=e("augmentations-menu-link"),t.MainMenuLinks.HacknetNodes=e("hacknet-nodes-menu-link"),t.MainMenuLinks.Sleeves=e("sleeves-menu-link"),t.MainMenuLinks.City=e("city-menu-link"),t.MainMenuLinks.Travel=e("travel-menu-link"),t.MainMenuLinks.Job=e("job-menu-link"),t.MainMenuLinks.StockMarket=e("stock-market-menu-link"),t.MainMenuLinks.Bladeburner=e("bladeburner-menu-link"),t.MainMenuLinks.Corporation=e("corporation-menu-link"),t.MainMenuLinks.Gang=e("gang-menu-link"),t.MainMenuLinks.Milestones=e("milestones-menu-link"),t.MainMenuLinks.Tutorial=e("tutorial-menu-link");const n=document.getElementById("options-menu-link");if(null===n)throw new Error('Could not find element with id: "options-menu-link"');return t.MainMenuLinks.Options=n,t.MainMenuLinks.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error(`Failed to initialize Main Menu Links: ${e}`),!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.companyExists=t.loadCompanies=t.initCompanies=t.Companies=void 0;const a=n(1306),r=n(146),i=n(27);t.Companies={},t.initCompanies=function(){const e=t.Companies;t.Companies={},a.companiesMetadata.forEach(e=>{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new r.Company(e)}(e)});for(const n in t.Companies){const a=t.Companies[n];e[n]instanceof r.Company?(a.favor=e[n].favor,isNaN(a.favor)&&(a.favor=0)):a.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,i.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=void 0,t.getRandomInt=function(e,t){const n=Math.min(e,t),a=Math.max(e,t);return Math.floor(Math.random()*(a-n+1))+n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServerConstants=t.HacknetNodeConstants=void 0,t.HacknetNodeConstants={MoneyGainPerLevel:1.6,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},t.HacknetServerConstants={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CityName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven"}(t.CityName||(t.CityName={}))},,,function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"f",function(){return IssueNewSharesCooldown}),__webpack_require__.d(__webpack_exports__,"k",function(){return SellSharesCooldown}),__webpack_require__.d(__webpack_exports__,"m",function(){return WarehouseInitialCost}),__webpack_require__.d(__webpack_exports__,"n",function(){return WarehouseInitialSize}),__webpack_require__.d(__webpack_exports__,"o",function(){return WarehouseUpgradeBaseCost}),__webpack_require__.d(__webpack_exports__,"g",function(){return OfficeInitialCost}),__webpack_require__.d(__webpack_exports__,"h",function(){return OfficeInitialSize}),__webpack_require__.d(__webpack_exports__,"a",function(){return BribeThreshold}),__webpack_require__.d(__webpack_exports__,"b",function(){return BribeToRepRatio}),__webpack_require__.d(__webpack_exports__,"j",function(){return ProductProductionCostRatio}),__webpack_require__.d(__webpack_exports__,"d",function(){return DividendMaxPercentage}),__webpack_require__.d(__webpack_exports__,"c",function(){return Corporation}),__webpack_require__.d(__webpack_exports__,"e",function(){return Industry}),__webpack_require__.d(__webpack_exports__,"i",function(){return OfficeSpace});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(561),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(472),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(471),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(25),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(33),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(320),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(307),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(134),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(210),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(432),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_Warehouse__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(119),_Warehouse__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_10__);__webpack_require__.d(__webpack_exports__,"l",function(){return _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse});var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(21),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(470),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(139),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(38),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__),_Player__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(1),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(3),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(19),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(872),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(12),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(27),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(871),_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__(13),_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__(57),_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__(69),_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__(20),_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__(36),_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__(62),_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__(44),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(172),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(49),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(54),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__),react__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_32__),react_dom__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(22),react_dom__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_33__),_ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(870),_ui_Root__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(868),_ui_Routing__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(469),_ui_Routing__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_ui_Routing__WEBPACK_IMPORTED_MODULE_36__),decimal_js__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(55);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=50,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/_CorporationState__WEBPACK_IMPORTED_MODULE_0__.AllCorporationStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5,DividendMaxPercentage=50,EmployeeSalaryMultiplier=3,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50,BaseMaxProducts=3;let researchTreeBoxOpened=!1,researchTreeBox=null;function Industry(e={}){this.offices={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new OfficeSpace({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture,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_37__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0);var t=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chonqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.init()}function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_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.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}$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)}),Industry.prototype.init=function(){switch(this.startingCost=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[this.type],this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error(`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.error("Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.getMaximumNumberProducts=function(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,BaseMaxProducts+e},Industry.prototype.hasMaximumNumberProducts=function(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"
    ")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.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_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var a=0;for(var r in this.offices)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 i=n.getDreamSenseGain(),o=4*i;return void(i>0&&(this.popularity+=i*e,this.awareness+=o*e))}let s=this.processMaterials(e,n);Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1])),s=this.processProducts(e,n),Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1]))},Industry.prototype.processMaterialMarket=function(){for(var e=this.reqMats,t=this.prodMats,n=0;n0&&(r.qty+=a,expenses+=a*r.bCost)}(matName,this),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier()*this.getProductionMultiplier();let e;e=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var totalMatSize=0;for(let e=0;e0){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].qty0&&e>0){for(const t in this.reqMats){var reqMatQtyNeeded=this.reqMats[t]*e*producableFrac;warehouse.materials[t].qty-=reqMatQtyNeeded,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(let t=0;tmat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI=expWarehouse.size)return[0,0];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.error(`Invalid state: ${this.state}`)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(!n.fin){const t=n.createCity,a=this.offices[t],r=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],i=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],o=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(a.employeeProd,this);break}}for(var a in this.products)if(this.products.hasOwnProperty(a)){var r=this.products[a];r instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&r.fin&&(n+=this.processProduct(e,r,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);e=Math.min(maxAmt,e)}warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty0&&e>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*e*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=e*producableFrac}product.data[city][1]=e*producableFrac/(SecsPerMarketCycle*marketCycles);break}case"SALE":{for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);product.pCost*=ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;var sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,a=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(n/a);let i;0===a||0===r?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else product.marketTa1?sCost=product.pCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sCost)?(0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_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_19__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error(`Invalid State: ${this.state}`)}}return totalProfit},Industry.prototype.discontinueProduct=function(e){for(var t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]},Industry.prototype.upgrade=function(e,t){for(var n=t.corporation,a=t.office,r=e[0];this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e{if(this.sciResearch.qty>=n.cost){this.sciResearch.qty-=n.cost,t.research(a[e]),this.researched[a[e]]=!0;const r=this.createResearchBox();return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`Researched ${a[e]}. It may take a market cycle `+`(~${SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),r}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${r}`)}const r=document.getElementById(`${e}-content`);null!=r&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(r,2),r.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()}`})),r.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=.003*e,a=n*Math.random();this.exp+=n,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var r=n*Math.random();return this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=r,this.exp+=r,this.eff+=r),this.ene-=a,this.hap-=a,this.eneHappiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.hap,3)+"
    Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.ene,3)+"
    Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(i,3)+"
    Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(r,3)+"
    Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.exp,3)+"
    Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,3)+"
    Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"
    Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.sal,"$0.000a")+"/ s
    "}));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=this.size},OfficeSpace.prototype.process=function(e=1,t){var n=t.industry;if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&(e.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);var a=1;n.funds<0&&n.lastCycleRevenue<0?a=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(a=Math.pow(1.01,e));const r=n.hasResearch("AutoBrew"),i=n.hasResearch("AutoPartyManager");var o=0;for(let t=0;tCharisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cha,1)+"
    Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.exp,1)+"
    Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cre,1)+"
    Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.eff,1)+"
    Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t.sal,"$0.000a")+" s
    ",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},_=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_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),g=[d,h(u,this),h(m,this),h(p,this),_];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-hire-employee-popup",g)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,a=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetYesButton)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetNoButton)();a.innerHTML="Hire",r.innerHTML="Cancel",a.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetInput)(),a=0;aObject(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var e=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,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),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=new Employee({intelligence:t*e,charisma:n*e,experience:a*e,creativity:r*e,efficiency:i*e,salary:EmployeeSalaryMultiplier*(t+n+a+r+i)*e}),s=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.generateRandomString)(7);for(let e=0;e=CyclesPerIndustryStateCycle){const e=this.getState(),t=1,n=t*CyclesPerIndustryStateCycle;if(this.storedCycles-=n,this.divisions.forEach(n=>{n.process(t,e,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=n),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=n),"START"===e){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.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(t*SecsPerMarketCycle);if((isNaN(this.funds)||this.funds===1/0||this.funds===-1/0)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.

    (Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(15e10)),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const t=this.dividendPercentage/100*e,n=e-t,a=t/this.totalShares,r=this.numShares*a*(1-this.dividendTaxPercentage/100);_Player__WEBPACK_IMPORTED_MODULE_15__.Player.gainMoney(r),_Player__WEBPACK_IMPORTED_MODULE_15__.Player.recordMoneySource(r,"corporation"),this.addFunds(n)}else this.addFunds(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&this.rerender()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=4;break;case 1:e=.35,n=3;break;case 2:e=.25,n=3;break;case 3:e=.2,n=2.5;break;case 4:return}var a=t*e*n,r=Math.floor(INITIALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetNoButton)();i.innerHTML="Accept",o.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.addFunds(a),this.numShares-=r,this.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(a,"$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(r,"0.000a")+" shares).

    Do you accept or reject this offer?

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

    You have a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),a=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()}}),r=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(a.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.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.addFunds(e*t),this.rerender(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var 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_30__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-go-public-popup",[n,r,a,e,i])},Corporation.prototype.getTargetSharePrice=function(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)},Corporation.prototype.updateSharePrice=function(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.immediatelyUpdateSharePrice=function(){this.sharePrice=this.getTargetSharePrice()},Corporation.prototype.calculateShareSale=function(e){let t=e,n=this.shareSalesUntilPriceUpdate,a=this.sharePrice,r=0,i=0;const o=Math.ceil(e/SHARESPERPRICEUPDATE);if(!(isNaN(o)||o>1e7)){for(let e=0;e3600?`${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_19__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],a=e[2],r=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var i=n*Math.pow(a,this.upgrades[t]);if(this.funds.lt(i))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to purchase this!");else if(++this.upgrades[t],this.funds=this.funds.minus(i),this.upgradeMultipliers[t]=1+this.upgrades[t]*r,1===t)for(var o=0;oh.Start&&(_.currStep-=1);f()}(),!1}),Object(c.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return y(),!1}),f()}function f(){if(!_.isRunning)return;const e=Object(c.clearEventListeners)("terminal-menu-link"),t=Object(c.clearEventListeners)("stats-menu-link"),n=Object(c.clearEventListeners)("active-scripts-menu-link"),r=Object(c.clearEventListeners)("hacknet-nodes-menu-link"),i=Object(c.clearEventListeners)("city-menu-link"),o=Object(c.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),r.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");const s=document.getElementById("interactive-tutorial-next");switch(_.currStep){case h.Start:a.Engine.loadTerminalContent(),v("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    cat "+s.LiteratureNames.HackersStartingHandbook}),n=Object(u.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(p.removeElementById)(e)}});Object(m.createPopup)(e,[t,n]),r.Player.getHomeComputer().messages.push(s.LiteratureNames.HackersStartingHandbook)}let E=null;function v(e){E.innerHTML=e,E.parentElement.scrollTop=0}!function(){document.addEventListener("DOMContentLoaded",function e(){E=document.getElementById("interactive-tutorial-text"),document.removeEventListener("DOMContentLoaded",e)})}()},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayStockMarketContent=t.processStockPrices=t.stockMarketCycle=t.initSymbolToStockMap=t.initStockMarket=t.deleteStockMarket=t.loadStockMarket=t.cancelOrder=t.placeOrder=t.SymbolToStockMap=t.StockMarket=void 0;const o=n(182),s=n(1076),l=n(1075),c=n(199),u=n(1074),m=n(1073),p=n(115),d=n(103),h=n(299),_=n(1072),g=n(11),f=n(1),y=n(507),b=n(19),E=n(3),v=n(12),C=n(27),k=i(n(0)),P=i(n(22));function S(e,n,a,r,i,o=null){if(!(e instanceof c.Stock))return o?o.log("placeOrder",`Invalid stock: '${e}'`):v.dialogBoxCreate("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof n||"number"!=typeof a)return o?o.log("placeOrder",`Invalid arguments: shares='${n}' price='${a}'`):v.dialogBoxCreate("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const u=new s.Order(e.symbol,n,a,r,i);if(null==t.StockMarket.Orders){const e={};for(const n in t.StockMarket){const a=t.StockMarket[n];a instanceof c.Stock&&(e[a.symbol]=[])}t.StockMarket.Orders=e}t.StockMarket.Orders[e.symbol].push(u);const m={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};return l.processOrders(e,u.type,u.pos,m),D(),!0}function O(e,n=null){if(null==t.StockMarket.Orders)return!1;if(e.order&&e.order instanceof s.Order){const n=e.order,a=t.StockMarket.Orders[n.stockSymbol];for(let e=0;e=n.cap&&(i=.1,n.b=!1),isNaN(i)&&(i=.5);const o=Math.random(),s={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};o1?1:i<0?0:i},t.calculateHackingExpGain=function(e,t){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);let n=3;return(n+=e.baseDifficulty*t.hacking_exp_mult*.3)*a.BitNodeMultipliers.HackExpGain},t.calculatePercentMoneyHacked=function(e,t){const n=(100-e.hackDifficulty)/100*((t.hacking_skill-(e.requiredHackingSkill-1))/t.hacking_skill)*t.hacking_money_mult/240;return n<0?0:n>1?1:n*a.BitNodeMultipliers.ScriptHackMoney},t.calculateHackingTime=i,t.calculateGrowTime=function(e,t){return 3.2*i(e,t)},t.calculateWeakenTime=function(e,t){return 4*i(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPositions=void 0;const a=n(1149),r=n(301);t.CompanyPositions={},a.companyPositionMetadata.forEach(e=>{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new r.CompanyPosition(e)}(e)})},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e||e instanceof String}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButton=void 0;const o=i(n(0));t.StdButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n,a=e.disabled?"std-button-disabled":"std-button";if(t&&(a+=" tooltip"),"string"==typeof e.addClasses&&(a+=` ${e.addClasses}`),t)if("string"==typeof e.tooltip){const t={__html:e.tooltip};n=o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t})}else n=o.createElement("span",{className:"tooltiptext"},e.tooltip);return o.createElement("button",{className:a,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&n)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartTimeCompanyPositions=t.BusinessConsultantCompanyPositions=t.SoftwareConsultantCompanyPositions=t.MiscCompanyPositions=t.AgentCompanyPositions=t.SecurityCompanyPositions=t.BusinessCompanyPositions=t.NetworkEngineerCompanyPositions=t.SecurityEngineerCompanyPositions=t.ITCompanyPositions=t.SoftwareCompanyPositions=void 0,t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},,function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Reputation=void 0;const o=i(n(0)),s=n(3);t.Reputation=function(e){return o.createElement("span",{className:"reputation samefont"},"number"==typeof e?s.numeralWrapper.formatReputation(e):e)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopupCloseButton=void 0;const a=n(13),r=n(172);t.createPopupCloseButton=function(e,t){const n=a.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText});function i(e){27===e.keyCode&&n.click()}return n.addEventListener("click",()=>{if(e instanceof Element)r.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&r.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",i),!1}),document.addEventListener("keydown",i),n}},,,function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(0);const r=n.n(a).a.Component;class i extends r{corp(){return this.props.corp}eventHandler(){return this.props.eventHandler}routing(){return this.props.routing}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScriptFilename=void 0,t.isScriptFilename=function(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.substituteAliases=t.removeAlias=t.parseAliasDeclaration=t.printAliases=t.loadGlobalAliases=t.loadAliases=t.GlobalAliases=t.Aliases=void 0;const a=n(7);function r(e){return t.Aliases.hasOwnProperty(e)?t.Aliases[e]:null}function i(e){return t.GlobalAliases.hasOwnProperty(e)?t.GlobalAliases[e]:null}t.Aliases={},t.GlobalAliases={},t.loadAliases=function(e){t.Aliases=""===e?{}:JSON.parse(e)},t.loadGlobalAliases=function(e){t.GlobalAliases=""===e?{}:JSON.parse(e)},t.printAliases=function(){for(const e in t.Aliases)t.Aliases.hasOwnProperty(e)&&a.post("alias "+e+"="+t.Aliases[e]);for(const e in t.GlobalAliases)t.GlobalAliases.hasOwnProperty(e)&&a.post("global alias "+e+"="+t.GlobalAliases[e])},t.parseAliasDeclaration=function(e,n=!1){const a=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=a&&3==a.length&&(n?function(e,n){e in t.Aliases&&delete t.Aliases[e],t.GlobalAliases[e]=n.trim()}(a[1],a[2]):function(e,n){e in t.GlobalAliases&&delete t.GlobalAliases[e],t.Aliases[e]=n.trim()}(a[1],a[2]),!0)},t.removeAlias=function(e){return t.Aliases.hasOwnProperty(e)?(delete t.Aliases[e],!0):!!t.GlobalAliases.hasOwnProperty(e)&&(delete t.GlobalAliases[e],!0)},t.substituteAliases=function(e){var t,n;const a=e.split(" ");if(a.length>0){if("unalias"===a[0]||"alias"===a[0])return a.join(" ");let e=!0,o=0;for(;e&&o<10;){o++,e=!1;const s=null===(t=r(a[0]))||void 0===t?void 0:t.split(" ");null!=s&&(e=!0,a.splice(0,1,...s));for(let t=0;t{t.delay=null,n()},e),t.delayResolve=n})}function s(e,t,n=null){var a="";null!=n&&(a=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");const r=i.AllServers[e.serverIp];if(null==r)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);return"|"+r.hostname+"|"+e.name+"|"+t+a}function l(e,t,n){const a=e.scriptRef.threads;if(!n)return isNaN(a)||a<1?1:a;const r=0|n;if(isNaN(n)||r<1)throw s(e,`Invalid thread count passed to ${t}: ${n}. Threads must be a positive number.`);if(n>a)throw s(e,`Too many threads requested by ${t}. Requested: ${n}. Has: ${a}.`);return r}function c(e){if(!Object(r.isString)(e))return!1;return 4==e.split("|").length}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.killWorkerScript=void 0;const a=n(257),r=n(116),i=n(154),o=n(203),s=n(23),l=n(204),c=n(306);function u(e,t=!0){const n=r.workerScripts.get(e);return n instanceof a.WorkerScript&&(m(n,t),!0)}function m(e,t=!0){e.env.stopFlag=!0,function(e){e instanceof a.WorkerScript&&e.delay&&(clearTimeout(e.delay),e.delayResolve&&e.delayResolve())}(e),function(e,t=!0){if(!(e instanceof a.WorkerScript))return console.error("Invalid argument passed into removeWorkerScript():"),void console.error(e);{const n=e.serverIp,a=e.name,o=s.AllServers[n];if(null==o)return void console.error(`Could not find server on which this script is running: ${n}`);o.ramUsed=c.roundToTwo(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);for(let t=0;t0)for(let n=0;n["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname+` ~${n}]> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var n=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(n<0||n>r)&&(Terminal.commandHistoryIndex=r),0!=n&&--Terminal.commandHistoryIndex;var a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;n=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((n<0||n>r)&&(Terminal.commandHistoryIndex=r),n==r||n==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.TAB){if(e.preventDefault(),null==t)return;let n=t.value;if(""==n)return;const a=n.lastIndexOf(";");-1!==a&&(n=n.slice(a+1));const r=(n=(n=n.trim()).replace(/\s\s+/g," ")).split(" ");let i=r.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.determineAllPossibilitiesForTabCompletion)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player,n,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==r.length)return;1==r.length?l=r[0]:2==r.length?(l=r[0],s=r[1]):3==r.length?(l=r[0]+" "+r[1],s=r[2]):(s=r.pop(),l=r.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.tabCompletion)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const n=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`
    [${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$
    `+`",h.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="",h.option=!!t.lastChild}();var ht={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function mt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&C(t,e)?H.merge([t],n):n}function vt(t,e){for(var n=0,r=t.length;n",""]);var gt=/<|&#?\w+;/;function yt(t,e,n,r,i){for(var o,a,s,u,l,c,Q=e.createDocumentFragment(),T=[],f=0,d=t.length;f-1)i&&i.push(o);else if(l=at(o),a=mt(Q.appendChild(o),"script"),l&&vt(a),n)for(c=0;o=a[c++];)pt.test(o.type||"")&&n.push(o);return Q}var bt=/^key/,Lt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ht=/^([^.]*)(?:\.(.+)|)/;function xt(){return!0}function _t(){return!1}function Et(t,e){return t===function(){try{return g.activeElement}catch(t){}}()==("focus"===e)}function wt(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)wt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=_t;else if(!i)return t;return 1===o&&(a=i,(i=function(t){return H().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=H.guid++)),t.each(function(){H.event.add(this,e,i,r,n)})}function Ot(t,e,n){n?($.set(t,e,!1),H.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=$.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(H.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),$.set(this,e,o),r=n(this,e),this[e](),o!==(i=$.get(this,e))||r?$.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else o.length&&($.set(this,e,{value:H.event.trigger(H.extend(o[0],H.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===$.get(t,e)&&H.event.add(t,e,xt)}H.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,Q,T,f,d,p,h=$.get(t);if(q(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&H.find.matchesSelector(ot,i),n.guid||(n.guid=H.guid++),(u=h.events)||(u=h.events=Object.create(null)),(a=h.handle)||(a=h.handle=function(e){return void 0!==H&&H.event.triggered!==e.type?H.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(j)||[""]).length;l--;)f=p=(s=Ht.exec(e[l])||[])[1],d=(s[2]||"").split(".").sort(),f&&(Q=H.event.special[f]||{},f=(i?Q.delegateType:Q.bindType)||f,Q=H.event.special[f]||{},c=H.extend({type:f,origType:p,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&H.expr.match.needsContext.test(i),namespace:d.join(".")},o),(T=u[f])||((T=u[f]=[]).delegateCount=0,Q.setup&&!1!==Q.setup.call(t,r,d,a)||t.addEventListener&&t.addEventListener(f,a)),Q.add&&(Q.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?T.splice(T.delegateCount++,0,c):T.push(c),H.event.global[f]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,Q,T,f,d,p,h=$.hasData(t)&&$.get(t);if(h&&(u=h.events)){for(l=(e=(e||"").match(j)||[""]).length;l--;)if(f=p=(s=Ht.exec(e[l])||[])[1],d=(s[2]||"").split(".").sort(),f){for(Q=H.event.special[f]||{},T=u[f=(r?Q.delegateType:Q.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=T.length;o--;)c=T[o],!i&&p!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(T.splice(o,1),c.selector&&T.delegateCount--,Q.remove&&Q.remove.call(t,c));a&&!T.length&&(Q.teardown&&!1!==Q.teardown.call(t,d,h.handle)||H.removeEvent(t,f,h.handle),delete u[f])}else for(f in u)H.event.remove(t,f+e[l],n,r,!0);H.isEmptyObject(u)&&$.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=H.event.fix(t),l=($.get(this,"events")||Object.create(null))[u.type]||[],c=H.event.special[u.type]||{};for(s[0]=u,e=1;e=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:H.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function Vt(t,e){return C(t,"table")&&C(11!==e.nodeType?e:e.firstChild,"tr")&&H(t).children("tbody")[0]||t}function At(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function kt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Dt(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if($.hasData(t)&&(s=$.get(t).events))for(i in $.remove(e,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof d&&!h.checkClone&&St.test(d))return t.each(function(i){var o=t.eq(i);p&&(e[0]=d.call(this,i,o.html())),jt(o,e,n,r)});if(T&&(o=(i=yt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=H.map(mt(i,"script"),At)).length;Q0&&vt(a,!u&&mt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=H.event.special,o=0;void 0!==(n=t[o]);o++)if(q(n)){if(e=n[$.expando]){if(e.events)for(r in e.events)i[r]?H.event.remove(n,r):H.removeEvent(n,r,e.handle);n[$.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),H.fn.extend({detach:function(t){return Rt(this,t,!0)},remove:function(t){return Rt(this,t)},text:function(t){return z(this,function(t){return void 0===t?H.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return jt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Vt(this,t).appendChild(t)})},prepend:function(){return jt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Vt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return jt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return jt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(H.cleanData(mt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return H.clone(this,t,e)})},html:function(t){return z(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ct.test(t)&&!ht[(dt.exec(t)||["",""])[1].toLowerCase()]){t=H.htmlPrefilter(t);try{for(;n3,ot.removeChild(t)),s}}))}();var Wt=["Webkit","Moz","ms"],Ut=g.createElement("div").style,Gt={};function Xt(t){var e=H.cssProps[t]||Gt[t];return e||(t in Ut?t:Gt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Wt.length;n--;)if((t=Wt[n]+e)in Ut)return t}(t)||t)}var qt=/^(none|table(?!-c[ea]).+)/,Kt=/^--/,$t={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:"0",fontWeight:"400"};function Jt(t,e,n){var r=rt.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function te(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=H.css(t,n+it[a],!0,i)),r?("content"===n&&(u-=H.css(t,"padding"+it[a],!0,i)),"margin"!==n&&(u-=H.css(t,"border"+it[a]+"Width",!0,i))):(u+=H.css(t,"padding"+it[a],!0,i),"padding"!==n?u+=H.css(t,"border"+it[a]+"Width",!0,i):s+=H.css(t,"border"+it[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function ee(t,e,n){var r=It(t),i=(!h.boxSizingReliable()||n)&&"border-box"===H.css(t,"boxSizing",!1,r),o=i,a=Zt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Nt.test(a)){if(!n)return a;a="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&C(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===H.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===H.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+te(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ne(t,e,n,r,i){return new ne.prototype.init(t,e,n,r,i)}H.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=X(e),u=Kt.test(e),l=t.style;if(u||(e=Xt(s)),a=H.cssHooks[e]||H.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:l[e];"string"===(o=typeof n)&&(i=rt.exec(n))&&i[1]&&(n=lt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(H.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,a,s=X(e);return Kt.test(e)||(e=Xt(s)),(a=H.cssHooks[e]||H.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Zt(t,e,r)),"normal"===i&&e in Yt&&(i=Yt[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),H.each(["height","width"],function(t,e){H.cssHooks[e]={get:function(t,n,r){if(n)return!qt.test(H.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ee(t,e,r):Bt(t,$t,function(){return ee(t,e,r)})},set:function(t,n,r){var i,o=It(t),a=!h.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===H.css(t,"boxSizing",!1,o),u=r?te(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-te(t,e,"border",!1,o)-.5)),u&&(i=rt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=H.css(t,e)),Jt(0,n,u)}}}),H.cssHooks.marginLeft=zt(h.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Bt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),H.each({margin:"",padding:"",border:"Width"},function(t,e){H.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+it[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(H.cssHooks[t+e].set=Jt)}),H.fn.extend({css:function(t,e){return z(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=It(t),i=e.length;a1)}}),H.Tween=ne,ne.prototype={constructor:ne,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||H.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(H.cssNumber[n]?"":"px")},cur:function(){var t=ne.propHooks[this.prop];return t&&t.get?t.get(this):ne.propHooks._default.get(this)},run:function(t){var e,n=ne.propHooks[this.prop];return this.options.duration?this.pos=e=H.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ne.propHooks._default.set(this),this}},ne.prototype.init.prototype=ne.prototype,ne.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=H.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){H.fx.step[t.prop]?H.fx.step[t.prop](t):1!==t.elem.nodeType||!H.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:H.style(t.elem,t.prop,t.now+t.unit)}}},ne.propHooks.scrollTop=ne.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},H.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},H.fx=ne.prototype.init,H.fx.step={};var re,ie,oe=/^(?:toggle|show|hide)$/,ae=/queueHooks$/;function se(){ie&&(!1===g.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(se):n.setTimeout(se,H.fx.interval),H.fx.tick())}function ue(){return n.setTimeout(function(){re=void 0}),re=Date.now()}function le(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=it[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function ce(t,e,n){for(var r,i=(Qe.tweeners[e]||[]).concat(Qe.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each(function(){H.removeAttr(this,t)})}}),H.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?H.prop(t,e,n):(1===o&&H.isXMLDoc(t)||(i=H.attrHooks[e.toLowerCase()]||(H.expr.match.bool.test(e)?Te:void 0)),void 0!==n?null===n?void H.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=H.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!h.radioValue&&"radio"===e&&C(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(j);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),Te={set:function(t,e,n){return!1===e?H.removeAttr(t,n):t.setAttribute(n,n),n}},H.each(H.expr.match.bool.source.match(/\w+/g),function(t,e){var n=fe[e]||H.find.attr;fe[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=fe[a],fe[a]=i,i=null!=n(t,e,r)?a:null,fe[a]=o),i}});var de=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;function he(t){return(t.match(j)||[]).join(" ")}function me(t){return t.getAttribute&&t.getAttribute("class")||""}function ve(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(j)||[]}H.fn.extend({prop:function(t,e){return z(this,H.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[H.propFix[t]||t]})}}),H.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&H.isXMLDoc(t)||(e=H.propFix[e]||e,i=H.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=H.find.attr(t,"tabindex");return e?parseInt(e,10):de.test(t.nodeName)||pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(H.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),H.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){H.propFix[this.toLowerCase()]=this}),H.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){H(this).addClass(t.call(this,e,me(this)))});if((e=ve(t)).length)for(;n=this[u++];)if(i=me(n),r=1===n.nodeType&&" "+he(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=he(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){H(this).removeClass(t.call(this,e,me(this)))});if(!arguments.length)return this.attr("class","");if((e=ve(t)).length)for(;n=this[u++];)if(i=me(n),r=1===n.nodeType&&" "+he(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=he(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):m(t)?this.each(function(n){H(this).toggleClass(t.call(this,n,me(this),e),e)}):this.each(function(){var e,i,o,a;if(r)for(i=0,o=H(this),a=ve(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=me(this))&&$.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":$.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+he(me(n))+" ").indexOf(e)>-1)return!0;return!1}});var ge=/\r/g;H.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=m(t),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,H(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=H.map(i,function(t){return null==t?"":t+""})),(e=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=H.valHooks[i.type]||H.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(ge,""):null==n?"":n:void 0}}),H.extend({valHooks:{option:{get:function(t){var e=H.find.attr(t,"value");return null!=e?e:he(H.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),H.each(["radio","checkbox"],function(){H.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=H.inArray(H(t).val(),e)>-1}},h.checkOn||(H.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),h.focusin="onfocusin"in n;var ye=/^(?:focusinfocus|focusoutblur)$/,be=function(t){t.stopPropagation()};H.extend(H.event,{trigger:function(t,e,r,i){var o,a,s,u,l,c,Q,T,d=[r||g],p=f.call(t,"type")?t.type:t,h=f.call(t,"namespace")?t.namespace.split("."):[];if(a=T=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!ye.test(p+H.event.triggered)&&(p.indexOf(".")>-1&&(p=(h=p.split(".")).shift(),h.sort()),l=p.indexOf(":")<0&&"on"+p,(t=t[H.expando]?t:new H.Event(p,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:H.makeArray(e,[t]),Q=H.event.special[p]||{},i||!Q.trigger||!1!==Q.trigger.apply(r,e))){if(!i&&!Q.noBubble&&!v(r)){for(u=Q.delegateType||p,ye.test(u+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||g)&&d.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)T=a,t.type=o>1?u:Q.bindType||p,(c=($.get(a,"events")||Object.create(null))[t.type]&&$.get(a,"handle"))&&c.apply(a,e),(c=l&&a[l])&&c.apply&&q(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||Q._default&&!1!==Q._default.apply(d.pop(),e)||!q(r)||l&&m(r[p])&&!v(r)&&((s=r[l])&&(r[l]=null),H.event.triggered=p,t.isPropagationStopped()&&T.addEventListener(p,be),r[p](),t.isPropagationStopped()&&T.removeEventListener(p,be),H.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,e,n){var r=H.extend(new H.Event,n,{type:t,isSimulated:!0});H.event.trigger(r,null,e)}}),H.fn.extend({trigger:function(t,e){return this.each(function(){H.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return H.event.trigger(t,e,n,!0)}}),h.focusin||H.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){H.event.simulate(e,t.target,H.event.fix(t))};H.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,e);i||r.addEventListener(t,n,!0),$.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,e)-1;i?$.access(r,e,i):(r.removeEventListener(t,n,!0),$.remove(r,e))}}});var Le=n.location,He={guid:Date.now()},xe=/\?/;H.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||H.error("Invalid XML: "+t),e};var _e=/\[\]$/,Ee=/\r?\n/g,we=/^(?:submit|button|image|reset|file)$/i,Oe=/^(?:input|select|textarea|keygen)/i;function Ce(t,e,n,r){var i;if(Array.isArray(e))H.each(e,function(e,i){n||_e.test(t)?r(t,i):Ce(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==L(e))r(t,e);else for(i in e)Ce(t+"["+i+"]",e[i],n,r)}H.param=function(t,e){var n,r=[],i=function(t,e){var n=m(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!H.isPlainObject(t))H.each(t,function(){i(this.name,this.value)});else for(n in t)Ce(n,t[n],e,i);return r.join("&")},H.fn.extend({serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=H.prop(this,"elements");return t?H.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!H(this).is(":disabled")&&Oe.test(this.nodeName)&&!we.test(t)&&(this.checked||!ft.test(t))}).map(function(t,e){var n=H(this).val();return null==n?null:Array.isArray(n)?H.map(n,function(t){return{name:e.name,value:t.replace(Ee,"\r\n")}}):{name:e.name,value:n.replace(Ee,"\r\n")}}).get()}});var Se=/%20/g,Me=/#.*$/,Ve=/([?&])_=[^&]*/,Ae=/^(.*?):[ \t]*([^\r\n]*)$/gm,ke=/^(?:GET|HEAD)$/,De=/^\/\//,Pe={},je={},Re="*/".concat("*"),Ne=g.createElement("a");function Ie(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(j)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Be(t,e,n,r){var i={},o=t===je;function a(s){var u;return i[s]=!0,H.each(t[s]||[],function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)}),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Fe(t,e){var n,r,i=H.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&H.extend(!0,t,r),t}Ne.href=Le.href,H.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Le.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Le.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":H.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Fe(Fe(t,H.ajaxSettings),e):Fe(H.ajaxSettings,t)},ajaxPrefilter:Ie(Pe),ajaxTransport:Ie(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,u,l,c,Q,T,f=H.ajaxSetup({},e),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?H(d):H.event,h=H.Deferred(),m=H.Callbacks("once memory"),v=f.statusCode||{},y={},b={},L="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=Ae.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=b[t.toLowerCase()]=b[t.toLowerCase()]||t,y[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)x.always(t[x.status]);else for(e in t)v[e]=[v[e],t[e]];return this},abort:function(t){var e=t||L;return r&&r.abort(e),_(0,e),this}};if(h.promise(x),f.url=((t||f.url||Le.href)+"").replace(De,Le.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(j)||[""],null==f.crossDomain){u=g.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ne.protocol+"//"+Ne.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=H.param(f.data,f.traditional)),Be(Pe,f,e,x),l)return x;for(Q in(c=H.event&&f.global)&&0==H.active++&&H.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!ke.test(f.type),i=f.url.replace(Me,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Se,"+")):(T=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(xe.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ve,"$1"),T=(xe.test(i)?"&":"?")+"_="+He.guid+++T),f.url=i+T),f.ifModified&&(H.lastModified[i]&&x.setRequestHeader("If-Modified-Since",H.lastModified[i]),H.etag[i]&&x.setRequestHeader("If-None-Match",H.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(Q,f.headers[Q]);if(f.beforeSend&&(!1===f.beforeSend.call(d,x,f)||l))return x.abort();if(L="abort",m.add(f.complete),x.done(f.success),x.fail(f.error),r=Be(je,f,e,x)){if(x.readyState=1,c&&p.trigger("ajaxSend",[x,f]),l)return x;f.async&&f.timeout>0&&(s=n.setTimeout(function(){x.abort("timeout")},f.timeout));try{l=!1,r.send(y,_)}catch(t){if(l)throw t;_(-1,t)}}else _(-1,"No Transport");function _(t,e,a,u){var Q,T,g,y,b,L=e;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=u||"",x.readyState=t>0?4:0,Q=t>=200&&t<300||304===t,a&&(y=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,x,a)),!Q&&H.inArray("script",f.dataTypes)>-1&&(f.converters["text script"]=function(){}),y=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,y,x,Q),Q?(f.ifModified&&((b=x.getResponseHeader("Last-Modified"))&&(H.lastModified[i]=b),(b=x.getResponseHeader("etag"))&&(H.etag[i]=b)),204===t||"HEAD"===f.type?L="nocontent":304===t?L="notmodified":(L=y.state,T=y.data,Q=!(g=y.error))):(g=L,!t&&L||(L="error",t<0&&(t=0))),x.status=t,x.statusText=(e||L)+"",Q?h.resolveWith(d,[T,L,x]):h.rejectWith(d,[x,L,g]),x.statusCode(v),v=void 0,c&&p.trigger(Q?"ajaxSuccess":"ajaxError",[x,f,Q?T:g]),m.fireWith(d,[x,L]),c&&(p.trigger("ajaxComplete",[x,f]),--H.active||H.event.trigger("ajaxStop")))}return x},getJSON:function(t,e,n){return H.get(t,e,n,"json")},getScript:function(t,e){return H.get(t,void 0,e,"script")}}),H.each(["get","post"],function(t,e){H[e]=function(t,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),H.ajax(H.extend({url:t,type:e,dataType:i,data:n,success:r},H.isPlainObject(t)&&t))}}),H.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),H._evalUrl=function(t,e,n){return H.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){H.globalEval(t,e,n)}})},H.fn.extend({wrapAll:function(t){var e;return this[0]&&(m(t)&&(t=t.call(this[0])),e=H(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return m(t)?this.each(function(e){H(this).wrapInner(t.call(this,e))}):this.each(function(){var e=H(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=m(t);return this.each(function(n){H(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){H(this).replaceWith(this.childNodes)}),this}}),H.expr.pseudos.hidden=function(t){return!H.expr.pseudos.visible(t)},H.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},H.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Ze={0:200,1223:204},ze=H.ajaxSettings.xhr();h.cors=!!ze&&"withCredentials"in ze,h.ajax=ze=!!ze,H.ajaxTransport(function(t){var e,r;if(h.cors||ze&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ze[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),H.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return H.globalEval(t),t}}}),H.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),H.ajaxTransport("script",function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=H("