diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index 28657dacf21..65e38047418 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -2,4 +2,4 @@ /*! (C) WebReflection Mit Style License */ if(!document.createEvent){var t,n=!0,r=!1,o="__IE8__"+Math.random(),i=Object.defineProperty||function(e,t,n){e[t]=n.value},a=Object.defineProperties||function(t,n){for(var r in n)if(u.call(n,r))try{i(t,r,n[r])}catch(o){e.console}},c=Object.getOwnPropertyDescriptor,u=Object.prototype.hasOwnProperty,l=e.Element.prototype,s=e.Text.prototype,d=/^[a-z]+$/,f=/loaded|complete/,p={},m=document.createElement("div"),h=document.documentElement,v=h.removeAttribute,g=h.setAttribute,b=function(e){return{enumerable:!0,writable:!0,configurable:!0,value:e}};V(e.HTMLCommentElement.prototype,l,"nodeValue"),V(e.HTMLScriptElement.prototype,null,"text"),V(s,null,"nodeValue"),V(e.HTMLTitleElement.prototype,null,"text"),i(e.HTMLStyleElement.prototype,"textContent",(t=c(e.CSSStyleSheet.prototype,"cssText"),x((function(){return t.get.call(this.styleSheet)}),(function(e){t.set.call(this.styleSheet,e)}))));var y=/\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;i(e.CSSStyleDeclaration.prototype,"opacity",{get:function(){var e=this.filter.match(y);return e?(e[1]/100).toString():""},set:function(e){this.zoom=1;var t=!1;e=e<1?" alpha(opacity="+Math.round(100*e)+")":"",this.filter=this.filter.replace(y,(function(){return t=!0,e})),!t&&e&&(this.filter+=e)}}),a(l,{textContent:{get:w,set:B},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;t3?c(a):null,y=String(a.key),C=String(a.char),N=a.location,x=a.keyCode||(a.keyCode=y)&&y.charCodeAt(0)||0,V=a.charCode||(a.charCode=C)&&C.charCodeAt(0)||0,_=a.bubbles,w=a.cancelable,k=a.repeat,E=a.locale,S=a.view||e;if(a.which||(a.which=a.keyCode),"initKeyEvent"in f)f.initKeyEvent(t,_,w,S,p,h,m,v,x,V);else if(0>>0),t=Element.prototype,n=t.querySelector,r=t.querySelectorAll;function o(t,n,r){t.setAttribute(e,null);var o=n.call(t,String(r).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,r,o){return n+"["+e+"]"+(o||" ")})));return t.removeAttribute(e),o}t.querySelector=function(e){return o(this,n,e)},t.querySelectorAll=function(e){return o(this,r,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,r=!1;function o(t,o,i){r=i,n=!1,e=undefined,t.dispatchEvent(o)}function i(e){this.value=e}function c(){t++,this.__ce__=new a("@DOMMap:"+t+Math.random())}return i.prototype.handleEvent=function(t){n=!0,r?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return o(e,this.__ce__,!0),n},get:function(t){o(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return o(e,this.__ce__,!1),n},set:function(e,t){return o(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new i(t),!1),this}},c}();function n(){}function r(e,t,n){function o(e){o.once&&(e.currentTarget.removeEventListener(e.type,t,o),o.removed=!0),o.passive&&(e.preventDefault=r.preventDefault),"function"==typeof o.callback?o.callback.call(this,e):o.callback&&o.callback.handleEvent(e),o.passive&&delete e.preventDefault}return o.type=e,o.callback=t,o.capture=!!n.capture,o.passive=!!n.passive,o.once=!!n.once,o.removed=!1,o}n.prototype=(Object.create||Object)(null),r.preventDefault=function(){};var o,i,a=e.CustomEvent,c=e.dispatchEvent,u=e.addEventListener,l=e.removeEventListener,s=0,d=function(){s++},f=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{u("_",d,{once:!0}),c(new a("_")),c(new a("_")),l("_",d,{once:!0})}catch(m){}1!==s&&(i=new t,o=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,o,a){if(a&&"boolean"!=typeof a){var c,u,l,s=i.get(this),d=p(a);s||i.set(this,s=new n),t in s||(s[t]={handler:[],wrap:[]}),u=s[t],(c=f.call(u.handler,o))<0?(c=u.handler.push(o)-1,u.wrap[c]=l=new n):l=u.wrap[c],d in l||(l[d]=r(t,o,a),e.call(this,t,l[d],l[d].capture))}else e.call(this,t,o,a)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,r){if(r&&"boolean"!=typeof r){var o,a,c,u,l=i.get(this);if(l&&t in l&&(c=l[t],-1<(a=f.call(c.handler,n))&&(o=p(r))in(u=c.wrap[a]))){for(o in e.call(this,t,u[o],u[o].capture),delete u[o],u)return;c.handler.splice(a,1),c.wrap.splice(a,1),0===c.handler.length&&delete l[t]}}else e.call(this,t,n,r)}}(t.removeEventListener)}},e.EventTarget?o(EventTarget):(o(e.Text),o(e.Element||e.HTMLElement),o(e.HTMLDocument),o(e.Window||{prototype:e}),o(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(e){if("undefined"!=typeof e.setAttribute){var t=function(e){return e.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}))};e.setProperty=function(e,n){var r=t(e);if(!n)return this.removeAttribute(r);var o=String(n);return this.setAttribute(r,o)},e.getPropertyValue=function(e){var n=t(e);return this.getAttribute(n)||null},e.removeProperty=function(e){var n=t(e),r=this.getAttribute(n);return this.removeAttribute(n),r}}}(CSSStyleDeclaration.prototype)},function(e,t,n){"use strict";window.Int32Array||(window.Int32Array=Array)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){ /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ -var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,r,o){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var l=a.styleSheets;if(o)for(var s in o)o.hasOwnProperty(s)&&c.setAttribute(s,o[s]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var d=function m(e){for(var t=c.href,n=l.length;n--;)if(l[n].href===t)return e();setTimeout((function(){m(e)}))};function f(){c.addEventListener&&c.removeEventListener("load",f),c.media=r||"all"}return c.addEventListener&&c.addEventListener("load",f),c.onloadcssdefined=d,d(f),c}}).call(this,n(123))},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var r=n(114);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),a=1;a1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(e,["className"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var r,o;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=r,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(r||(t.VNodeFlags=r={})),t.ChildFlags=o,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(o||(t.ChildFlags=o={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var r=n(2),o=n(9),i=n(407),a=n(22),c=n(55),u=n(13);function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var s=(0,c.createLogger)("ByondUi"),d=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(o[n]=e[n]);return o}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),v=this.state.viewBox,g=function(e,t,n,r){if(0===e.length)return[];var i=(0,o.zipWith)(Math.min).apply(void 0,e),a=(0,o.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),r!==undefined&&(i[1]=r[0],a[1]=r[1]),(0,o.map)((function(e){return(0,o.zipWith)((function(e,t,n,r){return(e-t)/(n-t)*r}))(e,i,a,t)}))(e)}(i,v,a,u);if(g.length>0){var b=g[0],y=g[g.length-1];g.push([v[0]+m,y[1]]),g.push([v[0]+m,-m]),g.push([-m,-m]),g.push([-m,b[1]])}var C=function(e){for(var t="",n=0;n=0||(o[n]=e[n]);return o}(t,["children","color","title","buttons"]);return(0,r.createComponentVNode)(2,o.Box,{mb:1,children:[(0,r.createVNode)(1,"div","Table",[(0,r.createVNode)(1,"div","Table__cell",(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},d,{children:l}))),2),s&&(0,r.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,r.createComponentVNode)(2,o.Box,{mt:1,children:a})]})},a}(r.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var r=n(2),o=n(9),i=n(13),a=n(119);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},l.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},l.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},l.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,r.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},l.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,l=t.over,s=t.noscroll,d=t.nochevron,f=t.width,p=(t.onClick,t.selected,t.disabled),m=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),h=m.className,v=c(m,["className"]),g=l?!this.state.open:this.state.open,b=this.state.open?(0,r.createVNode)(1,"div",(0,o.classes)([s?"Dropdown__menu-noscroll":"Dropdown__menu",l&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:f}},null,(function(t){e.menuRef=t})):null;return(0,r.createVNode)(1,"div","Dropdown",[(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({width:f,className:(0,o.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",h])},v,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,r.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!d||(0,r.createVNode)(1,"span","Dropdown__arrow-button",(0,r.createComponentVNode)(2,a.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),b],0)},u}(r.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var r=n(2),o=n(120),i=n(9);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.children,n=a(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table,Object.assign({},n,{children:(0,r.createComponentVNode)(2,o.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var r=n(2),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){return(0,o.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,r=t.props.onInput;n||t.setEditing(!0),r&&r(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,r=t.props.onChange;n&&(t.setEditing(!1),r&&r(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,r=n.onInput,o=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),o&&o(e,e.target.value),r&&r(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},l.componentDidUpdate=function(e,t){var n=this.state.editing,r=e.value,o=this.props.value,i=this.inputRef.current;i&&!n&&r!==o&&(i.value=c(o))},l.setEditing=function(e){this.setState({editing:e})},l.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=(e.autofocus,a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus"])),u=c.className,l=c.fluid,s=a(c,["className","fluid"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Input",l&&"Input--fluid",u])},s,{children:[(0,r.createVNode)(1,"div","Input__baseline",".",16),(0,r.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},u}(r.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var r=n(2),o=n(35),i=n(9),a=n(22),c=n(13),u=n(167),l=n(121);t.Knob=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,m=e.step,h=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,b=e.value,y=e.className,C=e.style,N=e.fillValue,x=e.color,V=e.ranges,_=void 0===V?{}:V,w=e.size,k=e.bipolar,E=(e.children,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:m,stepPixelSize:h,suppressFlicker:v,unit:g,value:b},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=(0,o.scale)(null!=N?N:a,d,s),m=(0,o.scale)(a,d,s),h=x||(0,o.keyOfMatchingRange)(null!=N?N:n,_)||"default",v=270*(m-.5);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+h,k&&"Knob--bipolar",y,(0,c.computeBoxClassName)(E)]),[(0,r.createVNode)(1,"div","Knob__circle",(0,r.createVNode)(1,"div","Knob__cursorBox",(0,r.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+v+"deg)"}}),2),t&&(0,r.createVNode)(1,"div","Knob__popupValue",u,0),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,r.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,r.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((k?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),l],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":w+"rem"},C)},E)),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var r=n(2),o=n(166);function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var a=function(e){var t=e.children,n=i(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,r.createComponentVNode)(2,o.Flex.Item,{mx:1,children:(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,r.createComponentVNode)(2,o.Flex.Item),(0,r.createComponentVNode)(2,o.Flex.Item,{children:n}),(0,r.createComponentVNode)(2,o.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var r=n(2),o=n(9),i=n(13),a=n(165),c=function(e){var t=e.children;return(0,r.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,u=e.color,l=e.textAlign,s=e.verticalAlign,d=e.buttons,f=e.content,p=e.children;return(0,r.createVNode)(1,"tr",(0,o.classes)(["LabeledList__row",t]),[(0,r.createComponentVNode)(2,i.Box,{as:"td",color:c,verticalAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,r.createComponentVNode)(2,i.Box,{as:"td",color:u,textAlign:l,verticalAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:d?undefined:2,children:[f,p]}),d&&(0,r.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",d,0)],0)};t.LabeledListItem=u,u.defaultHooks=o.pureComponentHooks;var l=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,r.createVNode)(1,"tr","LabeledList__row",(0,r.createVNode)(1,"td",null,(0,r.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=l,l.defaultHooks=o.pureComponentHooks,c.Item=u,c.Divider=l},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var r=n(2),o=n(16),i=n(14),a=function(e,t){var n=(0,i.useBackend)(t).config,a=e.onClick;return(0,r.createComponentVNode)(2,o.Box,{className:"NanoMap__container",children:(0,r.createComponentVNode)(2,o.Box,{as:"img",src:n.map+"_nanomap_z1.png",style:{width:"512px",height:"512px"},onClick:a})})};t.NanoMap=a;a.Marker=function(e){var t=e.x,n=e.y,i=e.icon,a=e.tooltip,c=e.color;return(0,r.createComponentVNode)(2,o.Box,{position:"absolute",className:"NanoMap__marker",top:2*(255-n)+2+"px",left:2*t+2+"px",children:[(0,r.createComponentVNode)(2,o.Icon,{name:i,color:c,size:.5}),(0,r.createComponentVNode)(2,o.Tooltip,{content:a})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var r=n(2),o=n(9),i=n(13),a=n(164);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.createComponentVNode)(2,a.Dimmer,{children:(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,l=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","color","info","warning","success","danger"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},l)))};t.NoticeBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var r=n(2),o=n(35),i=n(9),a=n(13);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,l=e.maxValue,s=void 0===l?1:l,d=e.color,f=e.ranges,p=void 0===f?{}:f,m=e.children,h=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","value","minValue","maxValue","color","ranges","children"]),v=(0,o.scale)(n,u,s),g=m!==undefined,b=d||(0,o.keyOfMatchingRange)(n,p)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+b,t,(0,a.computeBoxClassName)(h)]),[(0,r.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,o.clamp01)(v)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",g?m:(0,o.toFixed)(100*v)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(h))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,l=e.content,s=e.stretchContents,d=e.noTopPadding,f=e.children,p=(e.scrollable,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","title","level","buttons","content","stretchContents","noTopPadding","children","scrollable"])),m=!(0,o.isFalsy)(n)||!(0,o.isFalsy)(u),h=!(0,o.isFalsy)(l)||!(0,o.isFalsy)(f);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Section","Section--level--"+c,e.flexGrow&&"Section--flex",t])},p,{children:[m&&(0,r.createVNode)(1,"div","Section__title",[(0,r.createVNode)(1,"span","Section__titleText",n,0),(0,r.createVNode)(1,"div","Section__buttons",u,0)],4),h&&(0,r.createComponentVNode)(2,i.Box,{className:(0,o.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!d&&"Section__content--noTopPadding"]),children:[l,f]})]})))};t.Section=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var r=n(2),o=n(35),i=n(9),a=n(22),c=n(13),u=n(167),l=n(121);t.Slider=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,m=e.step,h=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,b=e.value,y=e.className,C=e.fillValue,N=e.color,x=e.ranges,V=void 0===x?{}:x,_=e.children,w=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),k=_!==undefined;return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:m,stepPixelSize:h,suppressFlicker:v,unit:g,value:b},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=C!==undefined&&null!==C,m=((0,o.scale)(n,d,s),(0,o.scale)(null!=C?C:a,d,s)),h=(0,o.scale)(a,d,s),v=N||(0,o.keyOfMatchingRange)(null!=C?C:n,V)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+v,y,(0,c.computeBoxClassName)(w)]),[(0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,o.clamp01)(m)+"%",opacity:.4}}),(0,r.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,o.clamp01)(Math.min(m,h))+"%"}}),(0,r.createVNode)(1,"div","Slider__cursorOffset",[(0,r.createVNode)(1,"div","Slider__cursor"),(0,r.createVNode)(1,"div","Slider__pointer"),t&&(0,r.createVNode)(1,"div","Slider__popupValue",u,0)],0,{style:{width:100*(0,o.clamp01)(h)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",k?_:u,0),l],0,Object.assign({},(0,c.computeBoxProps)(w),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var r=n(2),o=n(9),i=n(13),a=n(118);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=c(e,["className","vertical","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Button,Object.assign({className:(0,o.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){var r={"./BodyScanner.js":426,"./ChemDispenser.js":427,"./ChemHeater.js":431,"./ChemMaster.js":432,"./CloningConsole.js":433,"./CrewMonitor.js":434,"./Cryo.js":435,"./DNAModifier.js":436,"./DisposalBin.js":437,"./MedicalRecords.js":438,"./OperatingComputer.js":442,"./Sleeper.js":443};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=425},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(23),u=[["good","Alive"],["average","Critical"],["bad","DEAD"]],l=[["hasBorer","bad","Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."],["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],s=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radioactive","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],d={average:[.25,.5],bad:[.5,Infinity]},f=function(e,t){for(var n=[],r=0;r0?e.reduce((function(e,t){return null===e?t:(0,r.createFragment)([e,!!t&&(0,r.createFragment)([t,t.length>0&&(0,r.createVNode)(1,"br")],0)],0)})):null},m=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,i.useBackend)(t).data,o=n.occupied,a=n.occupant,u=void 0===a?{}:a,l=o?(0,r.createComponentVNode)(2,h,{occupant:u}):(0,r.createComponentVNode)(2,x);return(0,r.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:l})})};var h=function(e){var t=e.occupant;return(0,r.createComponentVNode)(2,a.Box,{children:[(0,r.createComponentVNode)(2,v,{occupant:t}),(0,r.createComponentVNode)(2,g,{occupant:t}),(0,r.createComponentVNode)(2,b,{occupant:t}),(0,r.createComponentVNode)(2,C,{organs:t.extOrgan}),(0,r.createComponentVNode)(2,N,{organs:t.intOrgan})]})},v=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.occupant;return(0,r.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectify")},children:"Eject"}),(0,r.createComponentVNode)(2,a.Button,{icon:"print",onClick:function(){return c("print_p")},children:"Print Report"})],4),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:l.maxHealth,value:l.health/l.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u[l.stat][0],children:u[l.stat][1]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:(0,o.round)(l.bodyTempC,0)}),"\xb0C,\xa0",(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:(0,o.round)(l.bodyTempF,0)}),"\xb0F"]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants",children:l.implant_len?(0,r.createComponentVNode)(2,a.Box,{children:l.implant.map((function(e){return e.name})).join(", ")}):(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"None"})})]})})},g=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,r.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:l.map((function(e,n){if(t[e[0]])return(0,r.createComponentVNode)(2,a.Box,{color:e[1],bold:"bad"===e[1],children:e[2]})}))}):(0,r.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,r.createComponentVNode)(2,a.Section,{title:"Damage",children:(0,r.createComponentVNode)(2,a.Table,{children:f(s,(function(e,n,o){return(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Table.Row,{color:"label",children:[(0,r.createComponentVNode)(2,a.Table.Cell,{children:[e[0],":"]}),(0,r.createComponentVNode)(2,a.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,r.createComponentVNode)(2,a.Table.Row,{children:[(0,r.createComponentVNode)(2,a.Table.Cell,{children:(0,r.createComponentVNode)(2,y,{value:t[e[1]],marginBottom:o0&&"0.5rem",value:e.totalLoss/100,ranges:d,children:[(0,r.createComponentVNode)(2,a.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,r.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"bone"}),(0,o.round)(e.bruteLoss,0),"\xa0",(0,r.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,r.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"fire"}),(0,o.round)(e.fireLoss,0),(0,r.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,r.createComponentVNode)(2,a.Box,{display:"inline",children:(0,o.round)(e.totalLoss,0)})]})}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:"33%",children:[(0,r.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:p([e.internalBleeding&&"Internal bleeding",e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,m(e.germ_level),!!e.open&&"Open incision"])}),(0,r.createComponentVNode)(2,a.Box,{display:"inline",children:[p([!!e.status.splinted&&"Splinted",!!e.status.robotic&&"Robotic",!!e.status.dead&&(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},N=function(e){return 0===e.organs.length?(0,r.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"N/A"})}):(0,r.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,r.createComponentVNode)(2,a.Table,{children:[(0,r.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Damage"}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,r.createComponentVNode)(2,a.Table.Row,{textTransform:"capitalize",children:[(0,r.createComponentVNode)(2,a.Table.Cell,{width:"33%",children:e.name}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/100,mt:t>0&&"0.5rem",ranges:d,children:(0,o.round)(e.damage,0)})}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:"33%",children:[(0,r.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:p([m(e.germ_level)])}),(0,r.createComponentVNode)(2,a.Box,{display:"inline",children:p([1===e.robotic&&"Robotic",2===e.robotic&&"Assisted",!!e.dead&&(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"DEAD"})])})]})]},t)}))]})})},x=function(){return(0,r.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,r.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var r=n(2),o=n(14),i=n(16),a=n(122),c=n(23),u=[1,5,10,20,30,50],l=[1,5,10];t.ChemDispenser=function(e,t){return(0,r.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,s),(0,r.createComponentVNode)(2,d),(0,r.createComponentVNode)(2,f)]})})};var s=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,l=c.amount,s=c.energy,d=c.maxEnergy;return(0,r.createComponentVNode)(2,i.Section,{title:"Settings",flex:"content",children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Energy",children:(0,r.createComponentVNode)(2,i.ProgressBar,{value:s,minValue:0,maxValue:d,ranges:{good:[.5*d,Infinity],average:[.25*d,.5*d],bad:[-Infinity,.25*d]},children:[s," / ",d," Units"]})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,r.createComponentVNode)(2,i.Flex,{direction:"row",spacing:"1",children:u.map((function(e,t){return(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:(0,r.createComponentVNode)(2,i.Button,{icon:"cog",selected:l===e,content:e,m:"0",width:"100%",onClick:function(){return a("amount",{amount:e})}})},t)}))})})]})})},d=function(e,t){for(var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.chemicals,l=void 0===u?[]:u,s=[],d=0;d<(l.length+1)%3;d++)s.push(!0);return(0,r.createComponentVNode)(2,i.Section,{title:c.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,r.createComponentVNode)(2,i.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[l.map((function(e,t){return(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px",children:(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return a("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},f=function(e,t){var n=(0,o.useBackend)(t),c=n.act,u=n.data,s=u.isBeakerLoaded,d=u.beakerCurrentVolume,f=u.beakerMaxVolume,p=u.beakerContents,m=void 0===p?[]:p;return(0,r.createComponentVNode)(2,i.Section,{title:"Beaker",flex:"content",minHeight:"25%",buttons:(0,r.createComponentVNode)(2,i.Box,{children:[!!s&&(0,r.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:2,children:[d," / ",f," units"]}),(0,r.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",disabled:!s,onClick:function(){return c("ejectBeaker")}})]}),children:(0,r.createComponentVNode)(2,a.BeakerContents,{beakerLoaded:s,beakerContents:m,buttons:function(e){return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return c("remove",{reagent:e.id,amount:-1})}}),l.map((function(t,n){return(0,r.createComponentVNode)(2,i.Button,{content:t,onClick:function(){return c("remove",{reagent:e.id,amount:t})}},n)})),(0,r.createComponentVNode)(2,i.Button,{content:"ALL",onClick:function(){return c("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";e.exports=n(429)()},function(e,t,n){"use strict";var r=n(430);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(122),u=n(23);t.ChemHeater=function(e,t){return(0,r.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,u.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,l),(0,r.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data,l=u.targetTemp,s=u.isActive,d=u.currentTemp,f=u.isBeakerLoaded;return(0,r.createComponentVNode)(2,a.Section,{title:"Settings",flexBasis:"content",buttons:(0,r.createComponentVNode)(2,a.Button,{content:s?"On":"Off",icon:"power-off",selected:s,disabled:!f,onClick:function(){return c("toggle_on")}}),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,r.createComponentVNode)(2,a.Knob,{minValue:"0",maxValue:"1000",value:(0,o.round)(l,0),step:"5",unit:"K",m:"0",onChange:function(e,t){return c("adjust_temperature",{target:t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Reading",children:f&&(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return(0,o.toFixed)(e)+" K"}})||"\u2014"})]})})},s=function(e,t){var n=(0,i.useBackend)(t),o=n.act,u=n.data,l=u.isBeakerLoaded,s=u.beakerCurrentVolume,d=u.beakerMaxVolume,f=u.beakerContents;return(0,r.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"1",buttons:!!l&&(0,r.createComponentVNode)(2,a.Box,{children:[(0,r.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",d," units"]}),(0,r.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return o("eject_beaker")}})]}),children:(0,r.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:l,beakerContents:f})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var r=n(2),o=n(14),i=n(16),a=n(23),c=n(122),u=n(85),l=[1,5,10],s=["bottle.png","small_bottle.png","wide_bottle.png","round_bottle.png","reagent_bottle.png"];t.ChemMaster=function(e,t){var n=(0,o.useBackend)(t).data,i=n.condi,c=n.beaker,l=n.beaker_reagents,s=void 0===l?[]:l,m=n.buffer_reagents,h=void 0===m?[]:m,g=n.mode;return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,r.createComponentVNode)(2,u.ComplexModal),(0,r.createComponentVNode)(2,a.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,d,{beaker:c,beakerReagents:s,bufferNonEmpty:h.length>0}),(0,r.createComponentVNode)(2,f,{mode:g,bufferReagents:h}),(0,r.createComponentVNode)(2,p,{isCondiment:i,bufferNonEmpty:h.length>0}),(0,r.createComponentVNode)(2,v)]})]})};var d=function(e,t){var n=(0,o.useBackend)(t).act,a=e.beaker,s=e.beakerReagents,d=e.bufferNonEmpty;return(0,r.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:d?(0,r.createComponentVNode)(2,i.Button.Confirm,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,r.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:a?(0,r.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,o){return(0,r.createComponentVNode)(2,i.Box,{mb:o0?(0,r.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:d,buttons:function(e,o){return(0,r.createComponentVNode)(2,i.Box,{mb:o0?u.desc:"N/A"}),u.blood_type&&(0,r.createFragment)([(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood type",children:u.blood_type}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:u.blood_dna})],4),!c.condi&&(0,r.createComponentVNode)(2,i.Button,{icon:c.printing?"spinner":"print",disabled:c.printing,iconSpin:!!c.printing,ml:"0.5rem",content:"Print",onClick:function(){return a("print",{idx:u.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(84),u=n(85),l=n(23),s=function(e,t){var n=(0,i.useBackend)(t),o=n.act,u=n.data,l=e.args,s=l.activerecord,d=l.realname,f=l.health,p=l.unidentity,m=l.strucenzymes,h=f.split(" - ");return(0,r.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+d,children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Damage",children:h.length>1?(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.oxy,display:"inline",children:h[0]}),(0,r.createTextVNode)("\xa0|\xa0"),(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.toxin,display:"inline",children:h[2]}),(0,r.createTextVNode)("\xa0|\xa0"),(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.brute,display:"inline",children:h[3]}),(0,r.createTextVNode)("\xa0|\xa0"),(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.burn,display:"inline",children:h[1]})],4):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"Unknown"})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:m}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk",children:[(0,r.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){return o("disk",{option:"load"})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){return o("disk",{option:"save",savetype:"ui"})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){return o("disk",{option:"save",savetype:"ue"})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){return o("disk",{option:"save",savetype:"se"})}})]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,r.createComponentVNode)(2,a.Button,{disabled:!u.podready,icon:"user-plus",content:"Clone",onClick:function(){return o("clone",{ref:s})}}),(0,r.createComponentVNode)(2,a.Button,{icon:"trash",content:"Delete",onClick:function(){return o("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.menu;return(0,u.modalRegisterBodyOverride)("view_rec",s),(0,r.createComponentVNode)(2,l.Window,{resizable:!0,children:[(0,r.createComponentVNode)(2,u.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,r.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,h),(0,r.createComponentVNode)(2,v),(0,r.createComponentVNode)(2,d),(0,r.createComponentVNode)(2,a.Section,{noTopPadding:!0,flexGrow:"1",children:(0,r.createComponentVNode)(2,f)})]})]})};var d=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data.menu;return(0,r.createComponentVNode)(2,a.Tabs,{children:[(0,r.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return o("menu",{num:1})},children:"Main"}),(0,r.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return o("menu",{num:2})},children:"Records"})]})},f=function(e,t){var n,o=(0,i.useBackend)(t).data.menu;return 1===o?n=(0,r.createComponentVNode)(2,p):2===o&&(n=(0,r.createComponentVNode)(2,m)),n},p=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data,l=u.loading,s=u.scantemp,d=u.occupant,f=u.locked,p=u.can_brainscan,m=u.scan_mode,h=u.numberofpods,v=u.pods,g=u.selected_pod,b=f&&!!d;return(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Section,{title:"Scanner",level:"2",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,r.createComponentVNode)(2,a.Button,{disabled:!d,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return c("lock")}}),(0,r.createComponentVNode)(2,a.Button,{disabled:b||!d,icon:"user-slash",content:"Eject Occupant",onClick:function(){return c("eject")}})],4),children:[(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,r.createComponentVNode)(2,a.Box,{color:"average",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,r.createComponentVNode)(2,a.Box,{color:s.color,children:s.text})}),!!p&&(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Mode",children:(0,r.createComponentVNode)(2,a.Button,{icon:m?"brain":"male",content:m?"Brain":"Body",onClick:function(){return c("toggle_mode")}})})]}),(0,r.createComponentVNode)(2,a.Button,{disabled:!d||l,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return c("scan")}})]}),(0,r.createComponentVNode)(2,a.Section,{title:"Pods",level:"2",children:h?v.map((function(e,t){var n;return n="cloning"===e.status?(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,r.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,o.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,r.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,r.createComponentVNode)(2,a.Button,{selected:g===e.pod,icon:g===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,r.createComponentVNode)(2,a.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,r.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,r.createComponentVNode)(2,a.Box,{color:"label",children:["Pod #",t+1]}),(0,r.createComponentVNode)(2,a.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,r.createComponentVNode)(2,a.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},m=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data.records;return c.length?(0,r.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,r.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return o("view_rec",{ref:e.record})}},t)}))}):(0,r.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No records found."]})})},h=function(e,t){var n,o=(0,i.useBackend)(t),c=o.act,u=o.data.temp;if(u&&u.text&&!(u.text.length<=0)){var l=((n={})[u.style]=!0,n);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.NoticeBox,Object.assign({},l,{children:[(0,r.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:u.text}),(0,r.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,r.createComponentVNode)(2,a.Box,{clear:"both"})]})))}},v=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.scanner,l=c.numberofpods,s=c.autoallowed,d=c.autoprocess,f=c.disk;return(0,r.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,r.createFragment)([!!s&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,r.createComponentVNode)(2,a.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Enabled":"Disabled",onClick:function(){return o("autoprocess",{on:d?0:1})}})],4),(0,r.createComponentVNode)(2,a.Button,{disabled:!f,icon:"eject",content:"Eject Disk",onClick:function(){return o("disk",{option:"eject"})}})],0),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanner",children:u?(0,r.createComponentVNode)(2,a.Box,{color:"good",children:"Connected"}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"Not connected!"})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Pods",children:l?(0,r.createComponentVNode)(2,a.Box,{color:"good",children:[l," connected"]}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var r=n(2),o=n(114),i=n(14),a=n(23),c=n(16),u=n(120);t.CrewMonitor=function(e,t){var n=(0,i.useBackend)(t),l=n.act,s=n.data,d=(0,o.sortBy)((function(e){return e.name}))(s.crewmembers||[]);return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{children:[d.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,r.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)})),(0,r.createComponentVNode)(2,c.NanoMap),(0,r.createComponentVNode)(2,c.Box,{className:"NanoMap__contentOffset",children:(0,r.createComponentVNode)(2,c.Box,{bold:!0,m:2,children:(0,r.createComponentVNode)(2,c.Table,{children:[(0,r.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),d.map((function(e){return(0,r.createComponentVNode)(2,c.Table.Row,{children:[(0,r.createComponentVNode)(2,u.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,r.createComponentVNode)(2,u.TableCell,{children:[(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,r.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,r.createComponentVNode)(2,u.TableCell,{children:3===e.sensor_type?s.isAI?(0,r.createComponentVNode)(2,c.Button,{fluid:!0,content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return l("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var r=n(2),o=n(14),i=n(16),a=n(23),c=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],u=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:(0,r.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,o.useBackend)(t),a=n.act,l=n.data,d=l.isOperating,f=l.hasOccupant,p=l.occupant,m=void 0===p?[]:p,h=l.cellTemperature,v=l.cellTemperatureStatus,g=l.isBeakerLoaded,b=l.auto_eject_healthy,y=l.auto_eject_dead;return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Section,{title:"Occupant",flexGrow:"1",buttons:(0,r.createComponentVNode)(2,i.Button,{icon:"user-slash",onClick:function(){return a("ejectOccupant")},disabled:!f,children:"Eject"}),children:f?(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Occupant",children:m.name||"Unknown"}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,i.ProgressBar,{min:m.health,max:m.maxHealth,value:m.health/m.maxHealth,color:m.health>0?"good":"average",children:(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:Math.round(m.health)})})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:u[m.stat][0],children:u[m.stat][1]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:Math.round(m.bodyTemperature)})," K"]}),(0,r.createComponentVNode)(2,i.LabeledList.Divider),c.map((function(e){return(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:e.label,children:(0,r.createComponentVNode)(2,i.ProgressBar,{value:m[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:Math.round(m[e.type])})})},e.id)}))]}):(0,r.createComponentVNode)(2,i.Flex,{height:"100%",textAlign:"center",children:(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant detected."]})})}),(0,r.createComponentVNode)(2,i.Section,{title:"Cell",buttons:(0,r.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return a("ejectBeaker")},disabled:!g,children:"Eject Beaker"}),children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,r.createComponentVNode)(2,i.Button,{icon:"power-off",onClick:function(){return a(d?"switchOff":"switchOn")},selected:d,children:d?"On":"Off"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",color:v,children:[(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:h})," K"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",children:(0,r.createComponentVNode)(2,s)}),(0,r.createComponentVNode)(2,i.LabeledList.Divider),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,r.createComponentVNode)(2,i.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return a(b?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:b?"On":"Off"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,r.createComponentVNode)(2,i.Button,{icon:y?"toggle-on":"toggle-off",selected:y,onClick:function(){return a(y?"auto_eject_dead_off":"auto_eject_dead_on")},children:y?"On":"Off"})})]})})],4)},s=function(e,t){var n=(0,o.useBackend)(t),a=(n.act,n.data),c=a.isBeakerLoaded,u=a.beakerLabel,l=a.beakerVolume;return c?(0,r.createFragment)([u||(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"No label"}),(0,r.createComponentVNode)(2,i.Box,{color:!l&&"bad",children:l?(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:l,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],0):(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var r=n(2),o=n(14),i=n(16),a=n(23),c=n(85),u=[["good","Alive"],["average","Critical"],["bad","DEAD"]],l=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],s=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,i=(0,o.useBackend)(t),u=(i.act,i.data),l=u.irradiating,s=u.dnaBlockSize,p=u.occupant;return t.dnaBlockSize=s,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,l&&(n=(0,r.createComponentVNode)(2,C,{duration:l})),(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,r.createComponentVNode)(2,c.ComplexModal),n,(0,r.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,d),(0,r.createComponentVNode)(2,f)]})]})};var d=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,l=c.locked,s=c.hasOccupant,d=c.occupant;return(0,r.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s,selected:l,icon:l?"toggle-on":"toggle-off",content:l?"Engaged":"Disengaged",onClick:function(){return a("toggleLock")}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s||l,icon:"user-slash",content:"Eject",onClick:function(){return a("ejectOccupant")}})],4),children:s?(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Box,{children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d.name}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,i.ProgressBar,{min:d.minHealth,max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:u[d.stat][0],children:u[d.stat][1]}),(0,r.createComponentVNode)(2,i.LabeledList.Divider)]})}),t.isDNAInvalid?(0,r.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Radiation",children:(0,r.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:d.radiationLevel/100,color:"average"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Unique Enzymes",children:c.occupant.uniqueEnzymes?c.occupant.uniqueEnzymes:(0,r.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,r.createComponentVNode)(2,i.Box,{color:"label",children:"Cell unoccupied."})})},f=function(e,t){var n,a=(0,o.useBackend)(t),c=a.act,u=a.data,s=u.selectedMenuKey,d=u.hasOccupant;u.occupant;return d?t.isDNAInvalid?(0,r.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,r.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===s?n=(0,r.createFragment)([(0,r.createComponentVNode)(2,p),(0,r.createComponentVNode)(2,h)],4):"se"===s?n=(0,r.createFragment)([(0,r.createComponentVNode)(2,m),(0,r.createComponentVNode)(2,h)],4):"buffer"===s?n=(0,r.createComponentVNode)(2,v):"rejuvenators"===s&&(n=(0,r.createComponentVNode)(2,y)),(0,r.createComponentVNode)(2,i.Section,{flexGrow:"1",children:[(0,r.createComponentVNode)(2,i.Tabs,{children:l.map((function(e,t){return(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:s===e[0],onClick:function(){return c("selectMenuKey",{key:e[0]})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,r.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,r.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.selectedUIBlock,l=c.selectedUISubBlock,s=c.selectedUITarget,d=c.occupant;return(0,r.createComponentVNode)(2,i.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,r.createComponentVNode)(2,N,{dnaString:d.uniqueIdentity,selectedBlock:u,selectedSubblock:l,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Target",children:(0,r.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:s,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return a("changeUITarget",{value:t})}})})}),(0,r.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return a("pulseUIRadiation")}})]})},m=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.selectedSEBlock,l=c.selectedSESubBlock,s=c.occupant;return(0,r.createComponentVNode)(2,i.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,r.createComponentVNode)(2,N,{dnaString:s.structuralEnzymes,selectedBlock:u,selectedSubblock:l,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,r.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return a("pulseSERadiation")}})]})},h=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.radiationIntensity,l=c.radiationDuration;return(0,r.createComponentVNode)(2,i.Section,{title:"Radiation Emitter",level:"2",children:[(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Intensity",children:(0,r.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:u,ml:"0",onChange:function(e,t){return a("radiationIntensity",{value:t})}})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Duration",children:(0,r.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:l,ml:"0",onChange:function(e,t){return a("radiationDuration",{value:t})}})})]}),(0,r.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return a("pulseRadiation")}})]})},v=function(e,t){var n=(0,o.useBackend)(t),a=(n.act,n.data.buffers.map((function(e,t){return(0,r.createComponentVNode)(2,g,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Section,{title:"Buffers",level:"2",children:a}),(0,r.createComponentVNode)(2,b)],4)},g=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=e.id,l=e.name,s=e.buffer,d=c.isInjectorReady,f=l+(s.data?" - "+s.label:"");return(0,r.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.createComponentVNode)(2,i.Section,{title:f,level:"3",mx:"0",lineHeight:"18px",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button.Confirm,{disabled:!s.data,icon:"trash",content:"Clear",onClick:function(){return a("bufferOption",{option:"clear",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s.data,icon:"pen",content:"Rename",onClick:function(){return a("bufferOption",{option:"changeLabel",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s.data||!c.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return a("bufferOption",{option:"saveDisk",id:u})}})],4),children:[(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Write",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUI",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUIAndUE",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveSE",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!c.hasDisk||!c.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return a("bufferOption",{option:"loadDisk",id:u})}})]}),!!s.data&&(0,r.createFragment)([(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:s.owner||(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer to",children:[(0,r.createComponentVNode)(2,i.Button,{disabled:!d,icon:d?"syringe":"spinner",iconSpin:!d,content:"Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!d,icon:d?"syringe":"spinner",iconSpin:!d,content:"Block Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:u,block:1})}}),(0,r.createComponentVNode)(2,i.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return a("bufferOption",{option:"transfer",id:u})}})]})],4)]}),!s.data&&(0,r.createComponentVNode)(2,i.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.hasDisk,l=c.disk;return(0,r.createComponentVNode)(2,i.Section,{title:"Data Disk",level:"2",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button.Confirm,{disabled:!u||!l.data,icon:"trash",content:"Wipe",onClick:function(){return a("wipeDisk")}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!u,icon:"eject",content:"Eject",onClick:function(){return a("ejectDisk")}})],4),children:u?l.data?(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:l.label?l.label:"No label"}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:l.owner?l.owner:(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===l.type?"Unique Identifiers":"Structural Enzymes",!!l.ue&&" and Unique Enzymes"]})]}):(0,r.createComponentVNode)(2,i.Box,{color:"label",children:"Disk is blank."}):(0,r.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"save-o",size:"4"}),(0,r.createVNode)(1,"br"),"No disk inserted."]})})},y=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.isBeakerLoaded,l=c.beakerVolume,d=c.beakerLabel;return(0,r.createComponentVNode)(2,i.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,r.createComponentVNode)(2,i.Button,{disabled:!u,icon:"eject",content:"Eject",onClick:function(){return a("ejectBeaker")}}),children:u?(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Inject",children:[s.map((function(e,t){return(0,r.createComponentVNode)(2,i.Button,{disabled:e>l,icon:"syringe",content:e,onClick:function(){return a("injectRejuvenators",{amount:e})}},t)})),(0,r.createComponentVNode)(2,i.Button,{disabled:l<=0,icon:"syringe",content:"All",onClick:function(){return a("injectRejuvenators",{amount:l})}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",children:[(0,r.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:d||"No label"}),l?(0,r.createComponentVNode)(2,i.Box,{color:"good",children:[l," unit",1===l?"":"s"," remaining"]}):(0,r.createComponentVNode)(2,i.Box,{color:"bad",children:"Empty"})]})]}):(0,r.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",size:"4"}),(0,r.createVNode)(1,"br"),"No beaker loaded."]})})},C=function(e,t){return(0,r.createComponentVNode)(2,i.Dimmer,{textAlign:"center",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"spinner",size:"5",spin:!0}),(0,r.createVNode)(1,"br"),(0,r.createComponentVNode)(2,i.Box,{color:"average",children:(0,r.createVNode)(1,"h1",null,[(0,r.createComponentVNode)(2,i.Icon,{name:"radiation"}),(0,r.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,r.createComponentVNode)(2,i.Icon,{name:"radiation"})],4)}),(0,r.createComponentVNode)(2,i.Box,{color:"label",children:(0,r.createVNode)(1,"h3",null,[(0,r.createTextVNode)("For "),e.duration,(0,r.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},N=function(e,t){for(var n=(0,o.useBackend)(t),a=n.act,c=(n.data,e.dnaString),u=e.selectedBlock,l=e.selectedSubblock,s=e.blockSize,d=e.action,f=c.split(""),p=[],m=function(e){for(var t=e/s+1,n=[],o=function(o){var c=o+1;n.push((0,r.createComponentVNode)(2,i.Button,{selected:u===t&&l===c,content:f[e+o],mb:"0",onClick:function(){return a(d,{block:t,subblock:c})}}))},c=0;ct.name?1:-1})),c.map((function(e,t){return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button,{icon:"flask",content:e.name,mb:"0.5rem",onClick:function(){return a("vir",{vir:e.D})}}),(0,r.createVNode)(1,"br")],4,t)}))},y=function(e,t){var n=(0,o.useBackend)(t).data.medbots;return 0===n.length?(0,r.createComponentVNode)(2,i.Box,{color:"label",children:"There are no Medbots."}):n.map((function(e,t){return(0,r.createComponentVNode)(2,i.Collapsible,{open:!0,title:e.name,children:(0,r.createComponentVNode)(2,i.Box,{px:"0.5rem",children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:e.on?(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Box,{color:"good",children:"Online"}),(0,r.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer."})],4):(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"Offline"})})]})})},t)}))},C=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data.screen;return(0,r.createComponentVNode)(2,i.Tabs,{children:[(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,onClick:function(){return a("screen",{screen:2})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"list"}),"List Records"]}),(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:5===c,onClick:function(){return a("screen",{screen:5})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"database"}),"Virus Database"]}),(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:6===c,onClick:function(){return a("screen",{screen:6})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"plus-square"}),"Medbot Tracking"]}),(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:3===c,onClick:function(){return a("screen",{screen:3})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"wrench"}),"Record Maintenance"]})]})};(0,a.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,r.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,r.createComponentVNode)(2,i.Box,{mx:"0.5rem",children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Notes",children:n.desc}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Severity",color:d[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LoginInfo=void 0;var r=n(2),o=n(14),i=n(16);t.LoginInfo=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.scan;if(c)return(0,r.createComponentVNode)(2,i.NoticeBox,{info:!0,children:[(0,r.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:["Logged in as: ",u]}),(0,r.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"Logout and Eject ID",color:"good",float:"right",onClick:function(){return a("logout")}}),(0,r.createComponentVNode)(2,i.Box,{clear:"both"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginScreen=void 0;var r=n(2),o=n(14),i=n(16);t.LoginScreen=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data.scan;return(0,r.createComponentVNode)(2,i.Section,{title:"Welcome",height:"100%",stretchContents:!0,children:(0,r.createComponentVNode)(2,i.Flex,{height:"100%",align:"center",justify:"center",children:(0,r.createComponentVNode)(2,i.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,r.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,r.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:["ID:",(0,r.createComponentVNode)(2,i.Button,{icon:"id-card",content:c||"----------",ml:"0.5rem",onClick:function(){return a("scan")}})]}),(0,r.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",disabled:!c,content:"Login",onClick:function(){return a("login")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var r=n(2),o=n(14),i=n(16);t.TemporaryNotice=function(e,t){var n,a=(0,o.useBackend)(t),c=a.act,u=a.data.temp;if(u){var l=((n={})[u.style]=!0,n);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.NoticeBox,Object.assign({},l,{children:[(0,r.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:u.text}),(0,r.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,r.createComponentVNode)(2,i.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var r=n(2),o=n(35),i=n(14),a=n(23),c=n(16),u=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],l=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,Infinity]},d=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,o=(0,i.useBackend)(t),u=o.act,l=o.data,s=l.hasOccupant,d=l.choice;return n=d?(0,r.createComponentVNode)(2,m):s?(0,r.createComponentVNode)(2,f):(0,r.createComponentVNode)(2,p),(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,c.Tabs,{children:[(0,r.createComponentVNode)(2,c.Tabs.Tab,{selected:!d,icon:"user",onClick:function(){return u("choiceOff")},children:"Patient"}),(0,r.createComponentVNode)(2,c.Tabs.Tab,{selected:!!d,icon:"cog",onClick:function(){return u("choiceOn")},children:"Options"})]}),(0,r.createComponentVNode)(2,c.Section,{flexGrow:"1",children:n})]})})};var f=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,r.createFragment)([(0,r.createComponentVNode)(2,c.Section,{title:"Patient",level:"2",children:(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:n.name}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:u[n.stat][0],children:u[n.stat][1]}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),l.map((function(e,t){return(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:e[0]+" Damage",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:(0,o.round)(n[e[1]])},t)},t)})),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:d[n.temperatureSuitability+3],children:[(0,o.round)(n.btCelsius),"\xb0C, ",(0,o.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,r.createFragment)([(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,r.createComponentVNode)(2,c.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,r.createComponentVNode)(2,c.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,r.createComponentVNode)(2,c.Flex,{textAlign:"center",height:"100%",children:(0,r.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No patient detected."]})})},m=function(e,t){var n=(0,i.useBackend)(t),o=n.act,a=n.data,u=a.verbose,l=a.health,s=a.healthAlarm,d=a.oxy,f=a.oxyAlarm,p=a.crit;return(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Loudspeaker",children:(0,r.createComponentVNode)(2,c.Button,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return o(u?"verboseOff":"verboseOn")}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer",children:(0,r.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return o(l?"healthOff":"healthOn")}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,r.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:s,stepPixelSize:"5",ml:"0",onChange:function(e,t){return o("health_adj",{"new":t})}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm",children:(0,r.createComponentVNode)(2,c.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return o(d?"oxyOff":"oxyOn")}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,r.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:f,stepPixelSize:"5",ml:"0",onChange:function(e,t){return o("oxy_adj",{"new":t})}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Critical Alert",children:(0,r.createComponentVNode)(2,c.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return o(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(23),u=[["good","Alive"],["average","Critical"],["bad","DEAD"]],l=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,Infinity]},d=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,i.useBackend)(t),o=(n.act,n.data.hasOccupant?(0,r.createComponentVNode)(2,f):(0,r.createComponentVNode)(2,g));return(0,r.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:o})})};var f=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.occupant;return(0,r.createFragment)([(0,r.createComponentVNode)(2,p),(0,r.createComponentVNode)(2,m),(0,r.createComponentVNode)(2,v),(0,r.createComponentVNode)(2,h)],4)},p=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.occupant,f=l.auto_eject_dead;return(0,r.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,r.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,content:f?"On":"Off",onClick:function(){return c("auto_eject_dead_"+(f?"off":"on"))}}),(0,r.createComponentVNode)(2,a.Button,{icon:"user-slash",content:"Eject",onClick:function(){return c("ejectify")}})],4),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,o.round)(s.health,0)})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u[s.stat][0],children:u[s.stat][1]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.maxTemp,value:s.bodyTemperature/s.maxTemp,color:d[s.temperatureSuitability+3],children:[(0,o.round)(s.btCelsius,0),"\xb0C,",(0,o.round)(s.btFaren,0),"\xb0F"]})}),!!s.hasBlood&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Level",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.bloodMax,value:s.bloodLevel/s.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[s.bloodPercent,"%, ",s.bloodLevel,"cl"]})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[s.pulse," BPM"]})],4)]})})},m=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,r.createComponentVNode)(2,a.Section,{title:"Damage",children:(0,r.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e,t){return(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:e[0],children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:(0,o.round)(n[e[1]],0)},t)},t)}))})})},h=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.isBeakerLoaded,l=c.beakerMaxSpace,s=c.beakerFreeSpace,d=c.dialysis&&s>0;return(0,r.createComponentVNode)(2,a.Section,{title:"Dialysis",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{disabled:!u||s<=0,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Active":"Inactive",onClick:function(){return o("togglefilter")}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u,icon:"eject",content:"Eject",onClick:function(){return o("removebeaker")}})],4),children:u?(0,r.createComponentVNode)(2,a.LabeledList,{children:(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Remaining Space",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:l,value:s/l,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"No beaker loaded."})})},v=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.occupant,l=c.chemicals,s=c.maxchem,d=c.amounts;return(0,r.createComponentVNode)(2,a.Section,{title:"Chemicals",flexGrow:"1",children:l.map((function(e,t){var n,i="";return e.overdosing?(i="bad",n=(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(i="average",n=(0,r.createComponentVNode)(2,a.Box,{color:"average",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,r.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.createComponentVNode)(2,a.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,r.createComponentVNode)(2,a.Flex,{align:"flex-start",children:[(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s,value:e.occ_amount/s,color:i,mr:"0.5rem",children:[e.pretty_amount,"/",s,"u"]}),d.map((function(t,n){return(0,r.createComponentVNode)(2,a.Button,{disabled:!e.injectable||e.occ_amount+t>s||2===u.stat,icon:"syringe",content:t,mb:"0",height:"19px",onClick:function(){return o("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},g=function(e,t){return(0,r.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,r.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant detected."]})})})}}]); \ No newline at end of file +var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,r,o){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var l=a.styleSheets;if(o)for(var s in o)o.hasOwnProperty(s)&&c.setAttribute(s,o[s]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var d=function m(e){for(var t=c.href,n=l.length;n--;)if(l[n].href===t)return e();setTimeout((function(){m(e)}))};function f(){c.addEventListener&&c.removeEventListener("load",f),c.media=r||"all"}return c.addEventListener&&c.addEventListener("load",f),c.onloadcssdefined=d,d(f),c}}).call(this,n(123))},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var r=n(114);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),a=1;a1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(e,["className"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var r,o;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=r,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(r||(t.VNodeFlags=r={})),t.ChildFlags=o,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(o||(t.ChildFlags=o={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var r=n(2),o=n(9),i=n(407),a=n(22),c=n(55),u=n(13);function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var s=(0,c.createLogger)("ByondUi"),d=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(o[n]=e[n]);return o}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),v=this.state.viewBox,g=function(e,t,n,r){if(0===e.length)return[];var i=(0,o.zipWith)(Math.min).apply(void 0,e),a=(0,o.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),r!==undefined&&(i[1]=r[0],a[1]=r[1]),(0,o.map)((function(e){return(0,o.zipWith)((function(e,t,n,r){return(e-t)/(n-t)*r}))(e,i,a,t)}))(e)}(i,v,a,u);if(g.length>0){var b=g[0],y=g[g.length-1];g.push([v[0]+m,y[1]]),g.push([v[0]+m,-m]),g.push([-m,-m]),g.push([-m,b[1]])}var C=function(e){for(var t="",n=0;n=0||(o[n]=e[n]);return o}(t,["children","color","title","buttons"]);return(0,r.createComponentVNode)(2,o.Box,{mb:1,children:[(0,r.createVNode)(1,"div","Table",[(0,r.createVNode)(1,"div","Table__cell",(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},d,{children:l}))),2),s&&(0,r.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,r.createComponentVNode)(2,o.Box,{mt:1,children:a})]})},a}(r.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var r=n(2),o=n(9),i=n(13),a=n(119);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},l.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},l.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},l.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,r.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},l.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,l=t.over,s=t.noscroll,d=t.nochevron,f=t.width,p=(t.onClick,t.selected,t.disabled),m=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),h=m.className,v=c(m,["className"]),g=l?!this.state.open:this.state.open,b=this.state.open?(0,r.createVNode)(1,"div",(0,o.classes)([s?"Dropdown__menu-noscroll":"Dropdown__menu",l&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:f}},null,(function(t){e.menuRef=t})):null;return(0,r.createVNode)(1,"div","Dropdown",[(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({width:f,className:(0,o.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",h])},v,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,r.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!d||(0,r.createVNode)(1,"span","Dropdown__arrow-button",(0,r.createComponentVNode)(2,a.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),b],0)},u}(r.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var r=n(2),o=n(120),i=n(9);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.children,n=a(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table,Object.assign({},n,{children:(0,r.createComponentVNode)(2,o.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var r=n(2),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){return(0,o.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,r=t.props.onInput;n||t.setEditing(!0),r&&r(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,r=t.props.onChange;n&&(t.setEditing(!1),r&&r(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,r=n.onInput,o=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),o&&o(e,e.target.value),r&&r(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},l.componentDidUpdate=function(e,t){var n=this.state.editing,r=e.value,o=this.props.value,i=this.inputRef.current;i&&!n&&r!==o&&(i.value=c(o))},l.setEditing=function(e){this.setState({editing:e})},l.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=(e.autofocus,a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus"])),u=c.className,l=c.fluid,s=a(c,["className","fluid"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Input",l&&"Input--fluid",u])},s,{children:[(0,r.createVNode)(1,"div","Input__baseline",".",16),(0,r.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},u}(r.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var r=n(2),o=n(35),i=n(9),a=n(22),c=n(13),u=n(167),l=n(121);t.Knob=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,m=e.step,h=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,b=e.value,y=e.className,C=e.style,N=e.fillValue,x=e.color,V=e.ranges,_=void 0===V?{}:V,w=e.size,k=e.bipolar,E=(e.children,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:m,stepPixelSize:h,suppressFlicker:v,unit:g,value:b},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=(0,o.scale)(null!=N?N:a,d,s),m=(0,o.scale)(a,d,s),h=x||(0,o.keyOfMatchingRange)(null!=N?N:n,_)||"default",v=270*(m-.5);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+h,k&&"Knob--bipolar",y,(0,c.computeBoxClassName)(E)]),[(0,r.createVNode)(1,"div","Knob__circle",(0,r.createVNode)(1,"div","Knob__cursorBox",(0,r.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+v+"deg)"}}),2),t&&(0,r.createVNode)(1,"div","Knob__popupValue",u,0),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,r.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,r.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((k?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),l],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":w+"rem"},C)},E)),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var r=n(2),o=n(166);function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var a=function(e){var t=e.children,n=i(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,r.createComponentVNode)(2,o.Flex.Item,{mx:1,children:(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,r.createComponentVNode)(2,o.Flex.Item),(0,r.createComponentVNode)(2,o.Flex.Item,{children:n}),(0,r.createComponentVNode)(2,o.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var r=n(2),o=n(9),i=n(13),a=n(165),c=function(e){var t=e.children;return(0,r.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,u=e.color,l=e.textAlign,s=e.verticalAlign,d=e.buttons,f=e.content,p=e.children;return(0,r.createVNode)(1,"tr",(0,o.classes)(["LabeledList__row",t]),[(0,r.createComponentVNode)(2,i.Box,{as:"td",color:c,verticalAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,r.createComponentVNode)(2,i.Box,{as:"td",color:u,textAlign:l,verticalAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:d?undefined:2,children:[f,p]}),d&&(0,r.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",d,0)],0)};t.LabeledListItem=u,u.defaultHooks=o.pureComponentHooks;var l=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,r.createVNode)(1,"tr","LabeledList__row",(0,r.createVNode)(1,"td",null,(0,r.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=l,l.defaultHooks=o.pureComponentHooks,c.Item=u,c.Divider=l},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var r=n(2),o=n(16),i=n(14),a=function(e,t){var n=(0,i.useBackend)(t).config,a=e.onClick;return(0,r.createComponentVNode)(2,o.Box,{className:"NanoMap__container",children:(0,r.createComponentVNode)(2,o.Box,{as:"img",src:n.map+"_nanomap_z1.png",style:{width:"512px",height:"512px"},onClick:a})})};t.NanoMap=a;a.Marker=function(e){var t=e.x,n=e.y,i=e.icon,a=e.tooltip,c=e.color;return(0,r.createComponentVNode)(2,o.Box,{position:"absolute",className:"NanoMap__marker",top:2*(255-n)+2+"px",left:2*t+2+"px",children:[(0,r.createComponentVNode)(2,o.Icon,{name:i,color:c,size:.5}),(0,r.createComponentVNode)(2,o.Tooltip,{content:a})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var r=n(2),o=n(9),i=n(13),a=n(164);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.createComponentVNode)(2,a.Dimmer,{children:(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,l=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","color","info","warning","success","danger"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},l)))};t.NoticeBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var r=n(2),o=n(35),i=n(9),a=n(13);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,l=e.maxValue,s=void 0===l?1:l,d=e.color,f=e.ranges,p=void 0===f?{}:f,m=e.children,h=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","value","minValue","maxValue","color","ranges","children"]),v=(0,o.scale)(n,u,s),g=m!==undefined,b=d||(0,o.keyOfMatchingRange)(n,p)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+b,t,(0,a.computeBoxClassName)(h)]),[(0,r.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,o.clamp01)(v)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",g?m:(0,o.toFixed)(100*v)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(h))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,l=e.content,s=e.stretchContents,d=e.noTopPadding,f=e.children,p=(e.scrollable,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","title","level","buttons","content","stretchContents","noTopPadding","children","scrollable"])),m=!(0,o.isFalsy)(n)||!(0,o.isFalsy)(u),h=!(0,o.isFalsy)(l)||!(0,o.isFalsy)(f);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Section","Section--level--"+c,e.flexGrow&&"Section--flex",t])},p,{children:[m&&(0,r.createVNode)(1,"div","Section__title",[(0,r.createVNode)(1,"span","Section__titleText",n,0),(0,r.createVNode)(1,"div","Section__buttons",u,0)],4),h&&(0,r.createComponentVNode)(2,i.Box,{className:(0,o.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!d&&"Section__content--noTopPadding"]),children:[l,f]})]})))};t.Section=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var r=n(2),o=n(35),i=n(9),a=n(22),c=n(13),u=n(167),l=n(121);t.Slider=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,m=e.step,h=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,b=e.value,y=e.className,C=e.fillValue,N=e.color,x=e.ranges,V=void 0===x?{}:x,_=e.children,w=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),k=_!==undefined;return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:m,stepPixelSize:h,suppressFlicker:v,unit:g,value:b},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=C!==undefined&&null!==C,m=((0,o.scale)(n,d,s),(0,o.scale)(null!=C?C:a,d,s)),h=(0,o.scale)(a,d,s),v=N||(0,o.keyOfMatchingRange)(null!=C?C:n,V)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+v,y,(0,c.computeBoxClassName)(w)]),[(0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,o.clamp01)(m)+"%",opacity:.4}}),(0,r.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,o.clamp01)(Math.min(m,h))+"%"}}),(0,r.createVNode)(1,"div","Slider__cursorOffset",[(0,r.createVNode)(1,"div","Slider__cursor"),(0,r.createVNode)(1,"div","Slider__pointer"),t&&(0,r.createVNode)(1,"div","Slider__popupValue",u,0)],0,{style:{width:100*(0,o.clamp01)(h)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",k?_:u,0),l],0,Object.assign({},(0,c.computeBoxProps)(w),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var r=n(2),o=n(9),i=n(13),a=n(118);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=c(e,["className","vertical","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Button,Object.assign({className:(0,o.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){var r={"./BodyScanner.js":426,"./ChemDispenser.js":427,"./ChemHeater.js":431,"./ChemMaster.js":432,"./CloningConsole.js":433,"./CrewMonitor.js":434,"./Cryo.js":435,"./DNAModifier.js":436,"./DisposalBin.js":437,"./MedicalRecords.js":438,"./OperatingComputer.js":442,"./Sleeper.js":443};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=425},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(23),u=[["good","Alive"],["average","Critical"],["bad","DEAD"]],l=[["hasBorer","bad","Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."],["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],s=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radioactive","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],d={average:[.25,.5],bad:[.5,Infinity]},f=function(e,t){for(var n=[],r=0;r0?e.reduce((function(e,t){return null===e?t:(0,r.createFragment)([e,!!t&&(0,r.createFragment)([t,t.length>0&&(0,r.createVNode)(1,"br")],0)],0)})):null},m=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,i.useBackend)(t).data,o=n.occupied,a=n.occupant,u=void 0===a?{}:a,l=o?(0,r.createComponentVNode)(2,h,{occupant:u}):(0,r.createComponentVNode)(2,x);return(0,r.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:l})})};var h=function(e){var t=e.occupant;return(0,r.createComponentVNode)(2,a.Box,{children:[(0,r.createComponentVNode)(2,v,{occupant:t}),(0,r.createComponentVNode)(2,g,{occupant:t}),(0,r.createComponentVNode)(2,b,{occupant:t}),(0,r.createComponentVNode)(2,C,{organs:t.extOrgan}),(0,r.createComponentVNode)(2,N,{organs:t.intOrgan})]})},v=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.occupant;return(0,r.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectify")},children:"Eject"}),(0,r.createComponentVNode)(2,a.Button,{icon:"print",onClick:function(){return c("print_p")},children:"Print Report"})],4),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:l.maxHealth,value:l.health/l.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u[l.stat][0],children:u[l.stat][1]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:(0,o.round)(l.bodyTempC,0)}),"\xb0C,\xa0",(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:(0,o.round)(l.bodyTempF,0)}),"\xb0F"]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants",children:l.implant_len?(0,r.createComponentVNode)(2,a.Box,{children:l.implant.map((function(e){return e.name})).join(", ")}):(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"None"})})]})})},g=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,r.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:l.map((function(e,n){if(t[e[0]])return(0,r.createComponentVNode)(2,a.Box,{color:e[1],bold:"bad"===e[1],children:e[2]})}))}):(0,r.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,r.createComponentVNode)(2,a.Section,{title:"Damage",children:(0,r.createComponentVNode)(2,a.Table,{children:f(s,(function(e,n,o){return(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Table.Row,{color:"label",children:[(0,r.createComponentVNode)(2,a.Table.Cell,{children:[e[0],":"]}),(0,r.createComponentVNode)(2,a.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,r.createComponentVNode)(2,a.Table.Row,{children:[(0,r.createComponentVNode)(2,a.Table.Cell,{children:(0,r.createComponentVNode)(2,y,{value:t[e[1]],marginBottom:o0&&"0.5rem",value:e.totalLoss/100,ranges:d,children:[(0,r.createComponentVNode)(2,a.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,r.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"bone"}),(0,o.round)(e.bruteLoss,0),"\xa0",(0,r.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,r.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"fire"}),(0,o.round)(e.fireLoss,0),(0,r.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,r.createComponentVNode)(2,a.Box,{display:"inline",children:(0,o.round)(e.totalLoss,0)})]})}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:"33%",children:[(0,r.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:p([e.internalBleeding&&"Internal bleeding",e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,m(e.germ_level),!!e.open&&"Open incision"])}),(0,r.createComponentVNode)(2,a.Box,{display:"inline",children:[p([!!e.status.splinted&&"Splinted",!!e.status.robotic&&"Robotic",!!e.status.dead&&(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},N=function(e){return 0===e.organs.length?(0,r.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"N/A"})}):(0,r.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,r.createComponentVNode)(2,a.Table,{children:[(0,r.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Damage"}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,r.createComponentVNode)(2,a.Table.Row,{textTransform:"capitalize",children:[(0,r.createComponentVNode)(2,a.Table.Cell,{width:"33%",children:e.name}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/100,mt:t>0&&"0.5rem",ranges:d,children:(0,o.round)(e.damage,0)})}),(0,r.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:"33%",children:[(0,r.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:p([m(e.germ_level)])}),(0,r.createComponentVNode)(2,a.Box,{display:"inline",children:p([1===e.robotic&&"Robotic",2===e.robotic&&"Assisted",!!e.dead&&(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"DEAD"})])})]})]},t)}))]})})},x=function(){return(0,r.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,r.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var r=n(2),o=n(14),i=n(16),a=n(122),c=n(23),u=[1,5,10,20,30,50],l=[1,5,10];t.ChemDispenser=function(e,t){return(0,r.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,s),(0,r.createComponentVNode)(2,d),(0,r.createComponentVNode)(2,f)]})})};var s=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,l=c.amount,s=c.energy,d=c.maxEnergy;return(0,r.createComponentVNode)(2,i.Section,{title:"Settings",flex:"content",children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Energy",children:(0,r.createComponentVNode)(2,i.ProgressBar,{value:s,minValue:0,maxValue:d,ranges:{good:[.5*d,Infinity],average:[.25*d,.5*d],bad:[-Infinity,.25*d]},children:[s," / ",d," Units"]})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,r.createComponentVNode)(2,i.Flex,{direction:"row",spacing:"1",children:u.map((function(e,t){return(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:(0,r.createComponentVNode)(2,i.Button,{icon:"cog",selected:l===e,content:e,m:"0",width:"100%",onClick:function(){return a("amount",{amount:e})}})},t)}))})})]})})},d=function(e,t){for(var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.chemicals,l=void 0===u?[]:u,s=[],d=0;d<(l.length+1)%3;d++)s.push(!0);return(0,r.createComponentVNode)(2,i.Section,{title:c.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,r.createComponentVNode)(2,i.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[l.map((function(e,t){return(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px",children:(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return a("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},f=function(e,t){var n=(0,o.useBackend)(t),c=n.act,u=n.data,s=u.isBeakerLoaded,d=u.beakerCurrentVolume,f=u.beakerMaxVolume,p=u.beakerContents,m=void 0===p?[]:p;return(0,r.createComponentVNode)(2,i.Section,{title:"Beaker",flex:"content",minHeight:"25%",buttons:(0,r.createComponentVNode)(2,i.Box,{children:[!!s&&(0,r.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:2,children:[d," / ",f," units"]}),(0,r.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",disabled:!s,onClick:function(){return c("ejectBeaker")}})]}),children:(0,r.createComponentVNode)(2,a.BeakerContents,{beakerLoaded:s,beakerContents:m,buttons:function(e){return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return c("remove",{reagent:e.id,amount:-1})}}),l.map((function(t,n){return(0,r.createComponentVNode)(2,i.Button,{content:t,onClick:function(){return c("remove",{reagent:e.id,amount:t})}},n)})),(0,r.createComponentVNode)(2,i.Button,{content:"ALL",onClick:function(){return c("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";e.exports=n(429)()},function(e,t,n){"use strict";var r=n(430);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(122),u=n(23);t.ChemHeater=function(e,t){return(0,r.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,u.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,l),(0,r.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data,l=u.targetTemp,s=u.isActive,d=u.currentTemp,f=u.isBeakerLoaded;return(0,r.createComponentVNode)(2,a.Section,{title:"Settings",flexBasis:"content",buttons:(0,r.createComponentVNode)(2,a.Button,{content:s?"On":"Off",icon:"power-off",selected:s,disabled:!f,onClick:function(){return c("toggle_on")}}),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,r.createComponentVNode)(2,a.Knob,{minValue:"0",maxValue:"1000",value:(0,o.round)(l,0),step:"5",unit:"K",m:"0",onChange:function(e,t){return c("adjust_temperature",{target:t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Reading",children:f&&(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return(0,o.toFixed)(e)+" K"}})||"\u2014"})]})})},s=function(e,t){var n=(0,i.useBackend)(t),o=n.act,u=n.data,l=u.isBeakerLoaded,s=u.beakerCurrentVolume,d=u.beakerMaxVolume,f=u.beakerContents;return(0,r.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"1",buttons:!!l&&(0,r.createComponentVNode)(2,a.Box,{children:[(0,r.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",d," units"]}),(0,r.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return o("eject_beaker")}})]}),children:(0,r.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:l,beakerContents:f})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var r=n(2),o=n(14),i=n(16),a=n(23),c=n(122),u=n(85),l=[1,5,10],s=["bottle.png","small_bottle.png","wide_bottle.png","round_bottle.png","reagent_bottle.png"];t.ChemMaster=function(e,t){var n=(0,o.useBackend)(t).data,i=n.condi,c=n.beaker,l=n.beaker_reagents,s=void 0===l?[]:l,m=n.buffer_reagents,h=void 0===m?[]:m,g=n.mode;return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,r.createComponentVNode)(2,u.ComplexModal),(0,r.createComponentVNode)(2,a.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,d,{beaker:c,beakerReagents:s,bufferNonEmpty:h.length>0}),(0,r.createComponentVNode)(2,f,{mode:g,bufferReagents:h}),(0,r.createComponentVNode)(2,p,{isCondiment:i,bufferNonEmpty:h.length>0}),(0,r.createComponentVNode)(2,v)]})]})};var d=function(e,t){var n=(0,o.useBackend)(t).act,a=e.beaker,s=e.beakerReagents,d=e.bufferNonEmpty;return(0,r.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:d?(0,r.createComponentVNode)(2,i.Button.Confirm,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,r.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:a?(0,r.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,o){return(0,r.createComponentVNode)(2,i.Box,{mb:o0?(0,r.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:d,buttons:function(e,o){return(0,r.createComponentVNode)(2,i.Box,{mb:o0?u.desc:"N/A"}),u.blood_type&&(0,r.createFragment)([(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood type",children:u.blood_type}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:u.blood_dna})],4),!c.condi&&(0,r.createComponentVNode)(2,i.Button,{icon:c.printing?"spinner":"print",disabled:c.printing,iconSpin:!!c.printing,ml:"0.5rem",content:"Print",onClick:function(){return a("print",{idx:u.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(84),u=n(85),l=n(23),s=function(e,t){var n=(0,i.useBackend)(t),o=n.act,u=n.data,l=e.args,s=l.activerecord,d=l.realname,f=l.health,p=l.unidentity,m=l.strucenzymes,h=f.split(" - ");return(0,r.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+d,children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Damage",children:h.length>1?(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.oxy,display:"inline",children:h[0]}),(0,r.createTextVNode)("\xa0|\xa0"),(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.toxin,display:"inline",children:h[2]}),(0,r.createTextVNode)("\xa0|\xa0"),(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.brute,display:"inline",children:h[3]}),(0,r.createTextVNode)("\xa0|\xa0"),(0,r.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.burn,display:"inline",children:h[1]})],4):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"Unknown"})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:m}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk",children:[(0,r.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){return o("disk",{option:"load"})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){return o("disk",{option:"save",savetype:"ui"})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){return o("disk",{option:"save",savetype:"ue"})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){return o("disk",{option:"save",savetype:"se"})}})]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,r.createComponentVNode)(2,a.Button,{disabled:!u.podready,icon:"user-plus",content:"Clone",onClick:function(){return o("clone",{ref:s})}}),(0,r.createComponentVNode)(2,a.Button,{icon:"trash",content:"Delete",onClick:function(){return o("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.menu;return(0,u.modalRegisterBodyOverride)("view_rec",s),(0,r.createComponentVNode)(2,l.Window,{resizable:!0,children:[(0,r.createComponentVNode)(2,u.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,r.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,h),(0,r.createComponentVNode)(2,v),(0,r.createComponentVNode)(2,d),(0,r.createComponentVNode)(2,a.Section,{noTopPadding:!0,flexGrow:"1",children:(0,r.createComponentVNode)(2,f)})]})]})};var d=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data.menu;return(0,r.createComponentVNode)(2,a.Tabs,{children:[(0,r.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return o("menu",{num:1})},children:"Main"}),(0,r.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return o("menu",{num:2})},children:"Records"})]})},f=function(e,t){var n,o=(0,i.useBackend)(t).data.menu;return 1===o?n=(0,r.createComponentVNode)(2,p):2===o&&(n=(0,r.createComponentVNode)(2,m)),n},p=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data,l=u.loading,s=u.scantemp,d=u.occupant,f=u.locked,p=u.can_brainscan,m=u.scan_mode,h=u.numberofpods,v=u.pods,g=u.selected_pod,b=f&&!!d;return(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Section,{title:"Scanner",level:"2",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,r.createComponentVNode)(2,a.Button,{disabled:!d,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return c("lock")}}),(0,r.createComponentVNode)(2,a.Button,{disabled:b||!d,icon:"user-slash",content:"Eject Occupant",onClick:function(){return c("eject")}})],4),children:[(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,r.createComponentVNode)(2,a.Box,{color:"average",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,r.createComponentVNode)(2,a.Box,{color:s.color,children:s.text})}),!!p&&(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Mode",children:(0,r.createComponentVNode)(2,a.Button,{icon:m?"brain":"male",content:m?"Brain":"Body",onClick:function(){return c("toggle_mode")}})})]}),(0,r.createComponentVNode)(2,a.Button,{disabled:!d||l,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return c("scan")}})]}),(0,r.createComponentVNode)(2,a.Section,{title:"Pods",level:"2",children:h?v.map((function(e,t){var n;return n="cloning"===e.status?(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,r.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,o.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,r.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,r.createComponentVNode)(2,a.Button,{selected:g===e.pod,icon:g===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,r.createComponentVNode)(2,a.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,r.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,r.createComponentVNode)(2,a.Box,{color:"label",children:["Pod #",t+1]}),(0,r.createComponentVNode)(2,a.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,r.createComponentVNode)(2,a.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},m=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data.records;return c.length?(0,r.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,r.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return o("view_rec",{ref:e.record})}},t)}))}):(0,r.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No records found."]})})},h=function(e,t){var n,o=(0,i.useBackend)(t),c=o.act,u=o.data.temp;if(u&&u.text&&!(u.text.length<=0)){var l=((n={})[u.style]=!0,n);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.NoticeBox,Object.assign({},l,{children:[(0,r.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:u.text}),(0,r.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,r.createComponentVNode)(2,a.Box,{clear:"both"})]})))}},v=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.scanner,l=c.numberofpods,s=c.autoallowed,d=c.autoprocess,f=c.disk;return(0,r.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,r.createFragment)([!!s&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,r.createComponentVNode)(2,a.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Enabled":"Disabled",onClick:function(){return o("autoprocess",{on:d?0:1})}})],4),(0,r.createComponentVNode)(2,a.Button,{disabled:!f,icon:"eject",content:"Eject Disk",onClick:function(){return o("disk",{option:"eject"})}})],0),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanner",children:u?(0,r.createComponentVNode)(2,a.Box,{color:"good",children:"Connected"}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"Not connected!"})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Pods",children:l?(0,r.createComponentVNode)(2,a.Box,{color:"good",children:[l," connected"]}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var r=n(2),o=n(114),i=n(14),a=n(23),c=n(16),u=n(120);t.CrewMonitor=function(e,t){var n=(0,i.useBackend)(t),l=n.act,s=n.data,d=(0,o.sortBy)((function(e){return e.name}))(s.crewmembers||[]);return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{children:[d.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,r.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)})),(0,r.createComponentVNode)(2,c.NanoMap),(0,r.createComponentVNode)(2,c.Box,{className:"NanoMap__contentOffset",children:(0,r.createComponentVNode)(2,c.Box,{bold:!0,m:2,children:(0,r.createComponentVNode)(2,c.Table,{children:[(0,r.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),d.map((function(e){return(0,r.createComponentVNode)(2,c.Table.Row,{children:[(0,r.createComponentVNode)(2,u.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,r.createComponentVNode)(2,u.TableCell,{children:[(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,r.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,r.createComponentVNode)(2,u.TableCell,{children:3===e.sensor_type?s.isAI?(0,r.createComponentVNode)(2,c.Button,{fluid:!0,content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return l("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var r=n(2),o=n(14),i=n(16),a=n(23),c=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],u=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:(0,r.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,o.useBackend)(t),a=n.act,l=n.data,d=l.isOperating,f=l.hasOccupant,p=l.occupant,m=void 0===p?[]:p,h=l.cellTemperature,v=l.cellTemperatureStatus,g=l.isBeakerLoaded,b=l.auto_eject_healthy,y=l.auto_eject_dead;return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Section,{title:"Occupant",flexGrow:"1",buttons:(0,r.createComponentVNode)(2,i.Button,{icon:"user-slash",onClick:function(){return a("ejectOccupant")},disabled:!f,children:"Eject"}),children:f?(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Occupant",children:m.name||"Unknown"}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,i.ProgressBar,{min:m.health,max:m.maxHealth,value:m.health/m.maxHealth,color:m.health>0?"good":"average",children:(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:Math.round(m.health)})})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:u[m.stat][0],children:u[m.stat][1]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:Math.round(m.bodyTemperature)})," K"]}),(0,r.createComponentVNode)(2,i.LabeledList.Divider),c.map((function(e){return(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:e.label,children:(0,r.createComponentVNode)(2,i.ProgressBar,{value:m[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:Math.round(m[e.type])})})},e.id)}))]}):(0,r.createComponentVNode)(2,i.Flex,{height:"100%",textAlign:"center",children:(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant detected."]})})}),(0,r.createComponentVNode)(2,i.Section,{title:"Cell",buttons:(0,r.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return a("ejectBeaker")},disabled:!g,children:"Eject Beaker"}),children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,r.createComponentVNode)(2,i.Button,{icon:"power-off",onClick:function(){return a(d?"switchOff":"switchOn")},selected:d,children:d?"On":"Off"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",color:v,children:[(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:h})," K"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",children:(0,r.createComponentVNode)(2,s)}),(0,r.createComponentVNode)(2,i.LabeledList.Divider),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,r.createComponentVNode)(2,i.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return a(b?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:b?"On":"Off"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,r.createComponentVNode)(2,i.Button,{icon:y?"toggle-on":"toggle-off",selected:y,onClick:function(){return a(y?"auto_eject_dead_off":"auto_eject_dead_on")},children:y?"On":"Off"})})]})})],4)},s=function(e,t){var n=(0,o.useBackend)(t),a=(n.act,n.data),c=a.isBeakerLoaded,u=a.beakerLabel,l=a.beakerVolume;return c?(0,r.createFragment)([u||(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"No label"}),(0,r.createComponentVNode)(2,i.Box,{color:!l&&"bad",children:l?(0,r.createComponentVNode)(2,i.AnimatedNumber,{value:l,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],0):(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var r=n(2),o=n(14),i=n(16),a=n(23),c=n(85),u=[["good","Alive"],["average","Critical"],["bad","DEAD"]],l=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],s=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,i=(0,o.useBackend)(t),u=(i.act,i.data),l=u.irradiating,s=u.dnaBlockSize,p=u.occupant;return t.dnaBlockSize=s,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,l&&(n=(0,r.createComponentVNode)(2,C,{duration:l})),(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,r.createComponentVNode)(2,c.ComplexModal),n,(0,r.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,d),(0,r.createComponentVNode)(2,f)]})]})};var d=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,l=c.locked,s=c.hasOccupant,d=c.occupant;return(0,r.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s,selected:l,icon:l?"toggle-on":"toggle-off",content:l?"Engaged":"Disengaged",onClick:function(){return a("toggleLock")}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s||l,icon:"user-slash",content:"Eject",onClick:function(){return a("ejectOccupant")}})],4),children:s?(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Box,{children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d.name}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,i.ProgressBar,{min:d.minHealth,max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:u[d.stat][0],children:u[d.stat][1]}),(0,r.createComponentVNode)(2,i.LabeledList.Divider)]})}),t.isDNAInvalid?(0,r.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Radiation",children:(0,r.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:d.radiationLevel/100,color:"average"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Unique Enzymes",children:c.occupant.uniqueEnzymes?c.occupant.uniqueEnzymes:(0,r.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,r.createComponentVNode)(2,i.Box,{color:"label",children:"Cell unoccupied."})})},f=function(e,t){var n,a=(0,o.useBackend)(t),c=a.act,u=a.data,s=u.selectedMenuKey,d=u.hasOccupant;u.occupant;return d?t.isDNAInvalid?(0,r.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,r.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===s?n=(0,r.createFragment)([(0,r.createComponentVNode)(2,p),(0,r.createComponentVNode)(2,h)],4):"se"===s?n=(0,r.createFragment)([(0,r.createComponentVNode)(2,m),(0,r.createComponentVNode)(2,h)],4):"buffer"===s?n=(0,r.createComponentVNode)(2,v):"rejuvenators"===s&&(n=(0,r.createComponentVNode)(2,y)),(0,r.createComponentVNode)(2,i.Section,{flexGrow:"1",children:[(0,r.createComponentVNode)(2,i.Tabs,{children:l.map((function(e,t){return(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:s===e[0],onClick:function(){return c("selectMenuKey",{key:e[0]})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,r.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,r.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.selectedUIBlock,l=c.selectedUISubBlock,s=c.selectedUITarget,d=c.occupant;return(0,r.createComponentVNode)(2,i.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,r.createComponentVNode)(2,N,{dnaString:d.uniqueIdentity,selectedBlock:u,selectedSubblock:l,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Target",children:(0,r.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:s,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return a("changeUITarget",{value:t})}})})}),(0,r.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return a("pulseUIRadiation")}})]})},m=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.selectedSEBlock,l=c.selectedSESubBlock,s=c.occupant;return(0,r.createComponentVNode)(2,i.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,r.createComponentVNode)(2,N,{dnaString:s.structuralEnzymes,selectedBlock:u,selectedSubblock:l,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,r.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return a("pulseSERadiation")}})]})},h=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.radiationIntensity,l=c.radiationDuration;return(0,r.createComponentVNode)(2,i.Section,{title:"Radiation Emitter",level:"2",children:[(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Intensity",children:(0,r.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:u,ml:"0",onChange:function(e,t){return a("radiationIntensity",{value:t})}})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Duration",children:(0,r.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:l,ml:"0",onChange:function(e,t){return a("radiationDuration",{value:t})}})})]}),(0,r.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return a("pulseRadiation")}})]})},v=function(e,t){var n=(0,o.useBackend)(t),a=(n.act,n.data.buffers.map((function(e,t){return(0,r.createComponentVNode)(2,g,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Section,{title:"Buffers",level:"2",children:a}),(0,r.createComponentVNode)(2,b)],4)},g=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=e.id,l=e.name,s=e.buffer,d=c.isInjectorReady,f=l+(s.data?" - "+s.label:"");return(0,r.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.createComponentVNode)(2,i.Section,{title:f,level:"3",mx:"0",lineHeight:"18px",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button.Confirm,{disabled:!s.data,icon:"trash",content:"Clear",onClick:function(){return a("bufferOption",{option:"clear",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s.data,icon:"pen",content:"Rename",onClick:function(){return a("bufferOption",{option:"changeLabel",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!s.data||!c.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return a("bufferOption",{option:"saveDisk",id:u})}})],4),children:[(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Write",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUI",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUIAndUE",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveSE",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!c.hasDisk||!c.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return a("bufferOption",{option:"loadDisk",id:u})}})]}),!!s.data&&(0,r.createFragment)([(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:s.owner||(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer to",children:[(0,r.createComponentVNode)(2,i.Button,{disabled:!d,icon:d?"syringe":"spinner",iconSpin:!d,content:"Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:u})}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!d,icon:d?"syringe":"spinner",iconSpin:!d,content:"Block Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:u,block:1})}}),(0,r.createComponentVNode)(2,i.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return a("bufferOption",{option:"transfer",id:u})}})]})],4)]}),!s.data&&(0,r.createComponentVNode)(2,i.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.hasDisk,l=c.disk;return(0,r.createComponentVNode)(2,i.Section,{title:"Data Disk",level:"2",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button.Confirm,{disabled:!u||!l.data,icon:"trash",content:"Wipe",onClick:function(){return a("wipeDisk")}}),(0,r.createComponentVNode)(2,i.Button,{disabled:!u,icon:"eject",content:"Eject",onClick:function(){return a("ejectDisk")}})],4),children:u?l.data?(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:l.label?l.label:"No label"}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:l.owner?l.owner:(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===l.type?"Unique Identifiers":"Structural Enzymes",!!l.ue&&" and Unique Enzymes"]})]}):(0,r.createComponentVNode)(2,i.Box,{color:"label",children:"Disk is blank."}):(0,r.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"save-o",size:"4"}),(0,r.createVNode)(1,"br"),"No disk inserted."]})})},y=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.isBeakerLoaded,l=c.beakerVolume,d=c.beakerLabel;return(0,r.createComponentVNode)(2,i.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,r.createComponentVNode)(2,i.Button,{disabled:!u,icon:"eject",content:"Eject",onClick:function(){return a("ejectBeaker")}}),children:u?(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Inject",children:[s.map((function(e,t){return(0,r.createComponentVNode)(2,i.Button,{disabled:e>l,icon:"syringe",content:e,onClick:function(){return a("injectRejuvenators",{amount:e})}},t)})),(0,r.createComponentVNode)(2,i.Button,{disabled:l<=0,icon:"syringe",content:"All",onClick:function(){return a("injectRejuvenators",{amount:l})}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",children:[(0,r.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:d||"No label"}),l?(0,r.createComponentVNode)(2,i.Box,{color:"good",children:[l," unit",1===l?"":"s"," remaining"]}):(0,r.createComponentVNode)(2,i.Box,{color:"bad",children:"Empty"})]})]}):(0,r.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",size:"4"}),(0,r.createVNode)(1,"br"),"No beaker loaded."]})})},C=function(e,t){return(0,r.createComponentVNode)(2,i.Dimmer,{textAlign:"center",children:[(0,r.createComponentVNode)(2,i.Icon,{name:"spinner",size:"5",spin:!0}),(0,r.createVNode)(1,"br"),(0,r.createComponentVNode)(2,i.Box,{color:"average",children:(0,r.createVNode)(1,"h1",null,[(0,r.createComponentVNode)(2,i.Icon,{name:"radiation"}),(0,r.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,r.createComponentVNode)(2,i.Icon,{name:"radiation"})],4)}),(0,r.createComponentVNode)(2,i.Box,{color:"label",children:(0,r.createVNode)(1,"h3",null,[(0,r.createTextVNode)("For "),e.duration,(0,r.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},N=function(e,t){for(var n=(0,o.useBackend)(t),a=n.act,c=(n.data,e.dnaString),u=e.selectedBlock,l=e.selectedSubblock,s=e.blockSize,d=e.action,f=c.split(""),p=[],m=function(e){for(var t=e/s+1,n=[],o=function(o){var c=o+1;n.push((0,r.createComponentVNode)(2,i.Button,{selected:u===t&&l===c,content:f[e+o],mb:"0",onClick:function(){return a(d,{block:t,subblock:c})}}))},c=0;ct.name?1:-1})),c.map((function(e,t){return(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button,{icon:"flask",content:e.name,mb:"0.5rem",onClick:function(){return a("vir",{vir:e.D})}}),(0,r.createVNode)(1,"br")],4,t)}))},y=function(e,t){var n=(0,o.useBackend)(t).data.medbots;return 0===n.length?(0,r.createComponentVNode)(2,i.Box,{color:"label",children:"There are no Medbots."}):n.map((function(e,t){return(0,r.createComponentVNode)(2,i.Collapsible,{open:!0,title:e.name,children:(0,r.createComponentVNode)(2,i.Box,{px:"0.5rem",children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:e.on?(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Box,{color:"good",children:"Online"}),(0,r.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer."})],4):(0,r.createComponentVNode)(2,i.Box,{color:"average",children:"Offline"})})]})})},t)}))},C=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data.screen;return(0,r.createComponentVNode)(2,i.Tabs,{children:[(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,onClick:function(){return a("screen",{screen:2})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"list"}),"List Records"]}),(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:5===c,onClick:function(){return a("screen",{screen:5})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"database"}),"Virus Database"]}),(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:6===c,onClick:function(){return a("screen",{screen:6})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"plus-square"}),"Medbot Tracking"]}),(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:3===c,onClick:function(){return a("screen",{screen:3})},children:[(0,r.createComponentVNode)(2,i.Icon,{name:"wrench"}),"Record Maintenance"]})]})};(0,a.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,r.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,r.createComponentVNode)(2,i.Box,{mx:"0.5rem",children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Notes",children:n.desc}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Severity",color:d[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LoginInfo=void 0;var r=n(2),o=n(14),i=n(16);t.LoginInfo=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.authenticated,l=c.rank;if(c)return(0,r.createComponentVNode)(2,i.NoticeBox,{info:!0,children:[(0,r.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:["Logged in as: ",u," (",l,")"]}),(0,r.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"Logout and Eject ID",color:"good",float:"right",onClick:function(){return a("logout")}}),(0,r.createComponentVNode)(2,i.Box,{clear:"both"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginScreen=void 0;var r=n(2),o=n(14),i=n(16);t.LoginScreen=function(e,t){var n=(0,o.useBackend)(t),a=n.act,c=n.data,u=c.scan,l=c.isAI,s=c.isRobot;return(0,r.createComponentVNode)(2,i.Section,{title:"Welcome",height:"100%",stretchContents:!0,children:(0,r.createComponentVNode)(2,i.Flex,{height:"100%",align:"center",justify:"center",children:(0,r.createComponentVNode)(2,i.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,r.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:[(0,r.createComponentVNode)(2,i.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,r.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:["ID:",(0,r.createComponentVNode)(2,i.Button,{icon:"id-card",content:u||"----------",ml:"0.5rem",onClick:function(){return a("scan")}})]}),(0,r.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",disabled:!u,content:"Login",onClick:function(){return a("login",{login_type:1})}}),!!l&&(0,r.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return a("login",{login_type:2})}}),!!s&&(0,r.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return a("login",{login_type:3})}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var r=n(2),o=n(14),i=n(16);t.TemporaryNotice=function(e,t){var n,a=(0,o.useBackend)(t),c=a.act,u=a.data.temp;if(u){var l=((n={})[u.style]=!0,n);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.NoticeBox,Object.assign({},l,{children:[(0,r.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:u.text}),(0,r.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,r.createComponentVNode)(2,i.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var r=n(2),o=n(35),i=n(14),a=n(23),c=n(16),u=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],l=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,Infinity]},d=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,o=(0,i.useBackend)(t),u=o.act,l=o.data,s=l.hasOccupant,d=l.choice;return n=d?(0,r.createComponentVNode)(2,m):s?(0,r.createComponentVNode)(2,f):(0,r.createComponentVNode)(2,p),(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,r.createComponentVNode)(2,c.Tabs,{children:[(0,r.createComponentVNode)(2,c.Tabs.Tab,{selected:!d,icon:"user",onClick:function(){return u("choiceOff")},children:"Patient"}),(0,r.createComponentVNode)(2,c.Tabs.Tab,{selected:!!d,icon:"cog",onClick:function(){return u("choiceOn")},children:"Options"})]}),(0,r.createComponentVNode)(2,c.Section,{flexGrow:"1",children:n})]})})};var f=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,r.createFragment)([(0,r.createComponentVNode)(2,c.Section,{title:"Patient",level:"2",children:(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:n.name}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:u[n.stat][0],children:u[n.stat][1]}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),l.map((function(e,t){return(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:e[0]+" Damage",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:(0,o.round)(n[e[1]])},t)},t)})),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:d[n.temperatureSuitability+3],children:[(0,o.round)(n.btCelsius),"\xb0C, ",(0,o.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,r.createFragment)([(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,r.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,r.createComponentVNode)(2,c.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,r.createComponentVNode)(2,c.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,r.createComponentVNode)(2,c.Flex,{textAlign:"center",height:"100%",children:(0,r.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No patient detected."]})})},m=function(e,t){var n=(0,i.useBackend)(t),o=n.act,a=n.data,u=a.verbose,l=a.health,s=a.healthAlarm,d=a.oxy,f=a.oxyAlarm,p=a.crit;return(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Loudspeaker",children:(0,r.createComponentVNode)(2,c.Button,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return o(u?"verboseOff":"verboseOn")}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer",children:(0,r.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return o(l?"healthOff":"healthOn")}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,r.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:s,stepPixelSize:"5",ml:"0",onChange:function(e,t){return o("health_adj",{"new":t})}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm",children:(0,r.createComponentVNode)(2,c.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return o(d?"oxyOff":"oxyOn")}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,r.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:f,stepPixelSize:"5",ml:"0",onChange:function(e,t){return o("oxy_adj",{"new":t})}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Critical Alert",children:(0,r.createComponentVNode)(2,c.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return o(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var r=n(2),o=n(35),i=n(14),a=n(16),c=n(23),u=[["good","Alive"],["average","Critical"],["bad","DEAD"]],l=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,Infinity]},d=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,i.useBackend)(t),o=(n.act,n.data.hasOccupant?(0,r.createComponentVNode)(2,f):(0,r.createComponentVNode)(2,g));return(0,r.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:o})})};var f=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.occupant;return(0,r.createFragment)([(0,r.createComponentVNode)(2,p),(0,r.createComponentVNode)(2,m),(0,r.createComponentVNode)(2,v),(0,r.createComponentVNode)(2,h)],4)},p=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.occupant,f=l.auto_eject_dead;return(0,r.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,r.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,content:f?"On":"Off",onClick:function(){return c("auto_eject_dead_"+(f?"off":"on"))}}),(0,r.createComponentVNode)(2,a.Button,{icon:"user-slash",content:"Eject",onClick:function(){return c("ejectify")}})],4),children:(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,o.round)(s.health,0)})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u[s.stat][0],children:u[s.stat][1]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.maxTemp,value:s.bodyTemperature/s.maxTemp,color:d[s.temperatureSuitability+3],children:[(0,o.round)(s.btCelsius,0),"\xb0C,",(0,o.round)(s.btFaren,0),"\xb0F"]})}),!!s.hasBlood&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Level",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.bloodMax,value:s.bloodLevel/s.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[s.bloodPercent,"%, ",s.bloodLevel,"cl"]})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[s.pulse," BPM"]})],4)]})})},m=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,r.createComponentVNode)(2,a.Section,{title:"Damage",children:(0,r.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e,t){return(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:e[0],children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:(0,o.round)(n[e[1]],0)},t)},t)}))})})},h=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.isBeakerLoaded,l=c.beakerMaxSpace,s=c.beakerFreeSpace,d=c.dialysis&&s>0;return(0,r.createComponentVNode)(2,a.Section,{title:"Dialysis",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{disabled:!u||s<=0,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Active":"Inactive",onClick:function(){return o("togglefilter")}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!u,icon:"eject",content:"Eject",onClick:function(){return o("removebeaker")}})],4),children:u?(0,r.createComponentVNode)(2,a.LabeledList,{children:(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Remaining Space",children:(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:l,value:s/l,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"No beaker loaded."})})},v=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.occupant,l=c.chemicals,s=c.maxchem,d=c.amounts;return(0,r.createComponentVNode)(2,a.Section,{title:"Chemicals",flexGrow:"1",children:l.map((function(e,t){var n,i="";return e.overdosing?(i="bad",n=(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(i="average",n=(0,r.createComponentVNode)(2,a.Box,{color:"average",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,r.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.createComponentVNode)(2,a.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,r.createComponentVNode)(2,a.Flex,{align:"flex-start",children:[(0,r.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s,value:e.occ_amount/s,color:i,mr:"0.5rem",children:[e.pretty_amount,"/",s,"u"]}),d.map((function(t,n){return(0,r.createComponentVNode)(2,a.Button,{disabled:!e.injectable||e.occ_amount+t>s||2===u.stat,icon:"syringe",content:t,mb:"0",height:"19px",onClick:function(){return o("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},g=function(e,t){return(0,r.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,r.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,r.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,r.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.createVNode)(1,"br"),"No occupant detected."]})})})}}]); \ No newline at end of file