diff --git a/tgui/packages/tgui/components/NanoMap.js b/tgui/packages/tgui/components/NanoMap.js index b1c5440a7fc6..6b97353fdaab 100644 --- a/tgui/packages/tgui/components/NanoMap.js +++ b/tgui/packages/tgui/components/NanoMap.js @@ -22,7 +22,7 @@ export class NanoMap extends Component { super(props); // Auto center based on window size - const Xcenter = window.innerWidth / 2 - 256; + const Xcenter = 0; const Ycenter = window.innerHeight / 2 - 256; this.state = { diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index 44e89f3e08e0..eb3b95eab30e 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -2,4 +2,4 @@ /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var a,c=n.document,i=c.createElement("link");if(t)a=t;else{var l=(c.body||c.getElementsByTagName("head")[0]).childNodes;a=l[l.length-1]}var d=c.styleSheets;if(r)for(var u in r)r.hasOwnProperty(u)&&i.setAttribute(u,r[u]);i.rel="stylesheet",i.href=e,i.media="only x",function p(e){if(c.body)return e();setTimeout((function(){p(e)}))}((function(){a.parentNode.insertBefore(i,t?a:a.nextSibling)}));var s=function h(e){for(var t=i.href,n=d.length;n--;)if(d[n].href===t)return e();setTimeout((function(){h(e)}))};function m(){i.addEventListener&&i.removeEventListener("load",m),i.media=o||"all"}return i.addEventListener&&i.addEventListener("load",m),i.onloadcssdefined=s,s(m),i}}).call(this,n(171))},function(e,t,n){"use strict";var o=function(e){var t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(L){i=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var r=t&&t.prototype instanceof s?t:s,a=Object.create(r.prototype),c=new x(o||[]);return a._invoke=function(e,t,n){var o="suspendedStart";return function(r,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw a;return k()}for(n.method=r,n.arg=a;;){var c=n.delegate;if(c){var i=g(c,n);if(i){if(i===u)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=d(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,c),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=l;var u={};function s(){}function m(){}function p(){}var h={};i(h,r,(function(){return this}));var f=Object.getPrototypeOf,C=f&&f(f(_([])));C&&C!==t&&n.call(C,r)&&(h=C);var N=p.prototype=s.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function V(e,t){var o;this._invoke=function(r,a){function c(){return new t((function(o,c){!function i(o,r,a,c){var l=d(e[o],e,r);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){i("next",e,a,c)}),(function(e){i("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,c)}))}c(l.arg)}(r,a,o,c)}))}return o=o?o.then(c,c):c()}}function g(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function _(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),y(n),u}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;y(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";t.__esModule=!0,t.vecSubtract=t.vecScale=t.vecNormalize=t.vecMultiply=t.vecLength=t.vecInverse=t.vecDivide=t.vecCreate=t.vecAdd=void 0;var o=n(26);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n3?i(c):null,V=String(c.key),g=String(c.char),v=c.location,y=c.keyCode||(c.keyCode=V)&&V.charCodeAt(0)||0,x=c.charCode||(c.charCode=g)&&g.charCodeAt(0)||0,_=c.bubbles,k=c.cancelable,L=c.repeat,B=c.locale,w=c.view||e;if(c.which||(c.which=c.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,_,k,w,p,f,h,C,y,x);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,a){o=a,n=!1,e=undefined,t.dispatchEvent(r)}function a(e){this.value=e}function i(){t++,this.__ce__=new c("@DOMMap:"+t+Math.random())}return a.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},i.prototype={constructor:i,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new a(t),!1),this}},i}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,a,c=e.CustomEvent,i=e.dispatchEvent,l=e.addEventListener,d=e.removeEventListener,u=0,s=function(){u++},m=[].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{l("_",s,{once:!0}),i(new c("_")),i(new c("_")),d("_",s,{once:!0})}catch(h){}1!==u&&(a=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,c){if(c&&"boolean"!=typeof c){var i,l,d,u=a.get(this),s=p(c);u||a.set(this,u=new n),t in u||(u[t]={handler:[],wrap:[]}),l=u[t],(i=m.call(l.handler,r))<0?(i=l.handler.push(r)-1,l.wrap[i]=d=new n):d=l.wrap[i],s in d||(d[s]=o(t,r,c),e.call(this,t,d[s],d[s].capture))}else e.call(this,t,r,c)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,c,i,l,d=a.get(this);if(d&&t in d&&(i=d[t],-1<(c=m.call(i.handler,n))&&(r=p(o))in(l=i.wrap[c]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;i.handler.splice(c,1),i.wrap.splice(c,1),0===i.handler.length&&delete d[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(t,n){var o,r,a=t.html5||{},c=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,i=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,l=0,d={};function u(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function s(e){var t=d[e._html5shiv];return t||(t={},l++,e._html5shiv=l,d[l]=t),t}function m(e,t,o){return t||(t=n),r?t.createElement(e):(o||(o=s(t)),!(a=o.cache[e]?o.cache[e].cloneNode():i.test(e)?(o.cache[e]=o.createElem(e)).cloneNode():o.createElem(e)).canHaveChildren||c.test(e)||a.tagUrn?a:o.frag.appendChild(a));var a}function p(e){e||(e=n);var t=s(e);return!h.shivCSS||o||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),o=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",o.insertBefore(n.lastChild,o.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?m(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+u().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",o="hidden"in e,r=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){o=!0,r=!0}}();var h={elements:a.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==a.shivCSS,supportsUnknownElements:r,shivMethods:!1!==a.shivMethods,type:"default",shivDocument:p,createElement:m,createDocumentFragment:function(e,t){if(e||(e=n),r)return e.createDocumentFragment();for(var o=(t=t||s(e)).frag.cloneNode(),a=0,c=u(),i=c.length;a1?r-1:0),c=1;c1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,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"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,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"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.debounce=void 0;t.debounce=function(e,t,n){var o;return void 0===n&&(n=!1),function(){for(var r=arguments.length,a=new Array(r),c=0;c=0||(r[n]=e[n]);return r}(t,l),N=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),c=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],c[0]=n[1]),o!==undefined&&(a[1]=o[0],c[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,c,t)}))(e)}(a,N,c,d);if(b.length>0){var V=b[0],g=b[b.length-1];b.push([N[0]+f,g[1]]),b.push([N[0]+f,-f]),b.push([-f,-f]),b.push([-f,V[1]])}var v=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,c);return(0,o.createVNode)(1,"div","Collapsible",[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:d,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},m,{children:u}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})],0)},l}(o.Component);t.Collapsible=l},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(8),a=n(22),c=["content","children","className","color","backgroundColor"];var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,l=e.backgroundColor,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return d.color=t?null:"transparent",d.backgroundColor=i||l,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(d)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(d))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(8),a=n(22),c=n(165),i=["color","over","noscroll","nochevron","width","onClick","selected","disabled"],l=["className"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).state={open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var m=s.prototype;return m.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},m.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)},m.setSelected=function(e){this.setOpen(!1),this.props.onSelected(e)},m.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},m.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,m=t.noscroll,p=t.nochevron,h=t.width,f=(t.onClick,t.selected),C=t.disabled,N=d(t,i),b=N.className,V=d(N,l),g=s?!this.state.open:this.state.open,v=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([m?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:h}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:h,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,C&&"Button--disabled",b])},V,{onClick:function(){C&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",f,0),!!p||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,c.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),v],0)},s}(o.Component);t.Dropdown=s},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(8),a=n(22),c=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],i=["className","fluid"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return(0,r.isFalsy)(e)?"":e},s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=u(t.props.value),void e.target.blur()):void 0},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var m=s.prototype;return m.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=u(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},m.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=u(r))},m.setEditing=function(e){this.setState({editing:e})},m.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,d=(e.autofocus,e.disabled),u=e.multiline,s=e.cols,m=void 0===s?32:s,p=e.rows,h=void 0===p?4:p,f=l(e,c),C=f.className,N=f.fluid,b=l(f,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",N&&"Input--fluid",d&&"Input--disabled",C])},b,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),u?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:m,rows:h,disabled:d},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:d},null,this.inputRef)]})))},s}(o.Component);t.Input=s},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(16),a=n(8),c=n(33),i=n(22),l=n(225),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];t.Knob=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.style,y=e.fillValue,x=e.color,_=e.ranges,k=void 0===_?{}:_,L=e.size,B=e.bipolar,w=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=(0,r.scale)(null!=y?y:c,m,s),h=(0,r.scale)(c,m,s),f=x||(0,r.keyOfMatchingRange)(null!=y?y:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,B&&"Knob--bipolar",g,(0,i.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",w&&"Knob__popupValue--"+w]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((B?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":L+"rem"},v)},S)),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(34),a=["children"],c=["label","children"];function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.children,n=i(e,a);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=l;l.Item=function(e){var t=e.label,n=e.children,a=i(e,c);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1),c=n(45),i=n(226),l=n(221);function d(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},m=function(e){function t(t){var n;n=e.call(this,t)||this;var o=window.innerWidth/2-256,r=window.innerHeight/2-256;return n.state={offsetX:o,offsetY:r,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),s(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),s(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),s(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=n/e.zoom;if(1!==r){e.zoom=n;var a=document.getElementsByClassName("NanoMap__container");if(a.length){var c=(0,l.getBoundingBox)(a[0]),i=c.size[0]/2-e.offsetX,d=c.size[1]/2-e.offsetY;e.offsetX+=i-i*r,e.offsetY+=d-d*r}return t.onZoom&&t.onZoom(e.zoom),e}}))},n}return d(t,e),t.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.dragging,c=t.offsetX,i=t.offsetY,l=t.zoom,d=void 0===l?1:l,u=this.props.children,s=e.map+"_nanomap_z1.png",m=510*d+"px",p={width:m,height:m,"margin-top":i+"px","margin-left":c+"px",overflow:"hidden",position:"relative","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:p,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"img",null,null,1,{src:s,style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,r.Box,{children:u})]}),(0,o.createComponentVNode)(2,f,{zoom:d,onZoom:this.handleZoom})]})},t}(o.Component);t.NanoMap=m;var p,h=function(e){function t(t){var n;n=e.call(this,t)||this;var o=(0,a.useBackend)(n.props.context).act;return n.state={color:n.props.color},n.handleClick=function(e){p!==undefined&&p.setState({color:"blue"}),o("switch_camera",{name:n.props.name}),p=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),n.setState({color:"green"})},n}return d(t,e),t.prototype.render=function(){var e=2*this.props.x*this.props.zoom-this.props.zoom-3,t=2*this.props.y*this.props.zoom-this.props.zoom-3;return(0,o.createComponentVNode)(2,r.Button,{onClick:this.handleClick,position:"absolute",className:"NanoMap__button",lineHeight:"0",color:this.props.status?this.state.color:"red",bottom:t+"px",left:e+"px",children:(0,o.createComponentVNode)(2,r.Tooltip,{content:this.props.tooltip})},this.props.key)},t}(o.Component);m.NanoButton=h,m.Marker=function(e){var t=e.x,n=e.y,a=e.zoom,c=void 0===a?1:a,i=e.icon,l=e.tooltip,d=e.color,u=e.onClick,s=e.size,m=void 0===s?6:s,p=2*t*c-c-3,h=2*n*c-c-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:h+"px",left:p+"px",onClick:u,children:[(0,o.createComponentVNode)(2,r.Icon,{name:i,color:d,fontSize:m+"px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:l})]}),2)};var f=function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:"1",maxValue:"8",stepPixelSize:"10",format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};m.Zoomer=f},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(8),a=n(22),c=n(222),i=["className","children","onEnter"];t.Modal=function(e){var t,n=e.className,l=e.children,d=e.onEnter,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);return d&&(t=function(e){13===e.keyCode&&d(e)}),(0,o.createComponentVNode)(2,c.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(u)]),l,0,Object.assign({},(0,a.computeBoxProps)(u))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(8),a=n(22),c=["className","color","info","warning","success","danger"];var i=function(e){var t=e.className,n=e.color,i=e.info,l=(e.warning,e.success),d=e.danger,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",l&&"NoticeBox--type--success",d&&"NoticeBox--type--danger",t])},u)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBarCountdown=t.ProgressBar=void 0;var o=n(0),r=n(16),a=n(8),c=n(22),i=["className","value","minValue","maxValue","color","ranges","children","fractionDigits"],l=["start","current","end"];function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=function(e){var t=e.className,n=e.value,l=e.minValue,d=void 0===l?0:l,s=e.maxValue,m=void 0===s?1:s,p=e.color,h=e.ranges,f=void 0===h?{}:h,C=e.children,N=e.fractionDigits,b=void 0===N?0:N,V=u(e,i),g=(0,r.scale)(n,d,m),v=C!==undefined,y=p||(0,r.keyOfMatchingRange)(n,f)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,c.computeBoxClassName)(V)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(g)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",v?C:(0,r.toFixed)(100*g,b)+"%",0)],4,Object.assign({},(0,c.computeBoxProps)(V))))};t.ProgressBar=s,s.defaultHooks=a.pureComponentHooks;var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.current,0)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=Math.max(this.state.value+this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},a.componentWillUnmount=function(){clearInterval(this.timer)},a.render=function(){var e=this.props,t=e.start,n=(e.current,e.end),r=u(e,l),a=(this.state.value/100-t)/(n-t);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s,Object.assign({value:a},r)))},r}(o.Component);t.ProgressBarCountdown=m,m.defaultProps={rate:1e3},s.Countdown=m},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(8),a=n(22),c=["className","title","level","buttons","content","stretchContents","noTopPadding","showBottom","children"];var i=function(e){var t=e.className,n=e.title,i=e.level,l=void 0===i?1:i,d=e.buttons,u=e.content,s=e.stretchContents,m=e.noTopPadding,p=e.showBottom,h=void 0===p||p,f=e.children,C=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c),N=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(d),b=!(0,r.isFalsy)(u)||!(0,r.isFalsy)(f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+l,e.flexGrow&&"Section--flex",t])},C,{children:[N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__title",h&&"Section__title--showBottom"]),[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",d,0)],4),b&&(0,o.createComponentVNode)(2,a.Box,{className:(0,r.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!m&&"Section__content--noTopPadding"]),children:[u,f]})]})))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(8),a=n(22),c=n(164),i=["className","vertical","children"],l=["className","selected","altSelection"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,c=e.children,l=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,i=d(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},i)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":525,"./AIFixer.js":526,"./APC.js":527,"./ATM.js":528,"./AccountsUplinkTerminal.js":529,"./AgentCard.js":530,"./AiAirlock.js":531,"./AirAlarm.js":532,"./AirlockAccessController.js":533,"./AirlockElectronics.js":534,"./AppearanceChanger.js":535,"./AtmosAlertConsole.js":536,"./AtmosControl.js":537,"./AtmosFilter.js":538,"./AtmosMixer.js":539,"./AtmosPump.js":540,"./AtmosTankControl.js":541,"./Autolathe.js":542,"./Biogenerator.js":543,"./BlueSpaceArtilleryControl.js":546,"./BluespaceTap.js":547,"./BodyScanner.js":548,"./BookBinder.js":549,"./BotClean.js":550,"./BotFloor.js":551,"./BotHonk.js":552,"./BotMed.js":553,"./BotSecurity.js":554,"./BrigCells.js":555,"./BrigTimer.js":556,"./CameraConsole.js":557,"./CameraConsole220.js":558,"./Canister.js":559,"./CardComputer.js":560,"./CargoConsole.js":561,"./ChangelogView.js":562,"./ChemDispenser.js":563,"./ChemHeater.js":564,"./ChemMaster.js":565,"./CloningConsole.js":566,"./ColourMatrixTester.js":567,"./CommunicationsComputer.js":568,"./CompostBin.js":569,"./Contractor.js":570,"./ConveyorSwitch.js":571,"./CrewMonitor.js":572,"./Cryo.js":573,"./CryopodConsole.js":574,"./DNAModifier.js":575,"./DestinationTagger.js":576,"./DisposalBin.js":577,"./DnaVault.js":578,"./DroneConsole.js":579,"./EFTPOS.js":580,"./ERTManager.js":581,"./EconomyManager.js":582,"./Electropack.js":583,"./EmotePanel.js":584,"./EvolutionMenu.js":585,"./ExosuitFabricator.js":586,"./ExternalAirlockController.js":587,"./FaxMachine.js":588,"./FilingCabinet.js":589,"./FloorPainter.js":590,"./GPS.js":591,"./GeneModder.js":592,"./GenericCrewManifest.js":593,"./GhostHudPanel.js":594,"./GlandDispenser.js":595,"./GravityGen.js":596,"./GuestPass.js":597,"./HandheldChemDispenser.js":598,"./HealthSensor.js":599,"./Holodeck.js":600,"./ImplantPad.js":601,"./Instrument.js":602,"./Jukebox.js":603,"./KeycardAuth.js":604,"./KitchenMachine.js":605,"./LawManager.js":606,"./LibraryComputer.js":607,"./LibraryManager.js":608,"./MODsuit.js":609,"./MechBayConsole.js":610,"./MechaControlConsole.js":611,"./MedicalRecords.js":612,"./MerchVendor.js":613,"./MiningVendor.js":614,"./ModpacksList.js":615,"./NTRecruiter.js":616,"./Newscaster.js":617,"./NuclearBomb.js":618,"./OperatingComputer.js":619,"./Orbit.js":620,"./OreRedemption.js":621,"./PAI.js":622,"./PDA.js":635,"./Pacman.js":652,"./ParticleAccelerator.js":653,"./PdaPainter.js":654,"./PersonalCrafting.js":655,"./Photocopier.js":656,"./Photocopier220.js":657,"./PoolController.js":658,"./PortablePump.js":659,"./PortableScrubber.js":660,"./PortableTurret.js":661,"./PowerMonitor.js":232,"./PrisonerImplantManager.js":662,"./PrisonerShuttleConsole.js":663,"./RCD.js":664,"./RPD.js":665,"./Radio.js":666,"./ReagentGrinder.js":667,"./RemoteSignaler.js":668,"./RequestConsole.js":669,"./RndConsole.js":83,"./RobotSelfDiagnosis.js":684,"./RoboticsControlConsole.js":685,"./Safe.js":686,"./SatelliteControl.js":687,"./SecureStorage.js":688,"./SecurityRecords.js":689,"./SeedExtractor.js":690,"./ShuttleConsole.js":691,"./ShuttleManipulator.js":692,"./Sleeper.js":693,"./SlotMachine.js":694,"./Smartfridge.js":695,"./Smes.js":696,"./SolarControl.js":697,"./SpawnersMenu.js":698,"./SpecMenu.js":699,"./StationAlertConsole.js":700,"./SuitStorage.js":701,"./SupermatterMonitor.js":702,"./SyndicateComputerSimple.js":703,"./TEG.js":704,"./TTSSeedsExplorer.js":705,"./TachyonArray.js":706,"./Tank.js":707,"./TankDispenser.js":708,"./TcommsCore.js":709,"./TcommsRelay.js":710,"./Teleporter.js":711,"./TempGun.js":712,"./ThermoMachine.js":713,"./TransferValve.js":714,"./TurbineComputer.js":715,"./Uplink.js":716,"./Vending.js":717,"./VolumeMixer.js":718,"./VotePanel.js":719,"./Wires.js":720,"./WizardApprenticeContract.js":721};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=524},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var d=null;return d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:d,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return i("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var d=!0;2!==l.stat&&null!==l.stat||(d=!1);var u=null;u=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var s=!0;return l.integrity>=100&&2!==l.stat&&(s=!1),(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:u,value:l.integrity/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:d?"green":"red",children:d?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!s||l.active,content:!s||l.active?"Already Repaired":"Repair",onClick:function(){return i("fix")}})})]}),(0,o.createComponentVNode)(2,a.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(227);t.APC=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=(u.normallyLocked,l[u.externalPower]||l[0]),p=l[u.chargingStatus]||l[0],h=u.powerChannels||[],f=d[u.malfStatus]||d[0],C=u.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[u.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return c(f.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",selected:u.coverLocked,disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",selected:u.nightshiftLights,onClick:function(){return c("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.emergencyLights?"Engaged":"Disengaged",selected:u.emergencyLights,disabled:s,onClick:function(){return c("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ATM=function(e,t){var n,p=(0,r.useBackend)(t),h=(p.act,p.data),f=h.view_screen,C=h.authenticated_account,N=h.ticks_left_locked_down,b=h.linked_db;if(N>0)n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(b)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,d);break;case 3:n=(0,o.createComponentVNode)(2,m);break;default:n=(0,o.createComponentVNode)(2,u)}else n=(0,o.createComponentVNode)(2,s);else n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Section,{children:n})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(i.machine_id,i.held_card_name);return(0,o.createComponentVNode)(2,a.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,a.Box,{children:"For all your monetary needs!"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,a.Button,{content:l,icon:"eject",onClick:function(){return c("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.security_level;return(0,o.createComponentVNode)(2,a.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return c("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return c("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"fundsAmount",0),m=s[0],h=s[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],N=f[1],b=i.money;return(0,o.createComponentVNode)(2,a.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Account Number",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"7 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Funds to Transfer",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,onInput:function(e,t){return N(t)}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return c("transfer",{target_acc_number:d,funds_amount:m,purpose:C})}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),d=l[0],u=l[1],s=i.owner_name,m=i.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Welcome, "+s,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return c("logout")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",m]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return c("withdrawal",{funds_amount:d})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Change account security level",icon:"lock",onClick:function(){return c("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return c("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View transaction log",icon:"list",onClick:function(){return c("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print balance statement",icon:"print",onClick:function(){return c("balance_statement")}})})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"accountID",null),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"accountPin",null),m=s[0],p=s[1];i.machine_id,i.held_card_name;return(0,o.createComponentVNode)(2,a.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return p(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return c("attempt_auth",{account_num:d,account_pin:m})}})})]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name})]},e)}))]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return c("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(68),d=n(3),u=n(123),s=n(124);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,a.useBackend)(t),c=(r.act,r.data),i=c.loginState,l=c.currentPage;return i.logged_in?(1===l?n=(0,o.createComponentVNode)(2,p):2===l?n=(0,o.createComponentVNode)(2,b):3===l&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m),n]})})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"tabIndex",0),i=r[0],l=r[1];n.login_state;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"User Accounts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Department Accounts"]})]})},p=function(e,t){switch((0,a.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},h=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.accounts,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","owner_name")),m=s[0],p=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),h=p[0];p[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,C,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,C,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,C,{id:"suspended",children:"Account Status"}),(0,o.createComponentVNode)(2,C,{id:"money",children:"Account Balance"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended+"|"+e.money}))).sort((function(e,t){var n=h?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return i("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.department_accounts;return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:"Department Name"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Number"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Status"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Balance"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return r("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wallet"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},C=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=(n.data.is_printing,(0,a.useLocalState)(t,"searchText","")),d=(l[0],l[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}})}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.account_number,d=i.owner_name,u=i.money,s=i.suspended,m=i.transactions,p=i.account_pin,h=i.is_department_account;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"#"+l+" / "+d,mt:1,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Number",children:["#",l]}),!!h&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin Actions",children:(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:Boolean(h),onClick:function(){return r("set_account_pin",{account_number:l})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Status",color:s?"red":"green",children:[s?"Suspended":"Active",(0,o.createComponentVNode)(2,c.Button,{ml:1,content:s?"Unsuspend":"Suspend",icon:s?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.target_name})]},e)}))]})})],4)},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=(n.data,(0,a.useLocalState)(t,"accName","")),l=i[0],d=i[1],u=(0,a.useLocalState)(t,"accDeposit",""),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Name Here",onChange:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"0",onChange:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:s})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCardInfo=t.AgentCardAppearances=t.AgentCard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AgentCard=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"id-card"})," Appearance"]},"Appearance")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);default:return(0,o.createComponentVNode)(2,i)}}(d)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.registered_name,d=i.sex,u=i.age,s=i.assignment,m=i.associated_account_number,p=i.blood_type,h=i.dna_hash,f=i.fingerprint_hash,C=i.photo,N=i.ai_tracking;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Card Info",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"[UNSET]",onClick:function(){return c("change_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sex",children:(0,o.createComponentVNode)(2,a.Button,{iconRight:!1,content:d||"[UNSET]",onClick:function(){return c("change_sex")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Age",children:(0,o.createComponentVNode)(2,a.Button,{content:u||"[UNSET]",onClick:function(){return c("change_age")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,a.Button,{content:s||"[UNSET]",onClick:function(){return c("change_occupation")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"[UNSET]",onClick:function(){return c("change_fingerprints")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"[UNSET]",onClick:function(){return c("change_blood_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"DNA Hash",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"[UNSET]",onClick:function(){return c("change_dna_hash")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Money Account",children:(0,o.createComponentVNode)(2,a.Button,{content:m||"[UNSET]",onClick:function(){return c("change_money_account")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo",children:(0,o.createComponentVNode)(2,a.Button,{content:C?"Update":"[UNSET]",onClick:function(){return c("change_photo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Card Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card Info",children:(0,o.createComponentVNode)(2,a.Button,{content:"Delete Card Info",onClick:function(){return c("delete_info")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:(0,o.createComponentVNode)(2,a.Button,{content:"Reset Access",onClick:function(){return c("clear_access")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"AI Tracking",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Untrackable":"Trackable",onClick:function(){return c("change_ai_tracking")}})})]})})],4)};t.AgentCardInfo=i;var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.appearances;return(0,o.createComponentVNode)(2,a.Section,{title:"Card Appearance",children:i.map((function(e){return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+e.image,style:{"vertical-align":"middle",width:"64px",margin:"0px","margin-left":"0px"},onclick:function(){return c("change_appearance",{new_appearance:e.name})}},e.name)}))})};t.AgentCardAppearances=l},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_power?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_power?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&2!==d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock||0===d.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(227);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),!a&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,d=c.data,u=d.air,s=d.mode,m=d.atmos_alarm,p=d.locked,h=d.alarmActivated,f=d.rcon,C=d.target_temp;return n=0===u.danger.overall?0===m?"Optimal":"Caution: Atmos alert in area":1===u.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,a.Section,{title:"Air Status",children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.pressure),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.pressure})," kPa",!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:3===s?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===s,icon:"exclamation-triangle",onClick:function(){return i("mode",{mode:3===s?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.oxygen/100,fractionDigits:"1",color:l(u.danger.oxygen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.nitrogen/100,fractionDigits:"1",color:l(u.danger.nitrogen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.co2/100,fractionDigits:"1",color:l(u.danger.co2)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.plasma/100,fractionDigits:"1",color:l(u.danger.plasma)})}),u.contents.n2o>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrous Oxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.n2o/100,fractionDigits:"1",color:l(u.danger.n2o)})}),u.contents.other>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.other/100,fractionDigits:"1",color:l(u.danger.other)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.temperature),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature})," K /"," ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return i("temperature")}}),(0,o.createComponentVNode)(2,a.Button,{content:u.thermostat_state?"On":"Off",selected:u.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.overall),children:[n,!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Off",selected:1===f,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Auto",selected:2===f,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,a.Button,{content:"On",selected:3===f,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,a.Box,{children:"Unable to acquire air sample!"})})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),c=n[0],i=n[1];return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===c,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},s=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0];n[1];switch(a){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,p);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return c("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,a.Button,{content:"External",selected:1===e.checks,onClick:function(){return c("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return c("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"cog",onClick:function(){return c("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return c("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return c("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return c("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return c("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return c("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return c("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return c("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return c("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.modes,d=i.presets,u=i.emagged,s=i.mode,m=i.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!u)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===s,onClick:function(){return c("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===m,onClick:function(){return c("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.thresholds;return(0,o.createComponentVNode)(2,a.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return c("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AirlockAccessController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.exterior_status,m=u.interior_status,p=u.processing;return n="open"===s?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:p,onClick:function(){return d("force_ext")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext_door")}}),i="open"===m?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:p,color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int_door")}}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Door Status",children:"closed"===s?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Door Status",children:"closed"===m?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:i})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(99);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,d)]})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,a.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:1})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:2})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:4})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:8})}})})]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.selected_accesses,u=l.one_access,s=l.regions;return(0,o.createComponentVNode)(2,i.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:"One",onClick:function(){return c("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,content:"All",onClick:function(){return c("set_one_access",{access:"all"})}})],4),accesses:s,selectedList:d,accessMod:function(e){return c("set",{access:e})},grantAll:function(){return c("grant_all")},denyAll:function(){return c("clear_all")},grantDep:function(e){return c("grant_region",{region:e})},denyDep:function(e){return c("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.change_race,s=d.species,m=d.specimen,p=d.change_gender,h=d.gender,f=d.has_gender,C=d.change_eye_color,N=d.change_skin_tone,b=d.change_skin_color,V=d.change_head_accessory_color,g=d.change_hair_color,v=d.change_secondary_hair_color,y=d.change_facial_hair_color,x=d.change_secondary_facial_hair_color,_=d.change_head_marking_color,k=d.change_body_marking_color,L=d.change_tail_marking_color,B=d.change_head_accessory,w=d.head_accessory_styles,S=d.head_accessory_style,I=d.change_hair,T=d.hair_styles,A=d.hair_style,E=d.change_hair_gradient,M=d.change_facial_hair,O=d.facial_hair_styles,P=d.facial_hair_style,F=d.change_head_markings,R=d.head_marking_styles,D=d.head_marking_style,j=d.change_body_markings,W=d.body_marking_styles,z=d.body_marking_style,U=d.change_tail_markings,H=d.tail_marking_styles,G=d.tail_marking_style,K=d.change_body_accessory,Y=d.body_accessory_styles,q=d.body_accessory_style,$=d.change_alt_head,X=d.alt_head_styles,J=d.alt_head_style,Q=!1;return(C||N||b||V||g||v||y||x||_||k||L)&&(Q=!0),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.specimen,selected:e.specimen===m,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,a.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Q&&(0,o.createComponentVNode)(2,i),!!B&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head accessory",children:w.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===S,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!I&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair",children:T.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.hairstyle,selected:e.hairstyle===A,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!E&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!M&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Facial hair",children:O.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===P,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!F&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head markings",children:R.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body markings",children:W.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!U&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===G,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!K&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!$&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternate head",children:X.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.altheadstyle,selected:e.altheadstyle===J,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!i[e.key]&&(0,o.createComponentVNode)(2,a.Button,{content:e.text,onClick:function(){return c(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.priority||[],d=i.minor||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-bad",e,0,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(68),i=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),u=c[0],s=c[1];return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:0===u,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,c.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,a.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Access",onClick:function(){return i("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"zoom",1),i=c[0],l=c[1],d=n.alarms;return(0,o.createComponentVNode)(2,a.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,a.NanoMap,{onZoom:function(e){return l(e)},children:d.filter((function(e){return 2===e.z})).map((function(e){return(0,o.createComponentVNode)(2,a.NanoMap.Marker,{x:e.x,y:e.y,zoom:i,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0)},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.pressure,s=l.max_pressure,m=l.filter_type,p=l.filter_type_list;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_pressure")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.gas_type===m,content:e.label,onClick:function(){return i("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.pressure,m=d.max_pressure,p=d.node1_concentration,h=d.node2_concentration;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:m,value:s,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:s===m,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,i,{node_name:"Node 1",node_ref:p}),(0,o.createComponentVNode)(2,i,{node_name:"Node 2",node_ref:h})]})})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:i,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return c("set_node",{node_name:i,concentration:t/100})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.rate,s=l.max_rate,m=l.gas_unit,p=l.step;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_rate")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:m,width:6.1,lineHeight:1.5,step:p,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosTankControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(16),i=n(44),l=n(3);t.AtmosTankControl=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.sensors||{};return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[Object.keys(s[e]).indexOf("pressure")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[s[e].pressure," kpa"]}):"",Object.keys(s[e]).indexOf("temperature")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[s[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map((function(t){return Object.keys(s[e]).indexOf(t)>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,i.getGasLabel)(t),children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(0,i.getGasColor)(t),value:s[e][t],minValue:0,maxValue:100,children:(0,c.toFixed)(s[e][t],2)+"%"})},(0,i.getGasLabel)(t)):""}))]})},e)})),u.inlet&&Object.keys(u.inlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Inlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.inlet.on,"power-off"),content:u.inlet.on?"On":"Off",color:u.inlet.on?null:"red",selected:u.inlet.on,onClick:function(){return d("toggle_active",{dev:"inlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:u.inlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"inlet",val:t})}})})]})}):"",u.outlet&&Object.keys(u.outlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Outlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.outlet.on,"power-off"),content:u.outlet.on?"On":"Off",color:u.outlet.on?null:"red",selected:u.outlet.on,onClick:function(){return d("toggle_active",{dev:"outlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:u.outlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"outlet",val:t})}})})]})}):""]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=n(20),u=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,c.useBackend)(t),s=n.act,m=n.data,p=m.total_amount,h=(m.max_amount,m.metal_amount),f=m.glass_amount,C=m.busyname,N=(m.busyamt,m.showhacked,m.buildQueue),b=m.buildQueueLen,V=m.recipes,g=m.categories,v=(0,c.useSharedState)(t,"category",0),y=v[0],x=v[1];0===y&&(y="Tools");var _=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),k=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),L=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),B=(0,c.useSharedState)(t,"search_text",""),w=B[0],S=B[1],I=(0,d.createSearch)(w,(function(e){return e.name})),T="";b>0&&(T=N.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:N[t][0],onClick:function(){return s("remove_from_queue",{remove_from_queue:N.indexOf(e)+1})}},e)},t)})));var A=(0,r.flow)([(0,a.filter)((function(e){return(e.category.indexOf(y)>-1||w)&&(m.showhacked||!e.hacked)})),w&&(0,a.filter)(I),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(V),E="Build";w?E="Results for: '"+w+"':":y&&(E="Build ("+y+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Section,{title:E,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:g,selected:y,onSelected:function(e){return x(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return S(t)},mb:1}),A.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&1===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,1),onClick:function(){return s("make",{make:e.uid,multiplier:1})},children:(0,d.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&10===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,10),onClick:function(){return s("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&25===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,25),onClick:function(){return s("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&m.busyamt===e.max_multiplier,disabled:!u(e,m.metal_amount,m.glass_amount,e.max_multiplier),onClick:function(){return s("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,d.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,i.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metal",children:_}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Glass",children:k}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total",children:L}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Storage",children:[m.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Building",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Build Queue",children:[T,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Clear All",disabled:!m.buildQueueLen,onClick:function(){return s("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.Biogenerator=function(e,t){var n=(0,r.useBackend)(t),a=n.data,m=n.config,p=a.container,h=a.processing,f=m.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:h,name:f}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),p?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"flask",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.biomass,l=c.container,d=c.container_curr_reagents,u=c.container_max_reagents;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",children:i}),(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:d+" / "+u+" units"})}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"None"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_plants,d=i.container;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return c("activate")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!d,tooltip:d?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return c("detach_container")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return c("eject_plants")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.biomass,d=i.product_list,u=(0,r.useSharedState)(t,"vendAmount",1),s=u[0],m=u[1],p=Object.entries(d).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,a.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*s,(0,o.createComponentVNode)(2,a.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"40%",children:(0,o.createComponentVNode)(2,a.Button,{content:"Vend",disabled:lm?"bad":"good";return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(m>V)&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Level",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===s,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===s,onClick:function(){return l("set",{set_level:m})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===s,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:s,fillValue:m,minValue:0,color:v,maxValue:N,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:s===N,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:s===N,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:N})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Power Use",children:(0,i.formatPower)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power for next level",children:(0,i.formatPower)(g)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Surplus Power",children:(0,i.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Points",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.price>=p,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,c.Box,{children:t},t)],0)}),null):null},h=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,a.useBackend)(t).data,r=n.occupied,c=n.occupant,l=void 0===c?{}:c,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,y);return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"print",onClick:function(){return i("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",onClick:function(){return i("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Implants",children:d.implant_len?(0,o.createComponentVNode)(2,c.Box,{children:d.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"None"})})]})})},N=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,c.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])}))}):(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,c.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:s,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[p([!!e.status.splinted&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:p([1===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},y=function(){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BookBinder=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=n(34);t.BookBinder=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.selectedbook,m=u.book_categories,p=[];return m.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Book Binder",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:m.map((function(e){return e.description})),onSelected:function(e){return d("toggle_binder_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),m.filter((function(e){return s.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return d("toggle_binder_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:s.summary})]})})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return d("print_book")}})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.cleanblood;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Clean Blood",disabled:u,onClick:function(){return l("blood")}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotFloor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotFloor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.hullplating,p=d.replace,h=d.eat,f=d.make,C=d.fixfloor,N=d.nag_empty,b=d.magnet,V=d.tiles_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Floor Settings",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:V})}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Add tiles to new hull plating",disabled:u,onClick:function(){return l("autotile")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Replace floor tiles",disabled:u,onClick:function(){return l("replacetiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:u,onClick:function(){return l("fixfloors")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Miscellaneous",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:u,onClick:function(){return l("eattiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Make pieces of metal into tiles when empty",disabled:u,onClick:function(){return l("maketiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Transmit notice when empty",disabled:u,onClick:function(){return l("nagonempty")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"Traction Magnets",disabled:u,onClick:function(){return l("anchored")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotHonk=void 0;var o=n(0),r=n(1),a=(n(2),n(3)),c=n(100);t.BotHonk=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.BotStatus)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotMed=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotMed=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.shut_up,p=d.declare_crit,h=d.stationary_mode,f=d.heal_threshold,C=d.injection_amount,N=d.use_beaker,b=d.treat_virus,V=d.reagent_glass;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Communication Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!m,disabled:u,onClick:function(){return l("toggle_speaker")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:p,disabled:u,onClick:function(){return l("toggle_critical_alerts")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Treatment Settings",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{value:f.value,minValue:f.min,maxValue:f.max,step:5,disabled:u,onChange:function(e,t){return l("set_heal_threshold",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Level",children:(0,o.createComponentVNode)(2,a.Slider,{value:C.value,minValue:C.min,maxValue:C.max,step:5,format:function(e){return e+"u"},disabled:u,onChange:function(e,t){return l("set_injection_amount",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Beaker":"Internal Synthesizer",icon:N?"flask":"cogs",disabled:u,onClick:function(){return l("toggle_use_beaker")}})}),V&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V.amount,minValue:0,maxValue:V.max_amount,children:[V.amount," / ",V.max_amount]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,a.Button,{content:"Eject",disabled:u,onClick:function(){return l("eject_reagent_glass")}})})]})})]}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Treat Viral Infections",checked:b,disabled:u,onClick:function(){return l("toggle_treat_viral")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:u,onClick:function(){return l("toggle_stationary_mode")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.check_id,p=d.check_weapons,h=d.check_warrant,f=d.arrest_mode,C=d.arrest_declare;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unidentifiable Persons",disabled:u,onClick:function(){return l("authid")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Weapons",disabled:u,onClick:function(){return l("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:u,onClick:function(){return l("authwarrant")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Detain Targets Indefinitely",disabled:u,onClick:function(){return l("arrtype")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:u,onClick:function(){return l("arrdeclare")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),a=n(2),c=n(1),i=function(e,t){var n=e.cell,r=(0,c.useBackend)(t).act,i=n.cell_id,l=n.occupant,d=n.crimes,u=n.brigged_by,s=n.time_left_seconds,m=n.time_set_seconds,p=n.ref,h="";s>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,a.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:i}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:u}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:m})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{type:"button",onClick:function(){r("release",{ref:p})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,a.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,i,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,c.useBackend)(t),i=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:i})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:l.occupant}));var d="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(d="exclamation-triangle"));var u=[],s=0;for(s=0;se.current_positions&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"-",disabled:s.cooldown_time||!e.can_close,onClick:function(){return u("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"+",disabled:s.cooldown_time||!e.can_open,onClick:function(){return u("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:s.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,a.Button,{content:e.is_priority?"Yes":"No",selected:e.is_priority,disabled:s.cooldown_time||!e.can_prioritize,onClick:function(){return u("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=s.authenticated&&s.scan_name?s.modify_name?(0,o.createComponentVNode)(2,i.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(e){return u("set",{access:e})},grantAll:function(){return u("grant_all")},denyAll:function(){return u("clear_all")},grantDep:function(e){return u("grant_region",{region:e})},denyDep:function(e){return u("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,a.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=s.authenticated?s.records.length?(0,o.createComponentVNode)(2,a.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||0===s.records.length||s.target_dept,onClick:function(){return u("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.reason}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||0===s.records.length,onClick:function(){return u("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=s.authenticated&&s.scan_name?(0,o.createComponentVNode)(2,a.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return u("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p,m,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=(n(45),n(20)),u=n(34);t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)]})})};var s=function(e,t){var n=(0,c.useLocalState)(t,"contentsModal",null),r=n[0],a=n[1],l=(0,c.useLocalState)(t,"contentsModalTitle",null),d=l[0],u=l[1];return null!==r&&null!==d?(0,o.createComponentVNode)(2,i.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[d,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,i.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Close",onClick:function(){a(null),u(null)}})})]}):void 0},m=function(e,t){var n,r,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=d.is_public,s=d.timeleft,m=d.moving,p=d.at_station;return m||p?!m&&p?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==s?"Shuttle is en route (ETA: "+s+" minutes)":"Shuttle is en route (ETA: "+s+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:n}),0===u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n,r=(0,c.useBackend)(t),a=(r.act,r.data.accounts),l=(0,c.useLocalState)(t,"selectedAccount"),d=l[0],u=l[1],s=[];return a.map((function(e){return s[e.name]=e.account_UID})),(0,o.createComponentVNode)(2,i.Section,{title:"Payment",children:[(0,o.createComponentVNode)(2,i.Dropdown,{mt:.6,width:"190px",options:a.map((function(e){return e.name})),selected:null==(n=a.filter((function(e){return e.account_UID===d}))[0])?void 0:n.name,onSelected:function(e){return u(s[e])}}),a.filter((function(e){return e.account_UID===d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Name",children:e.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Balance",children:e.balance})]},e.account_UID)}))]})},h=function(e,t){var n=(0,c.useBackend)(t),l=n.act,u=n.data,s=u.categories,m=u.supply_packs,p=(0,c.useSharedState)(t,"category","Emergency"),h=p[0],f=p[1],C=(0,c.useSharedState)(t,"search_text",""),N=C[0],b=C[1],V=(0,c.useLocalState)(t,"contentsModal",null),g=(V[0],V[1]),v=(0,c.useLocalState)(t,"contentsModalTitle",null),y=(v[0],v[1]),x=(0,d.createSearch)(N,(function(e){return e.name})),_=(0,c.useLocalState)(t,"selectedAccount"),k=_[0],L=(_[1],(0,r.flow)([(0,a.filter)((function(e){return e.cat===s.filter((function(e){return e.name===h}))[0].category||N})),N&&(0,a.filter)(x),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(m)),B="Crate Catalogue";return N?B="Results for '"+N+"':":h&&(B="Browsing "+h),(0,o.createComponentVNode)(2,i.Section,{title:B,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:s.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return b(t)},mb:1}),(0,o.createComponentVNode)(2,i.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:L.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Order 1",icon:"shopping-cart",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:0,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:1,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Contents",icon:"search",onClick:function(){g(e.contents),y(e.name)}})]})]},e.name)}))})})]})},f=function(e,t){var n,r,a=e.request;switch(a.department){case"Engineering":r="CE",n="orange";break;case"Medical":r="CMO",n="teal";break;case"Science":r="RD",n="purple";break;case"Supply":r="CT",n="brown";break;case"Service":r="HOP",n="olive";break;case"Security":r="HOS",n="red";break;case"Command":r="CAP",n="blue";break;case"Assistant":r="Any Head",n="grey"}return(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:"Approval Required:"}),Boolean(a.req_cargo_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),Boolean(a.req_head_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{children:(0,o.createComponentVNode)(2,i.Button,{color:n,content:r,disabled:a.req_cargo_approval,icon:"user-tie",tooltip:a.req_cargo_approval?"This Order first requires approval from the QM before the "+r+" can approve it":"This Order requires approval from the "+r+" still"})})]})},C=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.requests,d=a.orders,u=a.shipments;return(0,o.createComponentVNode)(2,i.Section,{title:"Orders",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{className:"Cargo_RequestList",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{children:["Order #",e.ordernum,": ",e.supply_type," (",e.cost," credits) for"," ",(0,o.createVNode)(1,"b",null,e.orderedby,0)," with"," ",e.department?"The "+e.department+" Department":"Their Personal"," ","Account"]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]}),(0,o.createComponentVNode)(2,f,{request:e})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Approve",color:"green",disabled:!e.can_approve,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Deny",color:"red",disabled:!e.can_deny,onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Order in Transit"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChangelogView=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ChangelogView=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,r.useLocalState)(t,"onlyRecent",0),u=d[0],s=d[1],m=l.cl_data,p=l.last_cl,h={FIX:(0,o.createComponentVNode)(2,a.Icon,{name:"tools",title:"Fix"}),WIP:(0,o.createComponentVNode)(2,a.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,o.createComponentVNode)(2,a.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,o.createComponentVNode)(2,a.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})};return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:u?"Showing all changes":"Showing changes since last connection",onClick:function(){return s(!u)}}),children:m.map((function(e){return!u&&e.merge_ts<=p||(0,o.createComponentVNode)(2,a.Section,{mb:2,title:e.author+" - Merged on "+e.merge_date,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"#"+e.num,onClick:function(){return i("open_pr",{pr_number:e.num})}}),children:e.entries.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:[(t=e.etype,t in h?h[t]:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",color:"green"}))," ",e.etext]},e);var t}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(126),i=n(3),l=[1,5,10,20,30,50],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.amount,u=i.energy,s=i.maxEnergy;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:l.glass?"Glass":"Beaker",flex:"content",minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return i("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return i("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return i("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return i("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(126),l=n(3);t.ChemHeater=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.targetTemp,u=l.targetTempReached,s=l.autoEject,m=l.isActive,p=l.currentTemp,h=l.isBeakerLoaded;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",flexBasis:"content",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{content:"Auto-eject",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return i("toggle_autoeject")}}),(0,o.createComponentVNode)(2,c.Button,{content:m?"On":"Off",icon:"power-off",selected:m,disabled:!h,onClick:function(){return i("toggle_on")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(d,0),minValue:0,maxValue:1e3,onDrag:function(e,t){return i("adjust_temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",color:u?"good":"average",children:h&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:p,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.isBeakerLoaded,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.beakerContents;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",flexGrow:"1",buttons:!!d&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[u," / ",s," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return r("eject_beaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:d,beakerContents:m})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(126),l=n(30),d=[1,5,10],u=["bottle.png","small_bottle.png","wide_bottle.png","round_bottle.png","reagent_bottle.png"];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,i=n.beaker,d=n.beaker_reagents,u=void 0===d?[]:d,h=n.buffer_reagents,f=void 0===h?[]:h,N=n.mode;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s,{beaker:i,beakerReagents:u,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,m,{mode:N,bufferReagents:f}),(0,o.createComponentVNode)(2,p,{isCondiment:a,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,C)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t).act,c=e.beaker,u=e.beakerReagents,s=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"0",flexBasis:"300px",buttons:s?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:c?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!i.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:i.printing?"spinner":"print",disabled:i.printing,iconSpin:!!i.printing,ml:"0.5rem",content:"Print",onClick:function(){return c("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(44),l=n(30),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.menu;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return i("lock")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return i("eject")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,c.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return i("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return i("scan")}})]}),(0,o.createComponentVNode)(2,c.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,c.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return i("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,c.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.records;return i.length?(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,c.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,c.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.scanner,d=i.numberofpods,u=i.autoallowed,s=i.autoprocess;i.disk;return(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:(0,o.createFragment)(!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColourMatrixTester=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ColourMatrixTester=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.colour_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Modify Matrix",children:[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]].map((function(e){return(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:e.map((function(e){return(0,o.createFragment)([e.name,(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{value:l[e.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(t,n){return i("setvalue",{idx:e.idx+1,value:n})}})],0,e.name)}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){switch(e){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,m);case 3:return(0,o.createComponentVNode)(2,p);case 4:return(0,o.createComponentVNode)(2,f);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}};t.CommunicationsComputer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.menu_state);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),i(a)]})})};var l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authenticated,u=l.noauthbutton,s=l.esc_section,m=l.esc_callable,p=l.esc_recallable,h=l.esc_status,f=l.authhead,C=l.is_ai,N=l.lastCallLoc,b=!1;return d?1===d?n="Command":2===d?n="Captain":3===d?n="CentComm Officer":4===d?(n="CentComm Secure Connection",b=!0):n="ERROR: Report This Bug!":n="Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:n})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,disabled:u,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return i("auth")}})})})}),!!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:h}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!f,onClick:function(){return i("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!f||C,onClick:function(){return i("cancelshuttle")}})}),!!N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Last Call/Recall From",children:N})]})})],0)},d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.is_admin?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.gamma_armory_location,u=i.admin_levels,m=i.authenticated,p=i.ert_allowed;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"CentComm Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:u,required_access:l,use_confirm:1})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!l,onClick:function(){return c("send_to_cc_announcement_page")}}),4===m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Make Other Announcement",disabled:!l,onClick:function(){return c("make_other_announcement")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Response Team",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!l,onClick:function(){return c("dispatch_ert")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:p,content:p?"ERT calling enabled":"ERT calling disabled",tooltip:p?"Command can request an ERT":"ERTs cannot be requested",disabled:!l,onClick:function(){return c("toggle_ert_allowed")},selected:null})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!l,onClick:function(){return c("send_nuke_codes")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gamma Armory",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"biohazard",content:d?"Send Gamma Armory":"Recall Gamma Armory",disabled:!l,onClick:function(){return c("move_gamma_armory")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"coins",content:"View Economy",disabled:!l,onClick:function(){return c("view_econ")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fax",content:"Fax Manager",disabled:!l,onClick:function(){return c("view_fax")}})]})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"View Command accessible controls",children:(0,o.createComponentVNode)(2,s)})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.msg_cooldown,d=i.emagged,u=i.cc_cooldown,s=i.security_level_color,m=i.str_security_level,p=i.levels,f=i.authcapt,C=i.authhead,N=i.messages,b="Make Priority Announcement";l>0&&(b+=" ("+l+"s)");var V=d?"Message [UNKNOWN]":"Message CentComm",g="Request Authentication Codes";return u>0&&(V+=" ("+u+"s)",g+=" ("+u+"s)"),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:s,children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:p,required_access:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:b,disabled:!f||l>0,onClick:function(){return c("announce")}})}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:V,disabled:!f||u>0,onClick:function(){return c("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!f,onClick:function(){return c("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:V,disabled:!f||u>0,onClick:function(){return c("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",content:g,disabled:!f||u>0,onClick:function(){return c("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!C,onClick:function(){return c("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:"View ("+N.length+")",disabled:!C,onClick:function(){return c("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!C,onClick:function(){return c("RestartNanoMob")}})})]})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.stat_display,d=i.authhead,u=(i.current_message_title,l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return c("setstat",{statdisp:e.name})}},e.name)}))),s=l.alerts.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.alert===l.icon,disabled:!d,onClick:function(){return c("setstat",{statdisp:3,alert:e.alert})}},e.alert)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alerts",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return c("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return c("setmsg2")}})})]})})},p=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authhead,u=l.current_message_title,s=l.current_message,m=l.messages;l.security_level;if(u)n=(0,o.createComponentVNode)(2,a.Section,{title:u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!d,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:s})});else{var p=m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!d||u===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"times",content:"Delete",disabled:!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));n=(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p})})}return(0,o.createComponentVNode)(2,a.Box,{children:n})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.levels,d=e.required_access,u=e.use_confirm,s=i.security_level;return u?l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)})):l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)}))},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.possible_cc_sounds;if(!l)return c("main");var u=(0,r.useLocalState)(t,"subtitle",""),s=u[0],m=u[1],p=(0,r.useLocalState)(t,"text",""),h=p[0],f=p[1],C=(0,r.useLocalState)(t,"classified",0),N=C[0],b=C[1],V=(0,r.useLocalState)(t,"beepsound","Beep"),g=V[0],v=V[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Central Command Report",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:s,onChange:function(e,t){return m(t)},mb:"5px"}),(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:h,onChange:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("make_cc_announcement",{subtitle:s,text:h,classified:N,beepsound:g})}}),(0,o.createComponentVNode)(2,a.Flex,{mt:"5px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"260px",height:"20px",options:d,selected:g,onSelected:function(e){return v(e)},disabled:N})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",mx:"5px",disabled:N,tooltip:"Test sound",onClick:function(){return c("test_sound",{sound:g})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Classified",fluid:!0,tooltip:N?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!N)}})})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CompostBin=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.CompostBin=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.biomass,u=l.compost,s=l.biomass_capacity,m=l.compost_capacity,p=(0,r.useSharedState)(t,"vendAmount",1),h=p[0],f=p[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{label:"Resources",children:[(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Biomass",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[d," / ",s," Units"]})})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compost",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:m,ranges:{good:[.5*m,Infinity],average:[.25*m,.5*m],bad:[-Infinity,.25*m]},children:[u," / ",m," Units"]})})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:h,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(e,t){return f(t)}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",textAlign:"right",width:"0%",children:(0,o.createComponentVNode)(2,a.Button,{align:"right",content:"Make Soil",disabled:u<25*h,icon:"arrow-circle-down",onClick:function(){return i("create",{amount:h})}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(229),l=n(3);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},s=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,d=r.data;n=d.unauthorized?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):d.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"hidden",children:1===d.page?(0,o.createComponentVNode)(2,h,{height:"100%"}):(0,o.createComponentVNode)(2,C,{height:"100%"})})],4):(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:s,finishedTimeout:3e3,onFinished:function(){return i("complete_load_animation")}})});var u=(0,a.useLocalState)(t,"viewingPhoto",""),f=u[0];u[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[f&&(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:n})})]})};var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.tc_available,d=i.tc_paid_out,u=i.completed_contracts,s=i.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,c.Box,{verticalAlign:"middle",mt:"0.25rem",children:[s," Rep"]})},e,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,c.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Earned",children:[d," TC"]})]})}),(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:u})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"shopping-cart"}),"Hub"]})]})))},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.contracts,s=l.contract_active,m=l.can_extract,p=!!s&&d.filter((function(e){return 1===e.status}))[0],h=p&&p.time_left>0,C=(0,a.useLocalState)(t,"viewingPhoto",""),N=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,c.Button,{disabled:!m||h,icon:"parachute-box",content:["Call Extraction",h&&(0,o.createComponentVNode)(2,i.Countdown,{timeLeft:p.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,c.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return N("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,c.Box,{width:"100%",children:[!!u[e.status]&&(0,o.createComponentVNode)(2,c.Box,{color:u[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:u[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",f(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!!s,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,c.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},f=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,a=e.objective.locs.target_area_id,i=e.objective.locs.target_coords,l=t===a;return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(i[1]-n[1],i[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.rep,d=i.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,c.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,c.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),b=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.slowFactor,u=l.oneWay,s=l.position;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lever position",children:s>0?"forward":s<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,onClick:function(){return i("toggleOneWay")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",onClick:function(){return i("slowFactor",{value:d-5})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-left",onClick:function(){return i("slowFactor",{value:d-1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Slider,{width:"100px",mx:"1px",value:d,fillValue:d,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return i("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-right",onClick:function(){return i("slowFactor",{value:d+1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",onClick:function(){return i("slowFactor",{value:d+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(26),a=n(20),c=n(1),i=n(2),l=n(68),d=n(44),u=n(3),s=n(34),m=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.possible_levels,d=a.viewing_current_z_level,m=a.is_advanced,p=(0,c.useLocalState)(t,"tabIndex",0),C=p[0],N=p[1];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,s.FlexItem,{grow:!0,basis:100,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===C,onClick:function(){return N(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===C,onClick:function(){return N(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),m?(0,o.createComponentVNode)(2,s.FlexItem,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:l,selected:d,onSelected:function(e){return r("switch_level",{new_level:e})}})}):null]})}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}(C)]})})})};var h=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,h=(0,r.sortBy)((function(e){return e.name}))(s.crewmembers||[]),f=(0,c.useLocalState)(t,"search",""),C=f[0],N=f[1],b=(0,a.createSearch)(C,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Location"})]}),h.filter(b).map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p(e,s.critThreshold),children:m(e,s.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"grey",children:"Not Available"})})]},e.name)}))]})]})},f=function(e,t){var n=(0,c.useBackend)(t).data,r=(0,c.useLocalState)(t,"zoom",1),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return l(e)},children:n.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:a,icon:"circle",tooltip:e.name+" ("+e.assignment+")",color:p(e,n.critThreshold)},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,V=d.auto_eject_healthy,g=d.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return c(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dosage interval",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{average:[-Infinity,99],good:[99,Infinity]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c(V?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:V?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c(g?"auto_eject_dead_off":"auto_eject_dead_on")},children:g?"On":"Off"})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.isBeakerLoaded,l=c.beakerLabel,d=c.beakerVolume;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:!l&&"average",children:l||"No label"}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",float:"right",color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],4):(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"bad",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,i=n.account_name,u=n.allow_items;return(0,o.createComponentVNode)(2,c.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!u&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored crew!"})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.frozen_items,d=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,i.toTitleCase)(t)};return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Items",children:l.length?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:d(e.name),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return c("one_item",{item:e.uid})}})},e)}))})}),(0,o.createComponentVNode)(2,a.Button,{content:"Drop All Items",color:"red",onClick:function(){return c("all_items")}})],4):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,g,{duration:d})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),n,(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.locked,u=i.hasOccupant,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return c("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return c("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:i.occupant.uniqueEnzymes?i.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return i("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedUIBlock,d=i.selectedUISubBlock,u=i.selectedUITarget,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return c("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return c("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedSEBlock,d=i.selectedSESubBlock,u=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return c("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.radiationIntensity,d=i.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.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 c("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:c}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.id,d=e.name,u=e.buffer,s=i.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return c("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return c("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!i.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return c("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!i.hasDisk||!i.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return c("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return c("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.hasDisk,d=i.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return c("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.isBeakerLoaded,d=i.beakerVolume,s=i.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return c("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return c("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=i.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var i=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===i,content:m[e+r],mb:"0",onClick:function(){return c(s,{block:t,subblock:i})}}))},i=0;ii.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert",{silent:u})}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.ert_request_messages;return(0,o.createComponentVNode)(2,a.Section,{children:l&&l.length?l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.time,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.sender_real_name,onClick:function(){return c("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel"}),children:e.message},(0,i.decodeHtmlEntities)(e.time))})):(0,o.createComponentVNode)(2,a.Box,{fluid:!0,italic:!0,textAlign:"center",children:"No ERT requests"})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,(0,r.useLocalState)(t,"text","")),l=i[0],d=i[1];return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:l,onChange:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("deny_ert",{reason:l})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.EconomyManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=n(45);t.EconomyManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.next_payroll_time;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Global",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"global"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Members",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department_members"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Single Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return c("delay_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){return c("set_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return c("accelerate_payroll")}})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,h=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:h/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmotePanelContent=t.EmotePanel=void 0;var o=n(0),r=n(1),a=n(3),c=n(2);t.EmotePanel=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),a=n.act,i=n.data.emotes,l=(0,r.useLocalState)(t,"searchText",""),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"filterVisible",""),m=s[0],p=s[1],h=(0,r.useLocalState)(t,"filterAudible",""),f=h[0],C=h[1],N=(0,r.useLocalState)(t,"filterSound",""),b=N[0],V=N[1],g=(0,r.useLocalState)(t,"filterHands",""),v=g[0],y=g[1],x=(0,r.useLocalState)(t,"filterTargettable",""),_=x[0],k=x[1],L=(0,r.useLocalState)(t,"useTarget",""),B=L[0],w=L[1],S=(0,o.createComponentVNode)(2,c.Input,{placeholder:"\u0418\u0441\u043a\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u044e...",fluid:!0,onInput:function(e,t){return u(t)}});return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",buttons:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"eye",width:"100%",height:"100%",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043c\u044b\u0439",selected:m,onClick:function(){return p(!m)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"comment",width:"100%",height:"100%",align:"center",tooltip:"\u0421\u043b\u044b\u0448\u0438\u043c\u044b\u0439",selected:f,onClick:function(){return C(!f)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"volume-up",width:"100%",height:"100%",align:"center",tooltip:"\u0417\u0432\u0443\u043a",selected:b,onClick:function(){return V(!b)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"hand-paper",width:"100%",height:"100%",align:"center",tooltip:"\u0420\u0443\u043a\u0438",selected:v,onClick:function(){return y(!v)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",width:"100%",height:"100%",align:"center",tooltip:"\u0426\u0435\u043b\u044c",selected:_,onClick:function(){return k(!_)}})]}),children:S}),(0,o.createComponentVNode)(2,c.Section,{title:d.length>0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+d+'"':"\u0412\u0441\u0435 \u044d\u043c\u043e\u0446\u0438\u0438",fill:!0,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",selected:B,onClick:function(){return w(!B)},children:"\u0412\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0446\u0435\u043b\u044c"}),children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{children:i.filter((function(e){return e.key&&(!(d.length>0)||(e.key.toLowerCase().includes(d.toLowerCase())||e.name.toLowerCase().includes(d.toLowerCase())))&&(!m||e.visible)&&(!f||e.audible)&&(!b||e.sound)&&(!v||e.hands)&&(!_||e.targettable)})).map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return a("play_emote",{emote_key:e.key,useTarget:B})},children:[e.visible?(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}):"",e.audible?(0,o.createComponentVNode)(2,c.Icon,{name:"comment"}):"",e.sound?(0,o.createComponentVNode)(2,c.Icon,{name:"volume-up"}):"",e.hands?(0,o.createComponentVNode)(2,c.Icon,{name:"hand-paper"}):"",e.targettable?(0,o.createComponentVNode)(2,c.Icon,{name:"crosshairs"}):"",e.name.toUpperCase()]},e.name)}))})})})]})};t.EmotePanelContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.can_respec;return(0,o.createComponentVNode)(2,a.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){return c("readapt")}}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.ability_list,u=i.purchased_abilities,s=i.view_mode,m=(0,r.useLocalState)(t,"tab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:s?"square-o":"check-square-o",selected:!s,content:"Compact",onClick:function(){return c("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:s?"check-square-o":"square-o",selected:s,content:"Expanded",onClick:function(){return c("set_view_mode",{mode:1})}})],4),children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){h(0)},children:"Offense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){h(1)},children:"Defense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:"Utility"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===p,onClick:function(){return h(3)},children:"Stings"})]}),d[p].map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),u.includes(e.power_path)&&(0,o.createComponentVNode)(2,a.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,o.createComponentVNode)(2,a.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mr:.5,disabled:e.cost>l||u.includes(e.power_path),content:"Evolve",onClick:function(){return c("purchase",{power_path:e.power_path})}})})]}),!!s&&(0,o.createComponentVNode)(2,a.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(8),a=n(20),c=n(1),i=n(2),l=n(229),d=n(3),u=["id","amount","lineDisplay","onClick"];var s={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data.building);return(0,o.createComponentVNode)(2,d.Window,{children:(0,o.createComponentVNode)(2,d.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),r&&(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,f)})]})})]})})})};var m=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.materials,d=a.capacity,u=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,i.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.25rem",children:[(u/d*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,C,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,c.useBackend)(t),r=n.act,l=n.data,d=l.curCategory,u=l.categories,s=l.designs,m=l.syncing,p=(0,c.useLocalState)(t,"searchText",""),h=p[0],f=p[1],C=(0,a.createSearch)(h,(function(e){return e.name})),b=s.filter(C);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,i.Dropdown,{selected:d,options:u,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,i.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:m,iconSpin:m,icon:"sync-alt",content:m?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),b.map((function(e){return(0,o.createComponentVNode)(2,N,{design:e},e.id)})),0===b.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No designs found."})]})},h=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data),a=r.building,d=r.buildStart,u=r.buildEnd,s=r.worldTime;return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar.Countdown,{start:d,current:s,end:u,bold:!0,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",children:(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:!0})}),"Building ",a,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:s,timeLeft:u-s,format:function(e,t){return t.substr(3)}}),")"]})})},f=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.queue,d=a.processingQueue,u=Object.entries(a.queueDeficit).filter((function(e){return e[1]<0})),s=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Processing time:",(0,o.createComponentVNode)(2,i.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",bold:!0,children:new Date(s/10*1e3).toISOString().substr(14,5)})]}),Object.keys(u).length>0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Lacking materials to complete:",u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},C=function(e,t){var n=(0,c.useBackend)(t),a=(n.act,n.data),l=e.id,d=e.amount,m=e.lineDisplay,p=e.onClick,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),f=l.replace("$",""),C=a.materials[l]||0,N=d||C;if(!(N<=0&&"metal"!==f&&"glass"!==f)){var b=d&&d>C;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",m&&"Exofab__material--line"])},h,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,i.Button,{onClick:p,children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[f]||f)+".png"})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:m?(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",color:b&&"bad",children:N.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--name",children:f}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",children:[N.toLocaleString("en-US")," cm\xb3 (",Math.round(N/2e3*10)/10," ","sheets)"]})],4)})]})))}},N=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=e.design;return(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:l.notEnough||a.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ExternalAirlockController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.chamber_pressure,m=(u.exterior_status,u.interior_status),p=u.processing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(n=s,i="good",n<80?i="bad":n<95||n>110?i="average":n>120&&(i="bad"),i),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Abort",icon:"ban",color:"red",disabled:!p,onClick:function(){return d("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return i("scan")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){return i("auth")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return i("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return i("rename")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return i("dept")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,a.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return i("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FilingCabinet=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FilingCabinet=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=n.config,u=l.contents,s=d.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" The ",s," is empty. "]}),!!u&&u.slice().map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"80%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){return i("retrieve",{index:e.index})}})})]},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,e.image),c=e.isSelected,i=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+a,style:{"border-style":c?"solid":"none","border-width":"2px","border-color":"orange",padding:c?"2px":"4px"},onClick:i})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.availableStyles,s=d.selectedStyle,m=d.selectedDir,p=d.directionsPreview,h=d.allStylesPreview;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:s,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,a.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,i,{image:h[e],isSelected:s===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,a.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,a.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,i,{image:p[e],isSelected:e===m,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,a.useBackend)(t).data,r=n.emped,l=n.active,p=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,d,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,u)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{area:p,position:h})}),f&&(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,m,{height:"100%"})})],0):(0,o.createComponentVNode)(2,d)],0)})})})};var d=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,c.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.active,d=i.tag,u=i.same_z,s=(0,a.useLocalState)(t,"newTag",d),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,c.Input,{width:"5rem",value:d,onEnter:function(){return r("tag",{newtag:m})},onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:d===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:m})},children:(0,o.createComponentVNode)(2,c.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"compress":"expand",content:u?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},s=function(e,t){var n=e.title,r=e.area,a=e.position;return(0,o.createComponentVNode)(2,c.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,c.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(a)]})})},m=function(e,t){var n=(0,a.useBackend)(t).data,i=n.position,d=n.signals;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,c.Table,{children:d.map((function(e){return Object.assign({},e,function(e,t){if(e&&t){if(e[2]!==t[2])return null;var n=Math.atan2(t[1]-e[1],t[0]-e[0]),o=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(n),distance:o}}}(i,e.position))})).map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,c.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GeneModder=void 0;var o=n(0),r=n(1),a=n(2),c=n(30),i=n(3);t.GeneModder=function(e,t){var n=(0,r.useBackend)(t).data.has_seed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Genes",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Insert Gene from Disk",disabled:!i||!i.can_insert||i.is_core,icon:"arrow-circle-down",onClick:function(){return c("insert")}}),children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.has_seed,s=d.seed,m=d.has_disk,p=d.disk;return n=u?(0,o.createComponentVNode)(2,a.Flex.Item,{mb:"-6px",mt:"-4px",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{content:s.name,onClick:function(){return l("eject_seed")}}),(0,o.createComponentVNode)(2,a.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return l("variant_name")}})]}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",onClick:function(){return l("eject_seed")}})}),c=m?p.name:"None",(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Sample",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Disk",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:c,onClick:function(){return l("eject_disk")}})})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.disk,d=i.core_genes;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core Genes",open:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=l&&l.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Replace",disabled:!e.is_type||!l.can_insert,icon:"arrow-circle-down",onClick:function(){return c("replace",{id:e.id})}})})]},e)}))},"Core Genes")},m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.reagent_genes,c=n.has_reagent;return(0,o.createComponentVNode)(2,h,{title:"Reagent Genes",gene_set:a,do_we_show:c})},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.trait_genes,c=n.has_trait;return(0,o.createComponentVNode)(2,h,{title:"Trait Genes",gene_set:a,do_we_show:c})},h=function(e,t){var n=e.title,c=e.gene_set,i=e.do_we_show,l=(0,r.useBackend)(t),d=l.act,u=l.data.disk;return(0,o.createComponentVNode)(2,a.Collapsible,{title:n,open:!0,children:i?c.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=u&&u.can_extract),icon:"save",onClick:function(){return d("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"times",onClick:function(){return d("remove",{id:e.id})}})})]},e)})):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"No Genes Detected"})},n)}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),a=n(3),c=n(168);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,c.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,d=n.medical,u=n.diagnostic,s=n.radioactivity,m=n.ahud;return(0,o.createComponentVNode)(2,c.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,i,{label:"Medical",type:"medical",is_active:d}),(0,o.createComponentVNode)(2,i,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,i,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Antag HUD",is_active:m,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.label,i=e.type,l=void 0===i?null:i,d=e.is_active,u=e.act_on,s=void 0===u?"hud_on":u,m=e.act_off,p=void 0===m?"hud_off":m;return(0,o.createComponentVNode)(2,a.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){return n(d?p:s,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGen=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GravityGen=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.charging_state,s=d.charge_count,m=d.breaker,p=d.ext_power;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[function(e){if(e>0)return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,p:1.5,children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}(u),(0,o.createComponentVNode)(2,a.Section,{title:"Generator Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",content:m?"Online":"Offline",color:m?"green":"red",px:1.5,onClick:function(){return l("breaker")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Status",color:p?"good":"bad",children:(n=u,n>0?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:["[ ",1===n?"Charging":"Discharging"," ]"]}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:p?"good":"bad",children:["[ ",p?"Powered":"Unpowered"," ]"]}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GuestPass=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(99);t.GuestPass=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"id-card",selected:!d.showlogs,onClick:function(){return l("mode",{mode:0})},children:"Issue Pass"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"scroll",selected:d.showlogs,onClick:function(){return l("mode",{mode:1})},children:["Records (",d.issue_log.length,")"]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.scan_name?"eject":"id-card",selected:d.scan_name,content:d.scan_name?d.scan_name:"-----",tooltip:d.scan_name?"Eject ID":"Insert ID",onClick:function(){return l("scan")}})})})}),!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issue Guest Pass",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Issue To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.giv_name?d.giv_name:"-----",disabled:!d.scan_name,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.reason?d.reason:"-----",disabled:!d.scan_name,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.duration?d.duration:"-----",disabled:!d.scan_name,onClick:function(){return l("duration")}})})]}),!!d.scan_name&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AccessList,{grantableList:d.grantableList,accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return l("access",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d.printmsg,disabled:!d.canprint,onClick:function(){return l("issue")}})],4)]}),!!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issuance Log",children:!!d.issue_log.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:d.issue_log.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:e},t)}))}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!d.scan_name,onClick:function(){return l("print")}})],4)||(0,o.createComponentVNode)(2,a.Box,{children:"None."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.amount,u=l.energy,s=l.maxEnergy,m=l.mode;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"dispense"===m,content:"Dispense",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"remove"===m,content:"Remove",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"isolate"===m,content:"Isolate",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"isolate"})}})]})})]})})},d=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=i.current_reagent,s=[],m=0;m<(d.length+1)%3;m++)s.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:u===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HealthSensor=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.HealthSensor=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.on,m=u.user_health,p=u.minHealth,h=u.maxHealth,f=u.alarm_health;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanning",children:(0,o.createComponentVNode)(2,c.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return d("scan_toggle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health activation",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:p,maxValue:h,value:f,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return d("alarm_health",{alarm_health:t})}})}),null!==m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"User health",children:(0,o.createComponentVNode)(2,c.Box,{color:l(m),bold:m>=100,children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:m})})})]})})})})};var l=function(e){return e>50?"green":e>0?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=(n(30),n(45));t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.decks,s=d.current_deck,m=d.ai_override,p=d.emagged;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Holodeck Control System",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",s]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Available Programs",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{block:!0,content:e,selected:e===s,onClick:function(){return l("select_deck",{deck:e})}},e)})),Boolean(p)&&(0,o.createComponentVNode)(2,a.Button,{content:"Wildlife Simulation",color:"red",onClick:function(){return l("wildlifecarp")}}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[Boolean(m)&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Override Protocols",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){return l("ai_override")}})}),(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Safety Protocols",children:(0,o.createComponentVNode)(2,a.Box,{color:p?"bad":"good",children:p?"Off":"On"})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.implant,s=d.contains_case;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Bio-chip Mini-Computer",children:[u&&s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Life",children:u.life}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Notes",children:u.notes}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Function",children:u["function"]})]})],4):s?(0,o.createComponentVNode)(2,a.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,a.Box,{children:"Please insert a bio-chip casing!"}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!s,onClick:function(){return l("eject_case")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.Instrument=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)]})]})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,c.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.lines,s=l.playing,m=l.repeat,p=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,N=l.tickLag,b=l.volume,V=l.minVolume,g=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,c.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"info",content:"Help",onClick:function(){return i("help")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file",content:"New",onClick:function(){return i("newsong")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Import",onClick:function(){return i("import")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,disabled:0===d.length||m<0,icon:"play",content:"Play",onClick:function(){return i("play")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,icon:"stop",content:"Stop",onClick:function(){return i("stop")}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0",maxValue:p,value:m,stepPixelSize:"59",onChange:function(e,t){return i("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return i("tempo",{"new":h+N})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,c.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return i("tempo",{"new":h-N})}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:V,maxValue:g,value:b,stepPixelSize:"6",onDrag:function(e,t){return i("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,u)]})},u=function(e,t){var n,i,l=(0,a.useBackend)(t),d=l.act,u=l.data,s=u.allowedInstrumentNames,m=u.instrumentLoaded,p=u.instrument,h=u.canNoteShift,f=u.noteShift,C=u.noteShiftMin,N=u.noteShiftMax,b=u.sustainMode,V=u.sustainLinearDuration,g=u.sustainExponentialDropoff,v=u.legacy,y=u.sustainDropoffVolume,x=u.sustainHeldNote;return 1===b?(n="Linear",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"0.1",maxValue:"5",value:V,step:"0.5",stepPixelSize:"85",format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return d("setlinearfalloff",{"new":t/10})}})):2===b&&(n="Exponential",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"1.025",maxValue:"10",value:g,step:"0.01",format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return d("setexpfalloff",{"new":t})}})),s.sort(),(0,o.createComponentVNode)(2,c.Box,{my:-1,children:(0,o.createComponentVNode)(2,c.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,c.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current",children:m?(0,o.createComponentVNode)(2,c.Dropdown,{options:s,selected:p,width:"40%",onSelected:function(e){return d("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:C,maxValue:N,value:f,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return d("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,c.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return d("setsustainmode",{"new":e})}}),i]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:y,stepPixelSize:"6",onChange:function(e,t){return d("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,c.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){return d("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return d("reset")}})]})})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.playing,d=i.lines,u=i.editing;return(0,o.createComponentVNode)(2,c.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!u||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:d.length+1})}}),(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!u&&(d.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(26),a=n(42),c=n(1),i=n(2),l=n(3);t.Jukebox=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.track_selected,p=u.track_length,h=u.track_beat,f=u.volume,C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"pause":"play",content:s?"\u0421\u0442\u043e\u043f":"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0422\u0440\u0435\u043a",children:(0,o.createComponentVNode)(2,i.Dropdown,{"overflow-y":"scroll",width:"240px",options:C.map((function(e){return e.name})),disabled:s,selected:m||"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u043a",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c",children:m?p:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0420\u0438\u0442\u043c",children:[m?h:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",1===h?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,i.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Knob,{size:3.2,color:f>=50?"red":"green",value:f,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,o.createComponentVNode)(2,a.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,a.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?u=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Waiting for second person to confirm..."})):u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,a.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return i("ert")}})})}),(0,o.createComponentVNode)(2,a.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return i("reset")}}),children:u})]})})}return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,(0,o.createComponentVNode)(2,a.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return i("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",onClick:function(){return i("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KitchenMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.KitchenMachine=function(e,t){var n=(0,r.useBackend)(t),d=n.data,u=n.config,s=d.ingredients,m=d.operating,p=u.title;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:m,name:p}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Section,{title:"Ingredients",flexGrow:1,children:(0,o.createComponentVNode)(2,a.Table,{className:"Ingredient__Table",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{tr:5,children:[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.name}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]}),2)]},e.name)}))})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.inactive,d=i.tooltip;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return c("cook")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return c("eject")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.isAdmin,m=u.isSlaved,p=u.isMalf,h=u.isAIMalf,f=u.view;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!(!s||!m)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!(!p&&!h)&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Law Management",selected:0===f,onClick:function(){return d("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Lawsets",selected:1===f,onClick:function(){return d("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,i),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,m=i.ion_laws,p=i.ion_law_nr,h=i.has_inherent_laws,f=i.inherent_laws,C=i.has_supplied_laws,N=i.supplied_laws,b=i.channels,V=i.channel,g=i.isMalf,v=i.isAdmin,y=i.zeroth_law,x=i.ion_law,_=i.inherent_law,k=i.supplied_law,L=i.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,d,{title:"ERR_NULL_VALUE",laws:u,ctx:t}),!!s&&(0,o.createComponentVNode)(2,d,{title:p,laws:m,ctx:t}),!!h&&(0,o.createComponentVNode)(2,d,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,d,{title:"Supplied",laws:N,ctx:t}),(0,o.createComponentVNode)(2,a.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:e.channel===V,onClick:function(){return c("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{content:"State Laws",onClick:function(){return c("state_laws")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{content:"Notify",onClick:function(){return c("notify_laws")}})})]})}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_zeroth_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_ion_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:_}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_inherent_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:L,onClick:function(){return c("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_supplied_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.law_sets;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Load Laws",icon:"download",onClick:function(){return c("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(e.ctx),c=n.act,i=n.data.isMalf;return(0,o.createComponentVNode)(2,a.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return c("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return c("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=n(34);t.LibraryComputer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.selected_rating,d=Array(10).fill().map((function(e,t){return 1+t}));return(0,o.createComponentVNode)(2,a.Flex,{children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{bold:!0,icon:"star",color:i>=e?"caution":"default",onClick:function(){return c("set_rating",{rating_value:e})}})},t)})),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,ml:2,fontSize:"150%",children:[i+"/10",(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",0),i=c[0],l=c[1],d=n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Book Archives"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Corporate Literature"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Upload Book"]}),1===d&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===i,onClick:function(){return l(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Patron Manager"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:4===i,onClick:function(){return l(4)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Inventory"]})]})},s=function(e,t){switch((0,r.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,f);case 3:return(0,o.createComponentVNode)(2,C);case 4:return(0,o.createComponentVNode)(2,N);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.searchcontent,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Flex,{"flex-direction":"row",children:[(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title||"Input Title",onClick:function(){return(0,i.modalOpen)(t,"edit_search_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author||"Input Author",onClick:function(){return(0,i.modalOpen)(t,"edit_search_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ratings",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{mr:1,width:"min-content",content:u.ratingmin,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmin")}})}),(0,o.createComponentVNode)(2,l.FlexItem,{children:"To"}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{ml:1,width:"min-content",content:u.ratingmax,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmax")}})})]})})]})]}),(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_search_category",{category_id:p[e]})}})})})}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return c("toggle_search_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Search",icon:"eraser",onClick:function(){return c("clear_search")}}),u.ckey?(0,o.createComponentVNode)(2,a.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return c("clear_ckey_search")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Find My Books",icon:"search",onClick:function(){return c("find_users_books",{user_ckey:m})}})]})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.external_booklist,u=l.archive_pagenumber,s=l.num_pages,p=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Book System Access",children:[(0,o.createComponentVNode)(2,m),(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",disabled:1===u,onClick:function(){return c("deincrementpagemax")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",disabled:1===u,onClick:function(){return c("deincrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{bold:!0,content:u,onClick:function(){return(0,i.modalOpen)(t,"setpagenumber")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",disabled:u===s,onClick:function(){return c("incrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",disabled:u===s,onClick:function(){return c("incrementpagemax")}})],4),(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ratings"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Category"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===p&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_external_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},e.id)}))]})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.programmatic_booklist,u=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Corporate Book Catalog",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e,n){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:2}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===u&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_programmatic_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},n)}))]})})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.selectedbook,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Section,{title:"Book System Upload",children:[u.copyright?(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Uploader"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_upload_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,disabled:u.copyright,selected:!0,icon:"unlink",onClick:function(){return c("toggle_upload_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",disabled:u.copyright,content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:u.summary})]})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,mt:16,icon:"upload",width:"auto",disabled:u.copyright,content:"Upload Book",onClick:function(){return c("uploadbook",{user_ckey:m})}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.checkout_data;return(0,o.createComponentVNode)(2,a.Section,{title:"Checked Out Books",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Patron"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-tag"}),e.patron_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return c("reportlost",{libraryid:e.libraryid})}})})]},t)}))]})})},N=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.inventory_list);return(0,o.createComponentVNode)(2,a.Section,{title:"Library Inventory",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"LIB ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"})]}),c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.libraryid}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"})," ",e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},t)}))]})})};(0,i.modalRegisterBodyOverride)("expand_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=e.args,u=l.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:d.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:d.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:d.summary}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[d.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!d.isProgrammatic&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Categories",children:d.categories.join(", ")})]}),(0,o.createVNode)(1,"br"),u===d.ckey&&(0,o.createComponentVNode)(2,a.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:d.isProgrammatic,onClick:function(){return c("delete_book",{bookid:d.id,user_ckey:u})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Report Book",icon:"flag",color:"red",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"report_book",{bookid:d.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"rate_info",{bookid:d.id})}})]})})),(0,i.modalRegisterBodyOverride)("report_book",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,d=i.selected_report,u=i.report_categories,s=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Report this book for Rule Violations",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reasons",children:(0,o.createComponentVNode)(2,a.Box,{children:u.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:e.category_id===d,onClick:function(){return c("set_report",{report_type:e.category_id})}}),(0,o.createVNode)(1,"br")],4,t)}))})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return c("submit_report",{bookid:l.id,user_ckey:s})}})]})})),(0,i.modalRegisterBodyOverride)("rate_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,u=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:l.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[l.current_rating?l.current_rating:0,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Ratings",children:l.total_ratings?l.total_ratings:0})]}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return c("rate_book",{bookid:l.id,user_ckey:u})}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30);t.LibraryManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,l)})]})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act;switch(n.data.pagestate){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,i.modalOpen)(t,"specify_ssid_delete")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_delete")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_search")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return c("view_reported_books")}})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reports;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"All Reported Books",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Uploader CKEY"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Report Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reporter Ckey"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.uploader_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.report_description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.reporter_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return c("unflag_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.ckey,d=i.booklist;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"Books uploaded by ",l,(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MODsuitContent=t.MODsuit=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.NumberInput,{value:c,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(e,t){return l("configure",{key:n,value:t,ref:i})}})},l=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:c,onClick:function(){return l("configure",{key:n,value:!c,ref:i})}})},d=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"paint-brush",onClick:function(){return l("configure",{key:n,ref:i})}}),(0,o.createComponentVNode)(2,a.ColorBox,{color:c,mr:.5})],4)},u=function(e,t){var n=e.name,c=e.value,i=e.values,l=e.module_ref,d=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Dropdown,{displayText:c,options:i,onSelected:function(e){return d("configure",{key:n,value:e,ref:l})}})},s=function(e,t){e.name;var n=e.display_name,r=e.type,c=(e.value,e.values,e.module_ref,{number:(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,Object.assign({},e))),bool:(0,o.normalizeProps)((0,o.createComponentVNode)(2,l,Object.assign({},e))),color:(0,o.normalizeProps)((0,o.createComponentVNode)(2,d,Object.assign({},e))),list:(0,o.normalizeProps)((0,o.createComponentVNode)(2,u,Object.assign({},e)))});return(0,o.createComponentVNode)(2,a.Box,{children:[n,": ",c[r]]})},m={rad_counter:function(e,t){var n=e.active,r=e.userradiated,c=e.usertoxins,i=e.usermaxtoxins,l=e.threatlevel;return(0,o.createComponentVNode)(2,a.Flex,{fill:!0,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Level",color:n&&r?"bad":"good",children:n&&r?"IRRADIATED!":"RADIATION-FREE"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxins Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?c/i:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Hazard Level",color:n&&l?"bad":"good",bold:!0,children:n&&l?l:0})})]})},health_analyzer:function(e,t){var n=e.active,r=e.userhealth,c=e.usermaxhealth,i=e.userbrute,l=e.userburn,d=e.usertoxin,u=e.useroxy;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?r/c:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?r:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?l/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?l:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})})]})],4)},status_readout:function(e,t){var n=e.active,r=e.statustime,c=e.statusid,i=e.statushealth,l=e.statusmaxhealth,d=e.statusbrute,u=e.statusburn,s=e.statustoxin,m=e.statusoxy,p=e.statustemp,h=e.statusnutrition,f=e.statusfingerprints,C=e.statusdna,N=e.statusviruses;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Time",children:n?r:"00:00:00"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Number",children:n?c||"0":"???"})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/l:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?s/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?m/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})})})]}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Body Temperature",children:n?p:0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Nutrition Status",children:n?h:0})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"DNA",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:n?f:"???"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:n?C:"???"})]})}),!!n&&!!N&&(0,o.createComponentVNode)(2,a.Section,{title:"Diseases",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.stage,"/",e.maxstage]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cure})]},e.name)}))]})})],0)}},p=function(){return(0,o.createComponentVNode)(2,a.Section,{align:"center",fill:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},h=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},f=function(e,t){var n=e.configuration_data,r=e.module_ref,c=Object.keys(n);return(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[c.map((function(e){var t=n[e];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,s,{name:e,display_name:t.display_name,type:t.type,value:t.value,values:t.values,module_ref:r})},t.key)})),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:e.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},C=function(e){switch(e){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.malfunctioning,u=i.locked,s=i.open,m=i.selected_module,p=i.complexity,h=i.complexity_max,f=i.wearer_name,C=i.wearer_job,N=d?"Malfunctioning":l?"Active":"Inactive";return(0,o.createComponentVNode)(2,a.Section,{title:"Parameters",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l?"Deactivate":"Activate",onClick:function(){return c("activate")}}),children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock-open":"lock",content:u?"Unlock":"Lock",onClick:function(){return c("lock")}}),children:u?"Locked":"Unlocked"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover",children:s?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected Module",children:m||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[p," (",h,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:[f,", ",C]})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.active,c.control),l=c.helmet,d=c.chestplate,u=c.gauntlets,s=c.boots,m=c.core,p=c.charge;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:[(0,o.createComponentVNode)(2,a.Collapsible,{title:"Parts",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Control Unit",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:l||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestplate",children:d||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",children:u||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",children:s||"None"})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Type",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/100,content:p+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},V=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.active,l=c.modules.filter((function(e){return!!e.id}));return(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==l.length&&l.map((function(e){var t=m[e.id];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[!i&&(0,o.createComponentVNode)(2,h),(0,o.normalizeProps)((0,o.createComponentVNode)(2,t,Object.assign({},e,{active:i})))]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.complexity_max,d=i.modules,u=(0,r.useLocalState)(t,"module_configuration",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Modules",fill:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:e.module_name,children:(0,o.createComponentVNode)(2,a.Section,{children:[s===e.ref&&(0,o.createComponentVNode)(2,f,{configuration_data:e.configuration_data,module_ref:e.ref,onExit:function(){return m(null)}}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.module_complexity,"/",l]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.idle_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.active_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.use_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.cooldown>0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:C(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return m(e.ref)},icon:"cog",selected:s===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===e.configuration_data.length}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,o.createComponentVNode)(2,a.Box,{children:e.description})]})})},e.ref)}))||(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Modules Detected"})})})})},v=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.ui_theme,c.interface_break);return(0,o.createComponentVNode)(2,a.Section,{children:!!i&&(0,o.createComponentVNode)(2,p)||(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,N)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,b)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,g)})]})})};t.MODsuitContent=v;t.MODsuit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),i=a.ui_theme,l=a.interface_break;return(0,o.createComponentVNode)(2,c.Window,{theme:i,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!l,children:(0,o.createComponentVNode)(2,v)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell,s=d&&d.name;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(16),n(1)),a=n(2),c=n(3),i=n(20);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return s.length?(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,i.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,i.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(30),l=n(34),d=n(3),u=n(123),s=n(124),m=n(169),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},h={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},f=function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,r=(0,a.useBackend)(t).data,l=r.loginState,p=r.screen;return l.logged_in?(2===p?n=(0,o.createComponentVNode)(2,C):3===p?n=(0,o.createComponentVNode)(2,N):4===p?n=(0,o.createComponentVNode)(2,b):5===p?n=(0,o.createComponentVNode)(2,v):6===p&&(n=(0,o.createComponentVNode)(2,y)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,k),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.records,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],p=(0,a.useLocalState)(t,"sortId","name"),f=p[0],C=(p[1],(0,a.useLocalState)(t,"sortOrder",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){return i("screen",{screen:3})}})}),(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Physical Status, or Mental Status",width:"100%",onInput:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,x,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,x,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,x,{id:"p_stat",children:"Patient Status"}),(0,o.createComponentVNode)(2,x,{id:"m_stat",children:"Mental Status"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.p_stat+"|"+e.m_stat}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listRow--"+h[e.p_stat],onClick:function(){return i("view_record",{view_record:e.ref})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.p_stat}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.m_stat})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all_med_records")}})],0)},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.medical,d=i.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Record",ml:"0.5rem",onClick:function(){return r("print_record")}}),children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,c.Section,{title:"Medical Data",level:2,buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",onClick:function(){return r("del_med_record")}}),children:(0,o.createComponentVNode)(2,g)})],4)},V=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,c.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return f(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return f(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,i.modalOpen)(t,"add_comment")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return r("del_comment",{del_comment:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return r("new_med_record")}})]})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.virus,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],h=(0,a.useLocalState)(t,"sortId2","name"),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sortOrder2",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, Max Stages, or Severity",width:"100%",onInput:function(e,t){return m(t)}})})}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,_,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,_,{id:"max_stages",children:"Max Stages"}),(0,o.createComponentVNode)(2,_,{id:"severity",children:"Severity"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.max_stages+"|"+e.severity}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listVirus--"+e.severity,onClick:function(){return i("vir",{vir:e.D})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"virus"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.max_stages}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:p[e.severity],children:e.severity})]},e.id)}))]})})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.medbots);return 0===r.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"There are no Medibots."}):(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Chemicals"})]}),r.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listMedbot--"+e.on,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"medical"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.on?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,c.Box,{color:"average",children:"Offline"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer"})]},e.id)}))]})})})},x=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},_=function(e,t){var n=(0,a.useLocalState)(t,"sortId2","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder2",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},k=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){r("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:5===l,onClick:function(){r("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:6===l,onClick:function(){return r("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"plus-square"}),"Medibot Tracking"]}),3===l&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wrench"}),"Record Maintenance"]}),4===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Severity",color:p[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MerchVendor=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productImage,u=e.productCategory,s=i.user_money;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{disabled:l.price>s,icon:"shopping-cart",content:l.price,textAlign:"left",onClick:function(){return c("purchase",{name:l.name,category:u})}})})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1)[0],i=n.products,d=n.imagelist,u=["apparel","toy","decoration"];return(0,o.createComponentVNode)(2,a.Table,{children:i[u[c]].map((function(e){return(0,o.createComponentVNode)(2,l,{product:e,productImage:d[e.path],productCategory:u[c]},e.name)}))})};t.MerchVendor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.user_cash,p=s.inserted_cash;return(0,o.createComponentVNode)(2,i.Window,{title:"Merch Computer",resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[(0,o.createComponentVNode)(2,a.Box,{m:2,children:"Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives."}),null!==m&&(0,o.createComponentVNode)(2,a.Box,{children:["Your balance is ",(0,o.createVNode)(1,"b",null,[m||0,(0,o.createTextVNode)(" credits")],0),"."]}),(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Box,{color:"light-grey",children:["There is ",(0,o.createVNode)(1,"b",null,p,0)," credits inserted."]})}),(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return l("change")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})]})})};var u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1),i=c[0],l=c[1];n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:"Toys"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:"Decorations"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3),l=["title","items"];var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_id,d=i.id;return(0,o.createComponentVNode)(2,c.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",d.name,".",(0,o.createVNode)(1,"br"),"You have ",d.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,c.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},s=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.has_id,u=i.id,s=i.items,m=(0,a.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,a.useLocalState)(t,"sort","Alphabetical")),C=f[0],N=(f[1],(0,a.useLocalState)(t,"descending",!1)),b=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),g=!1,v=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=l&&u.points>=e[1].price,e[1]})).sort(d[C]);if(0!==n.length)return b&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Section,{children:g?v:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No items matching your criteria was found!"})})})},m=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),i=(0,a.useLocalState)(t,"sort",""),l=(i[0],i[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,d=e.title,u=e.items,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Collapsible,Object.assign({open:!0,title:d},s,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,c.Button,{disabled:!i.has_id||i.id.points0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+l+'"':"\u0412\u0441\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438",fill:!0,children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"100%",width:"100%",display:"inline-block",children:a.filter((function(e){return e.name&&(!(l.length>0)||(e.name.toLowerCase().includes(l.toLowerCase())||e.desc.toLowerCase().includes(l.toLowerCase())||e.author.toLowerCase().includes(l.toLowerCase())))})).map((function(e){return(0,o.createComponentVNode)(2,c.Collapsible,{title:e.name,children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0410\u0432\u0442\u043e\u0440\u044b",children:e.author}),(0,o.createComponentVNode)(2,c.Section,{title:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",children:e.desc})]},e.name)}))})})})]})};t.ModpacksListContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NTRecruiter=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.NTRecruiter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.gamestatus,s=d.cand_name,m=d.cand_gender,p=d.cand_age,h=d.cand_species,f=d.cand_planet,C=d.cand_job,N=d.cand_records,b=d.cand_curriculum,V=d.total_curriculums,g=d.reason;return 0===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"31px",color:"white",pb:"10px",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]}),(0,o.createComponentVNode)(2,a.Button,{mt:"50px",textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return l("start_game")}}),(0,o.createComponentVNode)(2,a.Button,{mt:"10px",textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return l("instructions")}})]})})}):1===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{color:"grey",title:"Guide",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss"," ",(0,o.createVNode)(1,"b",null,V,0)," candidates, one wrongly made choice leads to a game over."]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"3#",color:"silver",children:[(0,o.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,o.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"7#",color:"silver",children:["Pay attention to ",(0,o.createVNode)(1,"b",null,"typos",16)," and ",(0,o.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for ",(0,o.createVNode)(1,"b",null,"jobs",16)," that they"," ",(0,o.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,o.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]})]})})})}):2===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",b]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Name",color:"silver",children:(0,o.createVNode)(1,"b",null,s,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Gender",color:"silver",children:(0,o.createVNode)(1,"b",null,m,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Age",color:"silver",children:(0,o.createVNode)(1,"b",null,p,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Species",color:"silver",children:(0,o.createVNode)(1,"b",null,h,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Planet of Origin",color:"silver",children:(0,o.createVNode)(1,"b",null,f,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Requested Job",color:"silver",children:(0,o.createVNode)(1,"b",null,C,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Employment Records",color:"silver",children:(0,o.createVNode)(1,"b",null,N,0)})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Stamp the application!",color:"grey",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{float:"right",color:"green",content:"Hire",fontSize:"150%",width:"49%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return l("hire")}}),(0,o.createComponentVNode)(2,a.Button,{float:"left",color:"red",content:"Dismiss",fontSize:"150%",width:"49%",icon:"ban",lineHeight:4.5,onClick:function(){return l("dismiss")}})]})]})}):3===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"15px",color:"label",textAlign:"center",children:g}),(0,o.createComponentVNode)(2,a.Flex.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",b-1,"/",V]}),(0,o.createComponentVNode)(2,a.Flex.Item,{pt:"20px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:2,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}})})]})})}):void 0}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(44),l=n(3),d=n(30),u=n(169),s=["icon","iconSpin","selected","security","onClick","title","children"],m=["name"];function p(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var h=["security","engineering","medical","science","service","supply"],f={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,i=(0,a.useBackend)(t),s=i.act,m=i.data,p=m.is_security,h=m.is_admin,f=m.is_silent,V=m.is_printing,g=m.screen,y=m.channels,x=m.channel_idx,_=void 0===x?-1:x,k=(0,a.useLocalState)(t,"menuOpen",!1),L=k[0],B=k[1],w=(0,a.useLocalState)(t,"viewingPhoto",""),S=w[0],I=(w[1],(0,a.useLocalState)(t,"censorMode",!1)),T=I[0],A=I[1];0===g||2===g?n=(0,o.createComponentVNode)(2,N):1===g&&(n=(0,o.createComponentVNode)(2,b));var E=y.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:p&&"security",children:[S?(0,o.createComponentVNode)(2,v):(0,o.createComponentVNode)(2,d.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",L&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,C,{icon:"bars",title:"Toggle Menu",onClick:function(){return B(!L)}}),(0,o.createComponentVNode)(2,C,{icon:"newspaper",title:"Headlines",selected:0===g,onClick:function(){return s("headlines")},children:E>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:E>=10?"9+":E})}),(0,o.createComponentVNode)(2,C,{icon:"briefcase",title:"Job Openings",selected:1===g,onClick:function(){return s("jobs")}}),(0,o.createComponentVNode)(2,c.Divider)]}),(0,o.createComponentVNode)(2,c.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:y.map((function(e){return(0,o.createComponentVNode)(2,C,{icon:e.icon,title:e.name,selected:2===g&&y[_-1]===e,onClick:function(){return s("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,c.Divider),(!!p||!!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,C,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,C,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return A(!T)}}),(0,o.createComponentVNode)(2,c.Divider)],4),(0,o.createComponentVNode)(2,C,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,C,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,d.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,c.Divider),(0,o.createComponentVNode)(2,C,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return s("print_newspaper")}}),(0,o.createComponentVNode)(2,C,{icon:f?"volume-mute":"volume-up",title:"Mute: "+(f?"On":"Off"),onClick:function(){return s("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,u.TemporaryNotice),n]})]})})]})};var C=function(e,t){(0,a.useBackend)(t).act;var n=e.icon,i=void 0===n?"":n,l=e.iconSpin,d=e.selected,u=void 0!==d&&d,m=e.security,h=void 0!==m&&m,f=e.onClick,C=e.title,N=e.children,b=p(e,s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",u&&"Newscaster__menuButton--selected",h&&"Newscaster__menuButton--security"]),onClick:f},b,{children:[u&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,c.Icon,{name:i,spin:l,size:"2"}),(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--title",children:C}),N]})))},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,u=i.is_admin,s=i.channel_idx,m=i.channel_can_manage,p=i.channels,h=i.stories,f=i.wanted,C=(0,a.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,a.useLocalState)(t,"censorMode",!1)),g=b[0],v=(b[1],2===l&&s>-1?p[s-1]:null);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,V,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,V,{story:e},e)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([g&&(0,o.createComponentVNode)(2,c.Button,{disabled:!!v.admin&&!u,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!m,icon:"cog",content:"Manage",onClick:function(){return(0,d.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),!!u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ckey",children:v.author_ckey}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},b=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.jobs,d=i.wanted,u=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!d&&(0,o.createComponentVNode)(2,V,{story:d,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:u>0?h.map((function(e){return Object.assign({},f[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},V=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=e.story,s=e.wanted,m=void 0!==s&&s,p=d.is_admin,h=(0,a.useLocalState)(t,"fullStories",[]),f=h[0],C=h[1],N=(0,a.useLocalState)(t,"censorMode",!1),b=N[0];N[1];return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__story",m&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&u.censor_flags?"[REDACTED]":u.title)||"News from "+u.author],0),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[!m&&b&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,o.createComponentVNode)(2,c.Button,{enabled:2&u.censor_flags,icon:2&u.censor_flags?"comment-slash":"comment",content:2&u.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:u.uid})}})}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",u.author," |\xa0",!!p&&(0,o.createFragment)([(0,o.createTextVNode)("ckey: "),u.author_ckey,(0,o.createTextVNode)(" |\xa0")],0),!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),u.view_count.toLocaleString(),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("|\xa0")],0),(0,o.createComponentVNode)(2,c.Icon,{name:"clock"})," ",(0,i.timeAgo)(u.publish_time,d.world_time)]})]})}),children:(0,o.createComponentVNode)(2,c.Box,{children:2&u.censor_flags?"[REDACTED]":(0,o.createFragment)([!!u.has_photo&&(0,o.createComponentVNode)(2,g,{name:"story_photo_"+u.uid+".png",float:"right",ml:"0.5rem"}),(u.body_short||u.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),u.body_short&&(0,o.createComponentVNode)(2,c.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return C([].concat(f,[u.uid]))}}),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})],0)})})},g=function(e,t){var n=e.name,r=p(e,m),i=(0,a.useLocalState)(t,"viewingPhoto",""),l=(i[0],i[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},v=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||i){var l="manage_channel"===e.id,u=!!e.args.is_admin,s=e.args.scanned_user,m=(0,a.useLocalState)(t,"author",(null==i?void 0:i.author)||s||"Unknown"),p=m[0],h=m[1],f=(0,a.useLocalState)(t,"name",(null==i?void 0:i.name)||""),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"description",(null==i?void 0:i.description)||""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"icon",(null==i?void 0:i.icon)||"newspaper"),y=v[0],x=v[1],_=(0,a.useLocalState)(t,"isPublic",!!l&&!(null==i||!i["public"])),k=_[0],L=_[1],B=(0,a.useLocalState)(t,"adminLocked",1===(null==i?void 0:i.admin)||!1),w=B[0],S=B[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+i.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!u,width:"100%",value:p,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return N(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:V,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,c.Input,{disabled:!u,value:y,width:"35%",mr:"0.5rem",onInput:function(e,t){return x(t)}}),(0,o.createComponentVNode)(2,c.Icon,{name:y,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,c.Button,{selected:k,icon:k?"toggle-on":"toggle-off",content:k?"Yes":"No",onClick:function(){return L(!k)}})}),u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:w,icon:w?"lock":"lock-open",content:w?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return S(!w)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===p.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:p,name:C.substr(0,49),description:V.substr(0,128),icon:y,"public":k?1:0,admin_locked:w?1:0}),(0,a.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,d.modalClose)(t)};(0,d.modalRegisterBodyOverride)("create_channel",y),(0,d.modalRegisterBodyOverride)("manage_channel",y),(0,d.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.channels,s=i.channel_idx,m=void 0===s?-1:s,p=!!e.args.is_admin,h=e.args.scanned_user,f=u.slice().sort((function(e,t){if(m<0)return 0;var n=u[m-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return p||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,a.useLocalState)(t,"author",h||"Unknown"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],y=V[1],x=(0,a.useLocalState)(t,"title",""),_=x[0],k=x[1],L=(0,a.useLocalState)(t,"body",""),B=L[0],w=L[1],S=(0,a.useLocalState)(t,"adminLocked",!1),I=S[0],T=S[1];return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!p,width:"100%",value:N,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return y(e)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Divider),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:_,onInput:function(e,t){return k(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:B,onInput:function(e,t){return w(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,title:_,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"}),B.split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})]})})}),p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:I,icon:I?"lock":"lock-open",content:I?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return T(!I)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===N.trim().length||0===v.trim().length||0===_.trim().length||0===B.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,"create_story","",{author:N,channel:v,title:_.substr(0,127),body:B.substr(0,1023),admin_locked:I?1:0}),(0,a.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,d.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.wanted,s=!!e.args.is_admin,m=e.args.scanned_user,p=(0,a.useLocalState)(t,"author",(null==u?void 0:u.author)||m||"Unknown"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"name",(null==u?void 0:u.title.substr(8))||""),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"description",(null==u?void 0:u.body)||""),v=V[0],y=V[1],x=(0,a.useLocalState)(t,"adminLocked",1===(null==u?void 0:u.admin_locked)||!1),_=x[0],k=x[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!s,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",value:N,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return y(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:_,icon:_?"lock":"lock-open",content:_?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return k(!_)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!u,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,d.modalClose)(t),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===h.trim().length||0===N.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:h,name:N.substr(0,127),description:v.substr(0,511),admin_locked:_?1:0}),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return i("auth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return i("code")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){return i("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return i("set_time")}})})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return i("toggle_safety")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,a.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return i("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return i("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(16),a=n(1),c=n(3),i=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.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,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,i.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.verbose,d=c.health,u=c.healthAlarm,s=c.oxy,m=c.oxyAlarm,p=c.crit;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,i.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:u,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:m,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},p=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(u),a=o.match(u);return r&&a&&n.replace(u,"")===o.replace(u,"")?parseInt(r[1],10)-parseInt(a[1],10):m(n,o)},h=function(e,t){var n=e.searchText,r=e.source,a=e.title,i=e.color,l=e.sorted,d=r.filter(s(n));return l&&d.sort(p),r.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:a+" - ("+r.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,f,{thing:e,color:i},e.name)}))})},f=function(e,t){var n=(0,a.useBackend)(t).act,r=e.color,i=e.thing;return(0,o.createComponentVNode)(2,c.Button,{color:r,onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,a.useBackend)(t),d=r.act,u=r.data,C=u.alive,N=u.antagonists,b=u.highlights,V=u.response_teams,g=(u.auto_observe,u.dead),v=u.ghosts,y=u.misc,x=u.npcs,_=(0,a.useLocalState)(t,"searchText",""),k=_[0],L=_[1],B={},w=l(N);!(n=w()).done;){var S=n.value;B[S.antag]===undefined&&(B[S.antag]=[]),B[S.antag].push(S)}var I=Object.entries(B);I.sort((function(e,t){return m(e[0],t[0])}));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:k,onInput:function(e,t){return L(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[I.map((function(e){return e[0],e[1]})),b,C,v,g,x,y];t0&&(0,o.createComponentVNode)(2,c.Section,{title:"Antagonists",children:I.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,c.Section,{title:t+" - ("+n.length+")",level:2,children:n.filter(s(k)).sort(p).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),b.length>0&&(0,o.createComponentVNode)(2,h,{title:"Highlights",source:b,searchText:k,color:"teal"}),(0,o.createComponentVNode)(2,h,{title:"Response Teams",source:V,searchText:k,color:"purple"}),(0,o.createComponentVNode)(2,h,{title:"Alive",source:C,searchText:k,color:"good"}),(0,o.createComponentVNode)(2,h,{title:"Ghosts",source:v,searchText:k,color:"grey"}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:g,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:x,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:y,searchText:k,sorted:!1})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"43%"}),(0,o.createComponentVNode)(2,s,{height:"57%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.id,u=i.points,s=i.disk,m=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({},m,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID card",children:d?(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:d.name,tooltip:"Ejects the ID card.",onClick:function(){return c("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return c("insert_id")}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.points)})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.total_points)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed Points",color:u>0?"good":"grey",bold:u>0&&"good",children:l(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"hand-holding-usd",content:"Claim",onClick:function(){return c("claim")}})})]}),(0,o.createComponentVNode)(2,a.Divider),s?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,icon:"eject",content:s.name,tooltip:"Ejects the design disk.",onClick:function(){return c("eject_disk")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,a.Box,{color:s.design&&(s.compatible?"good":"bad"),children:s.design||"N/A"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!s.design||!s.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return c("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.sheets),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,p,{ore:e},e.id)}))]})))},s=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.alloys),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,a.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)}))]})})},p=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore;if(!(c.value&&c.amount<=0)||["$metal","$glass"].indexOf(c.id)>-1){var i=c.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+i+".png",verticalAlign:"middle",ml:"0rem"}),c.name]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",color:c.amount>=1?"good":"gray",bold:c.amount>=1,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:c.value}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.ore,l=i.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,c.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:i.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",textAlign:"middle",color:i.amount>=1?"good":"gray",align:"center",children:i.description}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"10%",textAlign:"center",color:i.amount>=1?"good":"gray",bold:i.amount>=1,align:"center",children:i.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(i.amount,50),stepPixelSize:6,onChange:function(e,t){return n(i.value?"sheet":"alloy",{id:i.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(623);t.PAI=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.app_template,m=u.app_icon,p=u.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(s);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m,mr:1}),p,"pai_main_menu"!==s&&(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return d("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_atmosphere.js":624,"./pai_bioscan.js":625,"./pai_directives.js":626,"./pai_doorjack.js":627,"./pai_main_menu.js":628,"./pai_manifest.js":629,"./pai_medrecords.js":630,"./pai_messenger.js":631,"./pai_radio.js":632,"./pai_secrecords.js":633,"./pai_signaler.js":634};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=623},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),a=n(230);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.AtmosScan,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),a=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.app_data),i=c.holder,l=c.dead,d=c.health,u=c.brute,s=c.oxy,m=c.tox,p=c.burn;c.temp;return i?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"green",children:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"red",children:u})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),a=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.master,d=i.dna,u=i.prime,s=i.supplemental;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master",children:l?l+" ("+d+")":"None"}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return c("getdna")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prime Directive",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplemental Directives",children:s||"None"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),a=n(2);t.pai_doorjack=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data.app_data,u=d.cable,s=d.machine,m=d.inprogress,p=d.progress;d.aborted;return n=s?(0,o.createComponentVNode)(2,a.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,a.Button,{content:u?"Extended":"Retracted",color:u?"orange":null,onClick:function(){return l("cable")}}),s&&(c=(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[67,Infinity],average:[33,67],bad:[-Infinity,33]},value:p,maxValue:100}),m?(0,o.createComponentVNode)(2,a.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cable",children:n}),c]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),a=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.available_software,d=i.installed_software,u=i.installed_toggles,s=i.available_ram,m=i.emotions,p=i.current_emotion,h=[];return d.map((function(e){return h[e.key]=e.name})),u.map((function(e){return h[e.key]=e.name})),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available RAM",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!h[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>s,onClick:function(){return c("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!h[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Software",children:[d.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,onClick:function(){return c("startSoftware",{software_key:e.key})}},e.key)})),0===d.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Toggles",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return c("setToggle",{toggle_key:e.key})}},e.key)})),0===u.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Emotion",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.id===p,onClick:function(){return c("setEmotion",{emotion:e.id})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.CrewManifest,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),a=n(231);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return c.app_data.active_convo?(0,o.createComponentVNode)(2,a.ActiveConversation,{data:c.app_data}):(0,o.createComponentVNode)(2,a.MessengerList,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),a=n(16),c=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.app_data,d=l.minFrequency,u=l.maxFrequency,s=l.frequency,m=l.broadcasting;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,a.toFixed)(e,1)},onChange:function(e,t){return i("freq",{freq:t})}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return i("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return i("toggleBroadcast")},selected:m,content:m?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),a=n(170);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Signaler,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(636);t.PDA=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data),m=s.app;if(!s.owner)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var p=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(m.template);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m.icon,mr:1}),m.name]}),p:1,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.idInserted,d=i.idLink,u=i.stationTime,s=i.cartridge_name;return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",color:"transparent",onClick:function(){return c("Authenticate")},content:d})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),s?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sd-card",color:"transparent",onClick:function(){return c("Eject")},content:"Eject "+s})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:u})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app;return(0,o.createComponentVNode)(2,a.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return c("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){c("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":637,"./pda_janitor.js":638,"./pda_main_menu.js":639,"./pda_manifest.js":640,"./pda_medical.js":641,"./pda_messenger.js":231,"./pda_mob_hunt.js":642,"./pda_mule.js":643,"./pda_nanobank.js":644,"./pda_notes.js":645,"./pda_power.js":646,"./pda_secbot.js":647,"./pda_security.js":648,"./pda_signaler.js":649,"./pda_status_display.js":650,"./pda_supplyrecords.js":651};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=636},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),a=n(230);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.janitor),i=c.user_loc,l=c.mops,d=c.buckets,u=c.cleanbots,s=c.carts;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:[i.x,",",i.y]}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Bucket Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cleanbot Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(16),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.owner,d=i.ownjob,u=i.idInserted,s=i.categories,m=i.pai,p=i.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return c("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=i.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.uid in p?e.notify_icon:e.icon,iconSpin:e.uid in p,color:e.uid in p?"red":"transparent",content:e.name,onClick:function(){return c("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return c("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return c("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),a=n(127);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.wild_captures,u=i.no_collection,s=i.entry;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return c("Disconnect")}})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return c("Reconnect")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Wild Captures",children:d})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,a.Box,{children:!u&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return c("Prev")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Next",icon:"arrow-right",onClick:function(){return c("Next")}})]})}),children:u?"Your collection is empty! Go capture some Nano-Mobs!":s?(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:s.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[s.nickname&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nickname",children:s.nickname}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.real_name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:s.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Type",children:s.type1}),s.type2&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Type",children:s.type2}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return c("Transfer")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Release",icon:"arrow-up",onClick:function(){return c("Release")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return c("Rename")}}),!!s.is_hacked&&(0,o.createComponentVNode)(2,a.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return c("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,a.Box,{children:l?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.mulebot.bots.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.Name,icon:"cog",onClick:function(){return c("control",{bot:e.uid})}})},e.Name)}))},i=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.mulebot,d=l.botstatus,u=l.active,s=d.mode,m=d.loca,p=d.load,h=d.powr,f=d.dest,C=d.home,N=d.retn,b=d.pick;switch(s){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=s}return(0,o.createComponentVNode)(2,a.Section,{title:u,children:[-1===s&&(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,a.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return i("target")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,a.Button,{content:p?p+" (Unload)":"None",disabled:!p,onClick:function(){return i("unload")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,a.Button,{content:b?"Yes":"No",selected:b,onClick:function(){return i("set_pickup_type",{autopick:b?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return i("set_auto_return",{autoret:N?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Stop",icon:"stop",onClick:function(){return i("stop")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Proceed",icon:"play",onClick:function(){return i("start")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Return Home",icon:"home",onClick:function(){return i("home")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_nanobank=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34);t.pda_nanobank=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.logged_in,u=r.owner_name,s=r.money;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Name",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:["$",s]})]})}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})],4):(0,o.createComponentVNode)(2,p)};var l=function(e,t){(0,a.useBackend)(t).data;var n=(0,a.useLocalState)(t,"tabIndex",1),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Tabs,{mt:2,children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transfers"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Account Actions"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transaction History"]})]})},d=function(e,t){var n=(0,a.useLocalState)(t,"tabIndex",1)[0];if(!(0,a.useBackend)(t).data.db_status)return(0,o.createComponentVNode)(2,c.Box,{children:"Account Database Connection Severed"});switch(n){case 1:return(0,o.createComponentVNode)(2,u);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},u=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.requests,s=d.available_accounts,m=d.money,p=(0,a.useLocalState)(t,"selectedAccount"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"transferAmount"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"searchText",""),g=V[0],v=V[1],y=[];return s.map((function(e){return y[e.name]=e.UID})),(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account",children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account name",onInput:function(e,t){return v(t)}}),(0,o.createComponentVNode)(2,c.Dropdown,{mt:.6,width:"190px",options:s.filter((0,r.createSearch)(g,(function(e){return e.name}))).map((function(e){return e.name})),selected:null==(n=s.filter((function(e){return e.UID===h}))[0])?void 0:n.name,onSelected:function(e){return f(y[e])}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Amount",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Up to 5000",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:m0&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Approved Orders",children:s>0&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(125);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.active,s=d.anchored,m=d.broken,p=d.emagged,h=d.fuel_type,f=d.fuel_usage,C=d.fuel_stored,N=d.fuel_cap,b=d.is_ai,V=d.tmp_current,g=d.tmp_max,v=d.tmp_overheat,y=d.output_max,x=d.power_gen,_=d.output_set,k=d.has_fuel,L=C/N,B=V/g,w=_*x,S=Math.round(C/f),I=Math.round(S/60),T=S>120?I+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(m||!s)&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[!!m&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator is malfunctioning!"}),!m&&!s&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!m&&!!s&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:u,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,a.NumberInput,{value:_,minValue:1,maxValue:y*(p?2.5:1),step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,i.formatPower)(w),")"]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:B,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[V," \u2103"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[v>50&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Temperature High"}),0===v&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||b||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:L,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(C/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel usage",children:[f/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(f?T:"N/A"),!k&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength,m=l.max_strength;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Control Panel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Connect",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",mb:"5px",children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Operational":"Error: Verify Configuration"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d||0===s,onClick:function(){return i("remove_strength")},mr:"4px"}),s,(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d||s===m,onClick:function(){return i("add_strength")},ml:"4px"})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PdaPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PdaPainter=function(e,t){var n=(0,r.useBackend)(t).data.has_pda;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:n?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Section,{height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"download",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.pda_colors;return(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"180px",mr:"3px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"65%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{className:"PdaPainter__list",children:Object.keys(i).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("choose_pda",{selectedPda:e})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+i[e][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e})]},e)}))})})})})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.current_appearance,d=i.preview_appearance;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current PDA",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return c("eject_pda")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return c("paint_pda")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Preview",children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.busy,m=u.category,p=u.display_craftable_only,h=u.display_compact,f=u.prev_cat,C=u.next_cat,N=u.subcategory,b=u.prev_subcat,V=u.next_subcat;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,a.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Show Craftable Only",icon:p?"check-square-o":"square-o",selected:p,onClick:function(){return d("toggle_recipes")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return d("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:f,icon:"arrow-left",onClick:function(){return d("backwardCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:C,icon:"arrow-right",onClick:function(){return d("forwardCat")}})]}),N&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:b,icon:"arrow-left",onClick:function(){return d("backwardSubCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:V,icon:"arrow-right",onClick:function(){return d("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Photocopier",color:"silver",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Copies",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{width:"2em",bold:!0,children:u.copynumber}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",content:"",onClick:function(){return d("minus")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",content:"",onClick:function(){return d("add")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toner",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:u.toner})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Document",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.copyitem&&!u.mob,content:u.copyitem?u.copyitem:u.mob?u.mob+"'s ass!":"document",onClick:function(){return d("removedocument")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Folder",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.folder,content:u.folder?u.folder:"folder",onClick:function(){return d("removefolder")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.issilicon;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){return c("copy")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){return c("scandocument")}}),!!i&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print from database",onClick:function(){return c("ai_pic")}})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Scanned Files",children:i.files.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:i.toner<=0,onClick:function(){return c("filecopy",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return c("deletefile",{uid:e.uid})}})]})},e.name)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier220=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(26),l=n(34),d=n(42),u=n(20);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne?this.substring(0,e)+"...":this};t.Photocopier220=function(e,t){for(var n,m,p=(0,r.useBackend)(t),h=p.act,f=p.data,C=(0,r.useLocalState)(t,"searchText",""),N=C[0],b=C[1],V=function(e,t){void 0===t&&(t="");var n=(0,u.createSearch)(t,(function(e){return e.altername}));return(0,d.flow)([(0,i.filter)((function(e){return null==e?void 0:e.altername})),t&&(0,i.filter)(n),(0,i.sortBy)((function(e){return e.id}))])(e)}((0,i.sortBy)((function(e){return e.category}))(f.forms||[]),N),g=[],v=s(V);!(n=v()).done;){var y=n.value;g.includes(y.category)||g.push(y.category)}return m=""===f.category?V:V.filter((function(e){return e.category===f.category})),(0,o.createComponentVNode)(2,c.Window,{theme:f.ui_theme,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:24,shrink:0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"grey",children:"\u0417\u0430\u0440\u044f\u0434 \u0442\u043e\u043d\u0435\u0440\u0430:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",color:f.toner>0?"good":"bad",bold:!0,children:f.toner})]}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:"8px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!f.copyitem&&!f.mob,content:f.copyitem?f.copyitem:f.mob?"\u0416\u043e\u043f\u0430 "+f.mob+"!":"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",onClick:function(){return h("removedocument")}})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!f.folder,content:f.folder?f.folder:"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u043f\u0430\u043f\u043a\u0438",onClick:function(){return h("removefolder")}})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"60%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"clone",content:"\u041a\u043e\u043f\u0438\u044f",disabled:0===f.toner||!f.copyitem&&!f.mob,onClick:function(){return h("copy")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"file",disabled:0===f.toner||null===f.form,content:"\u041f\u0435\u0447\u0430\u0442\u044c",onClick:function(){return h("print_form")}})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mr:"5px",children:!!f.isAI&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"terminal",disabled:f.toner<5,content:"\u0424\u043e\u0442\u043e \u0438\u0437 \u0411\u0414",onClick:function(){return h("ai_pic")}})})}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",mt:"10px",color:"grey",children:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"15px",mt:"10px",children:f.copynumber}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"3px",mt:"8px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",disabled:1===f.copynumber,content:"",onClick:function(){return h("minus")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"3px",mt:"8px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",disabled:f.copynumber>=f.toner,content:"",onClick:function(){return h("add")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0411\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u044f",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"grey",children:"\u0424\u043e\u0440\u043c\u0430:"}),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,children:""===f.form_id?"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430":f.form_id})]}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:2,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"chevron-right",content:"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",selected:""===f.category?"selected":null,onClick:function(){return h("choose_category",{category:null})},mb:1})}),g.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"chevron-right",content:e,selected:f.category===e?"selected":null,onClick:function(){return h("choose_category",{category:e})},mb:1},e)},e)}))]})]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:35,children:(0,o.createComponentVNode)(2,a.Section,{title:""===f.category?"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b":f.category,children:[(0,o.createComponentVNode)(2,a.Input,{fluid:!0,mb:1,placeholder:"\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u0440\u043c\u044b",onInput:function(e,t){return b(t)}}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:2,children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.id+": "+e.altername.trimLongStr(27),tooltip:e.id+": "+e.altername,selected:f.form_id===e.id?"selected":null,onClick:function(){return h("choose_form",{path:e.path,id:e.id})},mb:1},e.path)},e.path)}))})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=["tempKey"];var l={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},d=function(e,t){var n=e.tempKey,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),d=l[n];if(!d)return null;var u=(0,r.useBackend)(t),s=u.data,m=u.act,p=s.currentTemp,h=d.label,f=d.icon,C=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({selected:C,onClick:function(){m("setTemp",{temp:n})}},c,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:f}),h]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,i=n.emagged,u=n.currentTemp,s=l[u]||l.normal,m=s.label,p=s.color,h=[],f=0,C=Object.entries(l);f0?"envelope-open-text":"envelope",onClick:function(){return i("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return i("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Supplies",icon:"box",onClick:function(){return i("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return i("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return i("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return i("setScreen",{setScreen:10})}})})]}),!!u&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return i("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:s?"Speaker Off":"Speaker On",selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return i("toggleSilent")}})})]})},l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.department,u=[];switch(e.purpose){case"ASSISTANCE":u=l.assist_dept,n="Request assistance from another department";break;case"SUPPLIES":u=l.supply_dept,n="Request supplies from another department";break;case"INFO":u=l.info_dept,n="Relay information to another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Message",icon:"envelope",onClick:function(){return i("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return i("writeInput",{write:e,priority:2})}})]},e)}))})})},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act;c.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data;switch(e.type){case"MESSAGES":n=d.message_log,c="Message Log";break;case"SHIPPING":n=d.shipping_log,c="Shipping label print log"}return(0,o.createComponentVNode)(2,a.Section,{title:c,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.map((function(e,t){return(0,o.createVNode)(1,"div",null,e,0,null,t)})),(0,o.createVNode)(1,"hr")]},e)}))})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.recipient,d=i.message,u=i.msgVerified,s=i.msgStamped;return(0,o.createComponentVNode)(2,a.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",color:"green",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stamped by",color:"blue",children:s})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return c("department",{department:l})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.message,d=i.announceAuth;return(0,o.createComponentVNode)(2,a.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return c("writeAnnouncement")}}),d?(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(d&&l),onClick:function(){return c("sendAnnouncement")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.shipDest,d=i.msgVerified,u=i.ship_dept;return(0,o.createComponentVNode)(2,a.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",children:d})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&d),onClick:function(){return c("printLabel")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,a.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return c("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),a=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,c=e.desc;return(0,o.createComponentVNode)(2,a.Box,{children:[t>0?(0,o.createComponentVNode)(2,a.Divider):null,(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,a.Box,{children:["* Summary: ",c]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83),l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;return l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_tech")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_tech")}}),(0,o.createComponentVNode)(2,s)]})]}):null},d=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;if(!l)return null;var d=l.name,u=l.lathe_types,m=l.materials,p=u.join(", ");return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Materials"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_design")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_design")}}),(0,o.createComponentVNode)(2,s)]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{submenu:i.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,s)]})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type;return l?(0,o.createComponentVNode)(2,a.Button,{content:"Eject Disk",icon:"eject",onClick:function(){i("tech"===l?"eject_tech":"eject_design")}}):null},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.disk_data,i=n.disk_type;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk Contents",children:function(){if(!c)return(0,o.createComponentVNode)(2,u);switch(i){case"design":return(0,o.createComponentVNode)(2,d);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type,d=c.to_copy;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){i("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,m)}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,p)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),a=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_item;return c.linked_destroy?l?(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,a.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){i("deconstruct")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject Item",icon:"eject",onClick:function(){i("eject_item")}})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,a.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.category,u=i.matching_designs,s=4===i.menu?"build":"imprint";return(0,o.createComponentVNode)(2,a.Section,{title:d,children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,a.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:u.map((function(e){var t=e.id,n=e.name,r=e.can_build,c=e.materials;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(s,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,a.Button,{content:"x5",onClick:function(){return l(s,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,a.Button,{content:"x10",onClick:function(){return l(s,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_chemicals,d=4===c.menu;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Purge All",icon:"trash",onClick:function(){i(d?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,a.Button,{content:"Purge",icon:"trash",onClick:function(){i(d?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.menu,u=i.categories,s=4===d?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,a.Section,{title:s+" Menu",children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,c.LatheSearch),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,c=n.total_materials,i=n.max_materials,l=n.max_chemicals,d=n.total_chemicals;return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,a.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c}),i?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+i}):null]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),l?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_materials;return(0,o.createComponentVNode)(2,a.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===c.menu?"lathe_ejectsheet":"imprinter_ejectsheet";i(n,{id:t,amount:e})},d=Math.floor(n/2e3),u=n<1,s=1===d?"":"s";return(0,o.createComponentVNode)(2,a.Table.Row,{className:u?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"110px",children:["(",d," sheet",s,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,a.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,a.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,a.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),a=n(233),c=n(63),i=n(2),l=n(83);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,d=n.menu,u=n.linked_lathe,s=n.linked_imprinter;return 4!==d||u?5!==d||s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,c.LatheMainMenu)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,c.LatheCategory)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,i.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,i.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),a=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",onChange:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,d=n.linked_destroy,u=n.linked_lathe,s=n.linked_imprinter,m=n.tech_levels;return(0,o.createComponentVNode)(2,a.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,a.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!l,menu:i.MENU.DISK,submenu:i.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!d,menu:i.MENU.DESTROY,submenu:i.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,menu:i.MENU.LATHE,submenu:i.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!s,menu:i.MENU.IMPRINTER,submenu:i.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{menu:i.MENU.SETTINGS,submenu:i.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(63),a=n(2),c=n(83);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==c.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:c.MENU.MAIN,submenu:c.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==c.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===c.MENU.LATHE||e===c.MENU.IMPRINTER},submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),a=n(2);t.RndNavButton=function(e,t){var n=e.icon,c=e.children,i=e.disabled,l=e.content,d=(0,r.useBackend)(t),u=d.data,s=d.act,m=u.menu,p=u.submenu,h=m,f=p;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,a.Button,{content:l,icon:n,disabled:i,onClick:function(){s("nav",{menu:h,submenu:f})},children:c})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,d=n.act,u=l.sync,s=l.admin,m=l.linked_destroy,p=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Sync Database with Network",icon:"sync",disabled:!u,onClick:function(){d("sync")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Connect to Research Network",icon:"plug",disabled:u,onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,content:"Device Linkage Menu",icon:"link",menu:i.MENU.SETTINGS,submenu:i.SUBMENU.SETTINGS_DEVICES}),1===s?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return d("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return d("find_device")}}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){d("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{title:(0,i.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,a.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_lock_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Lock Down",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",disabled:s,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return l("masslock",{})}})]}),(0,o.createComponentVNode)(2,i,{cyborgs:h,can_hack:u})]})})};var i=function(e,t){var n=e.cyborgs,c=(e.can_hack,(0,r.useBackend)(t)),i=c.act,l=c.data,d="Detonate";return l.detonate_cooldown>0&&(d+=" ("+l.detonate_cooldown+"s)"),n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return i("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return i("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:d,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){return i("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),s=u.dial,m=u.open;u.locked,u.contents;return(0,o.createComponentVNode)(2,c.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,a.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),m?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,a.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*s+"deg)","z-index":0}})]}),!m&&(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.dial,d=i.open,u=i.locked,s=function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:d||t&&!u,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return c(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:u,icon:d?"lock":"lock-open",content:d?"Close":"Open",mb:"0.5rem",onClick:function(){return c("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",children:[s(50),s(10),s(1)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[s(1,!0),s(10,!0),s(50,!0)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.contents;return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--contents",overflow:"auto",children:i.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{mb:"0.5rem",onClick:function(){return c("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,a.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.satellites,u=l.notice,s=l.meteor_shield,m=l.meteor_shield_coverage,p=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,a.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:h>=100?"good":"average",value:m,maxValue:p,children:[h," %"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,a.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return i("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(3),l=n(68),d=n(122);t.SecureStorage=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"securestorage",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),u=i.locked,m=i.no_passcode,p=i.emagged,h=i.user_entered_code,f=m?"":u?"bad":"good";return(0,o.createComponentVNode)(2,c.Section,{height:"100%",stretchContents:!0,onKeyDown:function(e){return function(e,t){var n=(0,a.useBackend)(t).act,o=window.event?e.which:e.keyCode;return o===d.KEY_ENTER?(e.preventDefault(),void n("keypad",{digit:"E"})):o===d.KEY_ESCAPE?(e.preventDefault(),void n("keypad",{digit:"C"})):o===d.KEY_BACKSPACE?(e.preventDefault(),void n("backspace")):o>=d.KEY_0&&o<=d.KEY_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_0})):o>=d.KEY_NUMPAD_0&&o<=d.KEY_NUMPAD_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_NUMPAD_0})):void 0}(e,t)},children:[(0,o.createComponentVNode)(2,c.Flex.Item,{height:"20%",mb:"5px",children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+f]),height:"100%",children:p?"ERROR":h})}),(0,o.createComponentVNode)(2,c.Table,{width:"1px",children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map((function(e){return(0,o.createComponentVNode)(2,l.TableRow,{children:e.map((function(e){return(0,o.createComponentVNode)(2,l.TableCell,{children:(0,o.createComponentVNode)(2,s,{number:e})},e)}))},e[0])}))})]})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=(n.data,e.number);return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:l,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,r.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+l]),onClick:function(){return i("keypad",{digit:l})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(3),d=n(30),u=n(123),s=n(124),m=n(169),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,d.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,a.useBackend)(t),i=(r.act,r.data),p=i.loginState,h=i.currentPage;return p.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,d.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.currentPage,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),2===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.records,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","name")),m=s[0],h=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,N,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,N,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"SecurityRecords__listRow--"+p[e.status],onClick:function(){return i("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.isPrinting,u=(0,a.useLocalState)(t,"searchText",""),s=(u[0],u[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,d.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return s(t)}})})]})},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.isPrinting,d=i.general,u=i.security;return d&&d.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,c.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:u.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,v)})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,d.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return i("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return i("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SeedExtractor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.stored_seeds,s=d.vend_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored Seeds",children:[(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createTextVNode)("Set Amount to be Vended:\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:s,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(e,t){return l("set_vend_amount",{vend_amount:t})}})],4),null!=u&&u.length?(0,o.createComponentVNode)(2,i):"No Seeds"]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.stored_seeds;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Stock"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),e.name,e.variant?" ("+e.variant+")":""]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Vend",icon:"arrow-circle-down",onClick:function(){return c("vend",{seedid:e.id,seedvariant:e.variant})}}),"\xa0(",e.amount," Left)"]})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(45);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:d.status?d.status:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!d.shuttle&&(!!d.docking_ports_len&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Send to ",children:d.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",content:e.name,onClick:function(){return l("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!d.admin_controlled&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!d.status,onClick:function(){return l("request")}})})],0))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),u=n[0],s=n[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.shuttles;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return c("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.templates_tabs,d=i.existing_shuttle,u=i.templates;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===d.id,icon:"file",content:e,onClick:function(){return c("select_template_category",{cat:e})}},e)}))}),!!d&&u[d.id].templates.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Load Template",icon:"download",onClick:function(){return c("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.existing_shuttle,d=i.selected;return(0,o.createComponentVNode)(2,a.Box,{children:[l?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: None"}),d?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: "+d.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),d.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:d.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",icon:"eye",onClick:function(){return c("preview",{shuttle_id:d.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",icon:"download",onClick:function(){return c("load",{shuttle_id:d.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var m=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return i("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",content:"Eject",onClick:function(){return i("ejectify")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.hasOccupant,d=i.isBeakerLoaded,u=i.beakerMaxSpace,s=i.beakerFreeSpace,m=i.dialysis&&s>0;return(0,o.createComponentVNode)(2,c.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!d||s<=0||!l,selected:m,icon:m?"toggle-on":"toggle-off",content:m?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!d,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:d?(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:s/u,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.occupant,d=i.chemicals,u=i.maxchem,s=i.amounts;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,c.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,c.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SlotMachine=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return null===d.money?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,a.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===d.plays?d.plays+" player has tried their luck today!":d.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.money})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"10 credits to spin",children:(0,o.createComponentVNode)(2,a.Button,{icon:"coins",disabled:d.working,content:d.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,lineHeight:2,color:d.resultlvl,children:d.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.secure,u=l.can_dry,s=l.drying,m=l.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return i("drying")}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:" No products loaded. "}),!!m&&m.slice().sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return i("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return i("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return i("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),c=n(125),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,h=d.inputLevel,f=d.inputLevelMax,C=d.inputAvailable,N=d.outputAttempt,b=d.outputting,V=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,y=(u>=100?"good":p&&"average")||"bad",x=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:y,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){return l("tryoutput")},children:N?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:x,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===V,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===V,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:V/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:V===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:V===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.generated,u=l.generated_ratio,s=l.tracking_state,m=l.tracking_rate,p=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,N=l.rotating_direction;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:p>0?"good":"bad",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[2===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Automated "}),1===s&&(0,o.createComponentVNode)(2,a.Box,{children:[" ",m,"\xb0/h (",N,")"," "]}),0===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[2!==s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return i("cdir",{cdir:t})}}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===s,onClick:function(){return i("track",{track:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===s,onClick:function(){return i("track",{track:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===s,disabled:!h,onClick:function(){return i("track",{track:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[1===s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("tdir",{tdir:t})}}),0===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Tracker offline "}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return i("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return i("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpecMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpecMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Hemomancer",onClick:function(){return c("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16),(0,o.createComponentVNode)(2,a.Button,{content:"Umbrae",onClick:function(){return c("umbrae")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Desecrated Duel",16),(0,o.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Gargantua",onClick:function(){return c("gargantua")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Dantalion",onClick:function(){return c("dantalion")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.helmet,u=i.suit,s=i.magboots,m=i.mask,p=i.storage,h=i.open,f=i.locked;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return c("cook")}}),(0,o.createComponentVNode)(2,a.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return c("toggle_lock")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.object),l=e.label,d=e.missingText,u=e.eject;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,a.Box,{my:.5,children:i?(0,o.createComponentVNode)(2,a.Button,{my:-1,icon:"eject",content:i,onClick:function(){return c(u)}}):(0,o.createComponentVNode)(2,a.Box,{color:"silver",bold:!0,children:["No ",d," found."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.open,d=i.locked;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:l?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:l?"times-circle":"expand",color:l?"red":"green",disabled:d,textAlign:"center",onClick:function(){return c("toggle_open")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(26),a=n(42),c=n(16),i=n(1),l=n(2),d=n(44),u=n(3);n(68);t.SupermatterMonitor=function(e,t){var n=(0,i.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p)};var s=function(e){return Math.log2(16+Math.max(0,e))-4},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.supermatter_id+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("view",{view:e.supermatter_id})}})})]},e.supermatter_id)}))})})})})},p=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,h=(p.active,p.SM_integrity),f=p.SM_power,C=p.SM_ambienttemp,N=p.SM_ambientpressure,b=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(p.gases||[]),V=Math.max.apply(Math,[1].concat(b.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:f,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(f)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(C),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(C)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(N),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(N)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return m("back")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:b.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:V,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),a=n(2),c=(n(45),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return i(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,a.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEG=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};t.TEG=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return d.error?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[d.error,(0,o.createComponentVNode)(2,a.Button,{icon:"circle",content:"Recheck",onClick:function(){return l("check")}})]})})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Cold Loop ("+d.cold_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Inlet",children:[i(d.cold_inlet_temp)," K,"," ",i(d.cold_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Outlet",children:[i(d.cold_outlet_temp)," K,"," ",i(d.cold_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hot Loop ("+d.hot_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Inlet",children:[i(d.hot_inlet_temp)," K,"," ",i(d.hot_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Outlet",children:[i(d.hot_outlet_temp)," K,"," ",i(d.hot_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Output",children:[i(d.output_power)," W",!!d.warning_switched&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!d.warning_cold_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!d.warning_hot_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TTSSeedsExplorerContent=t.TTSSeedsExplorer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={0:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},l={"\u041c\u0443\u0436\u0441\u043a\u043e\u0439":{icon:"mars",color:"blue"},"\u0416\u0435\u043d\u0441\u043a\u0438\u0439":{icon:"venus",color:"purple"},"\u041b\u044e\u0431\u043e\u0439":{icon:"venus-mars",color:"white"}},d=function(e,t,n,r){return void 0===r&&(r=null),e.map((function(e){var c,i=null!=(c=e[r])?c:e;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:t.includes(e),content:i,onClick:function(){t.includes(e)?n(t.filter((function(t){var n;return(null!=(n=t[r])?n:t)!==e}))):n([e].concat(t))}},i)}))};t.TTSSeedsExplorer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.providers,m=u.seeds,p=u.selected_seed,h=u.phrases,f=u.donator_level,C=m.map((function(e){return e.category})).filter((function(e,t,n){return n.indexOf(e)===t})),N=m.map((function(e){return e.gender})).filter((function(e,t,n){return n.indexOf(e)===t})),b=m.map((function(e){return e.required_donator_level})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return i[e]})),V=(0,r.useLocalState)(t,"selectedProviders",s),g=V[0],v=V[1],y=(0,r.useLocalState)(t,"selectedGenders",N),x=y[0],_=y[1],k=(0,r.useLocalState)(t,"selectedCategories",C),L=k[0],B=k[1],w=(0,r.useLocalState)(t,"selectedDonatorLevels",b),S=w[0],I=w[1],T=(0,r.useLocalState)(t,"selectedPhrase",h[0]),A=T[0],E=T[1],M=(0,r.useLocalState)(t,"searchtext",""),O=M[0],P=M[1],F=d(s,g,v,"name"),R=d(N,x,_),D=d(C,L,B),j=d(b,S,I),W=(0,o.createComponentVNode)(2,a.Dropdown,{options:h,selected:A.replace(/(.{25})..+/,"$1..."),width:"220px",onSelected:function(e){return E(e)}}),z=(0,o.createComponentVNode)(2,a.Input,{placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435...",fluid:!0,onInput:function(e,t){return P(t)}}),U=m.sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return n>o?1:n0&&p!==e.name?"orange":"white",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:p===e.name?.5:.25,textAlign:"left",children:e.category}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:p===e.name?"white":l[e.gender].color,textAlign:"left",children:(0,o.createComponentVNode)(2,a.Icon,{mx:1,size:1.2,name:l[e.gender].icon})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:e.required_donator_level>0&&(0,o.createFragment)([i[e.required_donator_level],(0,o.createComponentVNode)(2,a.Icon,{ml:1,mr:2,name:"coins"})],0)})]},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b",children:F}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u043b",children:R}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",children:D}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438",children:j}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:W}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u0438\u0441\u043a",children:z})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0413\u043e\u043b\u043e\u0441\u0430 ("+U.length+"/"+m.length+")",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{children:H})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.BlockQuote,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,o.createComponentVNode)(2,a.Box,{mt:2,italic:!0,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c Discord-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})],4)};t.TTSSeedsExplorerContent=u},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.records,s=void 0===u?[]:u,m=d.explosion_target,p=d.toxins_tech,h=d.printing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shift's Target",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Toxins Level",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print All Logs",disabled:!s.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!s.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),s.length?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Records"})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.records,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return c("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Tank=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return n=d.has_mask?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.connected?"check":"times",content:d.connected?"Internals On":"Internals Off",selected:d.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:d.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:d.ReleasePressure===d.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.releasePressure),width:"65px",unit:"kPa",minValue:d.minReleasePressure,maxValue:d.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:d.ReleasePressure===d.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:d.ReleasePressure===d.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.o_tanks,u=l.p_tanks;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Oxygen Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return i("oxygen")}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Plasma Tank ("+u+")",disabled:0===u,icon:"arrow-circle-down",onClick:function(){return i("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.ion),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[1===s&&(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,u);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(p)]})})};var i=function(){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.sectors_available,u=i.nttc_toggle_jobs,s=i.nttc_toggle_job_color,m=i.nttc_toggle_name_color,p=i.nttc_toggle_command_bold,h=i.nttc_job_indicator_type,f=i.nttc_setting_language,C=i.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return c("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"On":"Off",selected:u,icon:"user-tag",onClick:function(){return c("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:s?"On":"Off",selected:s,icon:"clipboard-list",onClick:function(){return c("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"user-tag",onClick:function(){return c("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){return c("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return c("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return c("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return c("network_id")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return c("import")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return c("export")}})]})],4)},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.link_password,d=i.relay_entries;return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return c("change_password")}})})}),(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Unlink"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",onClick:function(){return c("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.filtered_users;return(0,o.createComponentVNode)(2,a.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Add User",icon:"user-plus",onClick:function(){return c("add_filter")}}),children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"user-times",onClick:function(){return c("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.linked,m=u.active,p=u.network_id;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"power-off",onClick:function(){return d("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"Unset",selected:p,icon:"server",onClick:function(){return d("network_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Link Status",children:1===s?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Unlinked"})})]})}),1===s?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.linked_core_id,d=i.linked_core_addr,u=i.hidden_link;return(0,o.createComponentVNode)(2,a.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){return c("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return c("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.cores;return(0,o.createComponentVNode)(2,a.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Link"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Link",icon:"link",onClick:function(){return c("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(224);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.targetsTeleport?d.targetsTeleport:{},s=d.calibrated,m=d.calibrating,p=d.powerstation,h=d.regime,f=d.teleporterhub,C=d.target,N=d.locked;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(!p||!f)&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[f,!p&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Powerstation not linked "}),p&&!f&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Teleporter hub not linked "})]}),p&&f&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!N,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),1===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),2===h&&(0,o.createComponentVNode)(2,a.Box,{children:C})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,i.GridColumn,{size:"2",children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"In Progress"})||s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,i.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,a.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!s&&!m),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(N&&p&&f&&2===h)&&(0,o.createComponentVNode)(2,a.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TempGun=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.TempGun=function(e,t){var n=(0,a.useBackend)(t),s=n.act,m=n.data,p=m.target_temperature,h=m.temperature,f=m.max_temp,C=m.min_temp;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:C,maxValue:f,value:p,format:function(e){return(0,r.toFixed)(e,2)},width:"50px",onDrag:function(e,t){return s("target_temperature",{target_temperature:t})}}),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,c.Box,{color:l(h),bold:h>500-273.15,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(h,2)}),"\xb0C"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power Cost",children:(0,o.createComponentVNode)(2,c.Box,{color:u(h),children:d(h)})})]})})})})};var l=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},d=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},u=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.ThermoMachine=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.ThermoMachine=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.temperature,format:function(e){return(0,r.toFixed)(e,2)}})," K"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.pressure,format:function(e){return(0,r.toFixed)(e,2)}})," kPa"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Setting",children:(0,o.createComponentVNode)(2,c.Button,{icon:d.cooling?"temperature-low":"temperature-high",content:d.cooling?"Cooling":"Heating",selected:d.cooling,onClick:function(){return l("cooling")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,c.NumberInput,{animated:!0,value:Math.round(d.target),unit:"K",width:"62px",minValue:Math.round(d.min),maxValue:Math.round(d.max),step:5,stepPixelSize:3,onDrag:function(e,t){return l("target",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"fast-backward",disabled:d.target===d.min,title:"Minimum temperature",onClick:function(){return l("target",{target:d.min})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",disabled:d.target===d.initial,title:"Room Temperature",onClick:function(){return l("target",{target:d.initial})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"fast-forward",disabled:d.target===d.max,title:"Maximum Temperature",onClick:function(){return l("target",{target:d.max})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return i("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return i("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return i("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return i("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return i("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TurbineComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(16);t.TurbineComputer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.compressor,m=u.compressor_broken,p=u.turbine,h=u.turbine_broken,f=u.online,C=Boolean(s&&!m&&p&&!h);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Online":"Offline",selected:f,disabled:!C,onClick:function(){return i("toggle_power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Disconnect",onClick:function(){return i("disconnect")}})],4),children:C?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,c=n.compressor,i=n.compressor_broken,l=n.turbine,d=n.turbine_broken;n.online;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compressor Status",color:!c||i?"bad":"good",children:i?c?"Offline":"Missing":"Online"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Status",color:!l||d?"bad":"good",children:d?l?"Offline":"Missing":"Online"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.rpm,l=n.temperature,d=n.power,u=n.bearing_heat;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Speed",children:[c," RPM"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temp",children:[l," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generated Power",children:[d," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bearing Heat",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[-Infinity,60],average:[60,90],bad:[90,Infinity]},children:(0,i.toFixed)(u)+"%"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Uplink=void 0;var o=n(0),r=n(26),a=n(42),c=n(20),i=n(1),l=n(2),d=n(34),u=n(3),s=n(30),m=function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,V);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}};t.Uplink=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.cart,c=(0,i.useLocalState)(t,"tabIndex",0),d=c[0],p=c[1],h=(0,i.useLocalState)(t,"searchText",""),f=(h[0],h[1]);return(0,o.createComponentVNode)(2,u.Window,{theme:"syndicate",children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===d,onClick:function(){p(0),f("")},icon:"store",children:"View Market"},"PurchasePage"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===d,onClick:function(){p(1),f("")},icon:"shopping-cart",children:["View Shopping Cart"," ",a&&a.length?"("+a.length+")":""]},"Cart"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===d,onClick:function(){p(2),f("")},icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{onClick:function(){return r("lock")},icon:"lock",children:"Lock Uplink"},"LockUplink")]}),m(d)]})]})};var p=function(e,t){var n=(0,i.useBackend)(t),u=n.act,s=n.data,m=s.crystals,p=s.cats,h=(0,i.useLocalState)(t,"uplinkItems",p[0].items),f=h[0],N=h[1],b=(0,i.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=function(e){if(g(e),""===e)return N(p[0].items);N(function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){var t=1===e.hijack_only?"|hijack":"";return e.name+"|"+e.desc+"|"+e.cost+"tc"+t}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(p.map((function(e){return e.items})).flat(),e))},y=(0,i.useLocalState)(t,"showDesc",1),x=y[0],_=y[1];return(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+m+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:x,onClick:function(){return _(!x)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Random Item",icon:"question",onClick:function(){return u("buyRandom")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return u("refund")}})],4),children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1.5,placeholder:"Search Equipment",onInput:function(e,t){v(t)},value:V}),(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{children:(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:p.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:""===V&&e.items===f,onClick:function(){N(e.items),g("")},children:e.cat},e)}))})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:f.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:x},(0,c.decodeHtmlEntities)(e.name))}))})]})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,d=a.cart,u=a.crystals,s=a.cart_price,m=(0,i.useLocalState)(t,"showDesc",0),p=m[0],h=m[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+u+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:p,onClick:function(){return h(!p)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Empty Cart",icon:"trash",onClick:function(){return r("empty_cart")},disabled:!d}),(0,o.createComponentVNode)(2,l.Button,{content:"Purchase Cart ("+s+"TC)",icon:"shopping-cart",onClick:function(){return r("purchase_cart")},disabled:!d||s>u})],4),children:(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:d?d.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:p,buttons:(0,o.createComponentVNode)(2,b,{i:e})},(0,c.decodeHtmlEntities)(e.name))})):(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})}),(0,o.createComponentVNode)(2,f)],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.cats,d=a.lucky_numbers;return(0,o.createComponentVNode)(2,l.Section,{title:"Suggested Purchases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"dice",content:"See more suggestions",onClick:function(){return r("shuffle_lucky_numbers")}}),children:(0,o.createComponentVNode)(2,l.Box,{display:"flex",flexWrap:"wrap",mb:"5px",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,l.Flex.Item,{flexShrink:0,p:"0.5%",width:"49%",children:(0,o.createComponentVNode)(2,C,{grow:!0,i:c[e.cat].items[e.item]})},t)}))})})},C=function(e,t){var n=e.i,r=e.showDecription,a=void 0===r?1:r,i=e.buttons,d=void 0===i?(0,o.createComponentVNode)(2,N,{i:n}):i;return(0,o.createComponentVNode)(2,l.Section,{title:(0,c.decodeHtmlEntities)(n.name),showBottom:a,borderRadius:"5px",buttons:d,stretchContents:!0,children:a?(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,c.decodeHtmlEntities)(n.desc)}):null})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i,d=a.crystals;return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{icon:"shopping-cart",color:1===c.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return r("add_to_cart",{item:c.obj_path})},disabled:c.cost>d}),(0,o.createComponentVNode)(2,l.Button,{content:"Buy ("+c.cost+"TC)"+(c.refundable?" [Refundable]":""),color:1===c.hijack_only&&"red",tooltip:1===c.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return r("buyItem",{item:c.obj_path})},disabled:c.cost>d})],4)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i;a.exploitable;return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Button,{icon:"times",content:"("+c.cost*c.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return r("remove_from_cart",{item:c.obj_path})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"minus",tooltip:0===c.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:--c.amount})},disabled:c.amount<=0}),(0,o.createComponentVNode)(2,l.Button.Input,{content:c.amount,width:"45px",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onCommit:function(e,t){return r("set_cart_item_quantity",{item:c.obj_path,quantity:t})},disabled:-1!==c.limit&&c.amount>=c.limit&&c.amount<=0}),(0,o.createComponentVNode)(2,l.Button,{icon:"plus",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:++c.amount})},disabled:-1!==c.limit&&c.amount>=c.limit})]})},V=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.exploitable),s=(0,i.useLocalState)(t,"selectedRecord",u[0]),m=s[0],p=s[1],h=(0,i.useLocalState)(t,"searchText",""),f=h[0],C=h[1],N=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(u,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:N.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===m,onClick:function(){return p(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+m.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",m.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",m.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",m.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",m.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",m.species]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Vending=void 0;var o=n(0),r=(n(8),n(1)),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productStock,u=e.productImage,s=i.chargesMoney,m=(i.user,i.usermoney),p=i.inserted_cash,h=i.vend_ready,f=(i.inserted_item_name,!s||0===l.price),C="ERROR!",N="";f?(C="FREE",N="arrow-circle-down"):(C=l.price,N="shopping-cart");var b=!h||0===d||!f&&l.price>m&&l.price>p;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{color:(d<=0?"bad":d<=l.max_amount/2&&"average")||"good",children:[d," in stock"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:b,icon:N,content:C,textAlign:"left",onClick:function(){return c("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.user,m=u.usermoney,p=u.inserted_cash,h=u.chargesMoney,f=u.product_records,C=void 0===f?[]:f,N=u.hidden_records,b=void 0===N?[]:N,V=u.stock,g=(u.vend_ready,u.inserted_item_name),v=u.panel_open,y=u.speaker,x=u.imagelist;return n=[].concat(C),u.extended_inventory&&(n=[].concat(n,b)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,c.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[s&&(0,o.createComponentVNode)(2,a.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),", ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),".",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Box,{children:["There is ",(0,o.createVNode)(1,"b",null,[p,(0,o.createTextVNode)(" credits ")],0)," of space cash inserted.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return d("change")}})]})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return d("eject_item",{})}}),children:(0,o.createComponentVNode)(2,a.Box,{children:g})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,a.Button,{icon:y?"check":"volume-mute",selected:y,content:"Speaker",textAlign:"left",onClick:function(){return d("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,i,{product:e,productStock:V[e.name],productImage:x[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return i("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.remaining,u=l.question,s=l.choices,m=l.user_vote,p=l.counts,h=l.show_counts;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:u,children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:["Time remaining: ",Math.round(d/10),"s"]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{multiLine:e,content:e+(h?" ("+(p[e]||0)+")":""),onClick:function(){return i("vote",{target:e})},selected:e===m})},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return i("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return i("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return i("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.WizardApprenticeContract=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.WizardApprenticeContract=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.used;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,o.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,o.createComponentVNode)(2,a.Section,{title:"Which school of magic is your apprentice studying?",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destruction",children:["Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("destruction")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bluespace Manipulation",children:["Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("bluespace")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing",children:["Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("healing")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Robeless",children:["Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("robeless")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}}]); \ No newline at end of file +if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),a=Object.defineProperty||function(e,t,n){e[t]=n.value},c=Object.defineProperties||function(t,n){for(var o in n)if(l.call(n,o))try{a(t,o,n[o])}catch(r){e.console}},i=Object.getOwnPropertyDescriptor,l=Object.prototype.hasOwnProperty,d=e.Element.prototype,u=e.Text.prototype,s=/^[a-z]+$/,m=/loaded|complete/,p={},h=document.createElement("div"),f=document.documentElement,C=f.removeAttribute,N=f.setAttribute,b=function(e){return{enumerable:!0,writable:!0,configurable:!0,value:e}};x(e.HTMLCommentElement.prototype,d,"nodeValue"),x(e.HTMLScriptElement.prototype,null,"text"),x(u,null,"nodeValue"),x(e.HTMLTitleElement.prototype,null,"text"),a(e.HTMLStyleElement.prototype,"textContent",(t=i(e.CSSStyleSheet.prototype,"cssText"),y((function(){return t.get.call(this.styleSheet)}),(function(e){t.set.call(this.styleSheet,e)}))));var V=/\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;a(e.CSSStyleDeclaration.prototype,"opacity",{get:function(){var e=this.filter.match(V);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(V,(function(){return t=!0,e})),!t&&e&&(this.filter+=e)}}),c(d,{textContent:{get:k,set:S},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;t1?r-1:0),c=1;c1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,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"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,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"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.debounce=void 0;t.debounce=function(e,t,n){var o;return void 0===n&&(n=!1),function(){for(var r=arguments.length,a=new Array(r),c=0;c=0||(r[n]=e[n]);return r}(t,l),N=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),c=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],c[0]=n[1]),o!==undefined&&(a[1]=o[0],c[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,c,t)}))(e)}(a,N,c,d);if(b.length>0){var V=b[0],g=b[b.length-1];b.push([N[0]+f,g[1]]),b.push([N[0]+f,-f]),b.push([-f,-f]),b.push([-f,V[1]])}var v=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,c);return(0,o.createVNode)(1,"div","Collapsible",[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:d,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},m,{children:u}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})],0)},l}(o.Component);t.Collapsible=l},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(8),a=n(22),c=["content","children","className","color","backgroundColor"];var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,l=e.backgroundColor,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return d.color=t?null:"transparent",d.backgroundColor=i||l,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(d)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(d))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(8),a=n(22),c=n(165),i=["color","over","noscroll","nochevron","width","onClick","selected","disabled"],l=["className"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).state={open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var m=s.prototype;return m.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},m.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)},m.setSelected=function(e){this.setOpen(!1),this.props.onSelected(e)},m.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},m.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,m=t.noscroll,p=t.nochevron,h=t.width,f=(t.onClick,t.selected),C=t.disabled,N=d(t,i),b=N.className,V=d(N,l),g=s?!this.state.open:this.state.open,v=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([m?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:h}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:h,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,C&&"Button--disabled",b])},V,{onClick:function(){C&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",f,0),!!p||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,c.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),v],0)},s}(o.Component);t.Dropdown=s},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(8),a=n(22),c=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],i=["className","fluid"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return(0,r.isFalsy)(e)?"":e},s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=u(t.props.value),void e.target.blur()):void 0},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var m=s.prototype;return m.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=u(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},m.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=u(r))},m.setEditing=function(e){this.setState({editing:e})},m.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,d=(e.autofocus,e.disabled),u=e.multiline,s=e.cols,m=void 0===s?32:s,p=e.rows,h=void 0===p?4:p,f=l(e,c),C=f.className,N=f.fluid,b=l(f,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",N&&"Input--fluid",d&&"Input--disabled",C])},b,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),u?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:m,rows:h,disabled:d},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:d},null,this.inputRef)]})))},s}(o.Component);t.Input=s},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(16),a=n(8),c=n(33),i=n(22),l=n(225),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];t.Knob=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.style,y=e.fillValue,x=e.color,_=e.ranges,k=void 0===_?{}:_,L=e.size,B=e.bipolar,w=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=(0,r.scale)(null!=y?y:c,m,s),h=(0,r.scale)(c,m,s),f=x||(0,r.keyOfMatchingRange)(null!=y?y:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,B&&"Knob--bipolar",g,(0,i.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",w&&"Knob__popupValue--"+w]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((B?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":L+"rem"},v)},S)),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(34),a=["children"],c=["label","children"];function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.children,n=i(e,a);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=l;l.Item=function(e){var t=e.label,n=e.children,a=i(e,c);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1),c=n(45),i=n(226),l=n(221);function d(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},m=function(e){function t(t){var n;n=e.call(this,t)||this;var o=window.innerHeight/2-256;return n.state={offsetX:0,offsetY:o,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),s(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),s(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),s(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=n/e.zoom;if(1!==r){e.zoom=n;var a=document.getElementsByClassName("NanoMap__container");if(a.length){var c=(0,l.getBoundingBox)(a[0]),i=c.size[0]/2-e.offsetX,d=c.size[1]/2-e.offsetY;e.offsetX+=i-i*r,e.offsetY+=d-d*r}return t.onZoom&&t.onZoom(e.zoom),e}}))},n}return d(t,e),t.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.dragging,c=t.offsetX,i=t.offsetY,l=t.zoom,d=void 0===l?1:l,u=this.props.children,s=e.map+"_nanomap_z1.png",m=510*d+"px",p={width:m,height:m,"margin-top":i+"px","margin-left":c+"px",overflow:"hidden",position:"relative","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:p,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"img",null,null,1,{src:s,style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,r.Box,{children:u})]}),(0,o.createComponentVNode)(2,f,{zoom:d,onZoom:this.handleZoom})]})},t}(o.Component);t.NanoMap=m;var p,h=function(e){function t(t){var n;n=e.call(this,t)||this;var o=(0,a.useBackend)(n.props.context).act;return n.state={color:n.props.color},n.handleClick=function(e){p!==undefined&&p.setState({color:"blue"}),o("switch_camera",{name:n.props.name}),p=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),n.setState({color:"green"})},n}return d(t,e),t.prototype.render=function(){var e=2*this.props.x*this.props.zoom-this.props.zoom-3,t=2*this.props.y*this.props.zoom-this.props.zoom-3;return(0,o.createComponentVNode)(2,r.Button,{onClick:this.handleClick,position:"absolute",className:"NanoMap__button",lineHeight:"0",color:this.props.status?this.state.color:"red",bottom:t+"px",left:e+"px",children:(0,o.createComponentVNode)(2,r.Tooltip,{content:this.props.tooltip})},this.props.key)},t}(o.Component);m.NanoButton=h,m.Marker=function(e){var t=e.x,n=e.y,a=e.zoom,c=void 0===a?1:a,i=e.icon,l=e.tooltip,d=e.color,u=e.onClick,s=e.size,m=void 0===s?6:s,p=2*t*c-c-3,h=2*n*c-c-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:h+"px",left:p+"px",onClick:u,children:[(0,o.createComponentVNode)(2,r.Icon,{name:i,color:d,fontSize:m+"px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:l})]}),2)};var f=function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:"1",maxValue:"8",stepPixelSize:"10",format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};m.Zoomer=f},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(8),a=n(22),c=n(222),i=["className","children","onEnter"];t.Modal=function(e){var t,n=e.className,l=e.children,d=e.onEnter,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);return d&&(t=function(e){13===e.keyCode&&d(e)}),(0,o.createComponentVNode)(2,c.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(u)]),l,0,Object.assign({},(0,a.computeBoxProps)(u))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(8),a=n(22),c=["className","color","info","warning","success","danger"];var i=function(e){var t=e.className,n=e.color,i=e.info,l=(e.warning,e.success),d=e.danger,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",l&&"NoticeBox--type--success",d&&"NoticeBox--type--danger",t])},u)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBarCountdown=t.ProgressBar=void 0;var o=n(0),r=n(16),a=n(8),c=n(22),i=["className","value","minValue","maxValue","color","ranges","children","fractionDigits"],l=["start","current","end"];function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=function(e){var t=e.className,n=e.value,l=e.minValue,d=void 0===l?0:l,s=e.maxValue,m=void 0===s?1:s,p=e.color,h=e.ranges,f=void 0===h?{}:h,C=e.children,N=e.fractionDigits,b=void 0===N?0:N,V=u(e,i),g=(0,r.scale)(n,d,m),v=C!==undefined,y=p||(0,r.keyOfMatchingRange)(n,f)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,c.computeBoxClassName)(V)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(g)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",v?C:(0,r.toFixed)(100*g,b)+"%",0)],4,Object.assign({},(0,c.computeBoxProps)(V))))};t.ProgressBar=s,s.defaultHooks=a.pureComponentHooks;var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.current,0)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=Math.max(this.state.value+this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},a.componentWillUnmount=function(){clearInterval(this.timer)},a.render=function(){var e=this.props,t=e.start,n=(e.current,e.end),r=u(e,l),a=(this.state.value/100-t)/(n-t);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s,Object.assign({value:a},r)))},r}(o.Component);t.ProgressBarCountdown=m,m.defaultProps={rate:1e3},s.Countdown=m},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(8),a=n(22),c=["className","title","level","buttons","content","stretchContents","noTopPadding","showBottom","children"];var i=function(e){var t=e.className,n=e.title,i=e.level,l=void 0===i?1:i,d=e.buttons,u=e.content,s=e.stretchContents,m=e.noTopPadding,p=e.showBottom,h=void 0===p||p,f=e.children,C=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c),N=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(d),b=!(0,r.isFalsy)(u)||!(0,r.isFalsy)(f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+l,e.flexGrow&&"Section--flex",t])},C,{children:[N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__title",h&&"Section__title--showBottom"]),[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",d,0)],4),b&&(0,o.createComponentVNode)(2,a.Box,{className:(0,r.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!m&&"Section__content--noTopPadding"]),children:[u,f]})]})))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(8),a=n(22),c=n(164),i=["className","vertical","children"],l=["className","selected","altSelection"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,c=e.children,l=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,i=d(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},i)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":525,"./AIFixer.js":526,"./APC.js":527,"./ATM.js":528,"./AccountsUplinkTerminal.js":529,"./AgentCard.js":530,"./AiAirlock.js":531,"./AirAlarm.js":532,"./AirlockAccessController.js":533,"./AirlockElectronics.js":534,"./AppearanceChanger.js":535,"./AtmosAlertConsole.js":536,"./AtmosControl.js":537,"./AtmosFilter.js":538,"./AtmosMixer.js":539,"./AtmosPump.js":540,"./AtmosTankControl.js":541,"./Autolathe.js":542,"./Biogenerator.js":543,"./BlueSpaceArtilleryControl.js":546,"./BluespaceTap.js":547,"./BodyScanner.js":548,"./BookBinder.js":549,"./BotClean.js":550,"./BotFloor.js":551,"./BotHonk.js":552,"./BotMed.js":553,"./BotSecurity.js":554,"./BrigCells.js":555,"./BrigTimer.js":556,"./CameraConsole.js":557,"./CameraConsole220.js":558,"./Canister.js":559,"./CardComputer.js":560,"./CargoConsole.js":561,"./ChangelogView.js":562,"./ChemDispenser.js":563,"./ChemHeater.js":564,"./ChemMaster.js":565,"./CloningConsole.js":566,"./ColourMatrixTester.js":567,"./CommunicationsComputer.js":568,"./CompostBin.js":569,"./Contractor.js":570,"./ConveyorSwitch.js":571,"./CrewMonitor.js":572,"./Cryo.js":573,"./CryopodConsole.js":574,"./DNAModifier.js":575,"./DestinationTagger.js":576,"./DisposalBin.js":577,"./DnaVault.js":578,"./DroneConsole.js":579,"./EFTPOS.js":580,"./ERTManager.js":581,"./EconomyManager.js":582,"./Electropack.js":583,"./EmotePanel.js":584,"./EvolutionMenu.js":585,"./ExosuitFabricator.js":586,"./ExternalAirlockController.js":587,"./FaxMachine.js":588,"./FilingCabinet.js":589,"./FloorPainter.js":590,"./GPS.js":591,"./GeneModder.js":592,"./GenericCrewManifest.js":593,"./GhostHudPanel.js":594,"./GlandDispenser.js":595,"./GravityGen.js":596,"./GuestPass.js":597,"./HandheldChemDispenser.js":598,"./HealthSensor.js":599,"./Holodeck.js":600,"./ImplantPad.js":601,"./Instrument.js":602,"./Jukebox.js":603,"./KeycardAuth.js":604,"./KitchenMachine.js":605,"./LawManager.js":606,"./LibraryComputer.js":607,"./LibraryManager.js":608,"./MODsuit.js":609,"./MechBayConsole.js":610,"./MechaControlConsole.js":611,"./MedicalRecords.js":612,"./MerchVendor.js":613,"./MiningVendor.js":614,"./ModpacksList.js":615,"./NTRecruiter.js":616,"./Newscaster.js":617,"./NuclearBomb.js":618,"./OperatingComputer.js":619,"./Orbit.js":620,"./OreRedemption.js":621,"./PAI.js":622,"./PDA.js":635,"./Pacman.js":652,"./ParticleAccelerator.js":653,"./PdaPainter.js":654,"./PersonalCrafting.js":655,"./Photocopier.js":656,"./Photocopier220.js":657,"./PoolController.js":658,"./PortablePump.js":659,"./PortableScrubber.js":660,"./PortableTurret.js":661,"./PowerMonitor.js":232,"./PrisonerImplantManager.js":662,"./PrisonerShuttleConsole.js":663,"./RCD.js":664,"./RPD.js":665,"./Radio.js":666,"./ReagentGrinder.js":667,"./RemoteSignaler.js":668,"./RequestConsole.js":669,"./RndConsole.js":83,"./RobotSelfDiagnosis.js":684,"./RoboticsControlConsole.js":685,"./Safe.js":686,"./SatelliteControl.js":687,"./SecureStorage.js":688,"./SecurityRecords.js":689,"./SeedExtractor.js":690,"./ShuttleConsole.js":691,"./ShuttleManipulator.js":692,"./Sleeper.js":693,"./SlotMachine.js":694,"./Smartfridge.js":695,"./Smes.js":696,"./SolarControl.js":697,"./SpawnersMenu.js":698,"./SpecMenu.js":699,"./StationAlertConsole.js":700,"./SuitStorage.js":701,"./SupermatterMonitor.js":702,"./SyndicateComputerSimple.js":703,"./TEG.js":704,"./TTSSeedsExplorer.js":705,"./TachyonArray.js":706,"./Tank.js":707,"./TankDispenser.js":708,"./TcommsCore.js":709,"./TcommsRelay.js":710,"./Teleporter.js":711,"./TempGun.js":712,"./ThermoMachine.js":713,"./TransferValve.js":714,"./TurbineComputer.js":715,"./Uplink.js":716,"./Vending.js":717,"./VolumeMixer.js":718,"./VotePanel.js":719,"./Wires.js":720,"./WizardApprenticeContract.js":721};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=524},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var d=null;return d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:d,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return i("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var d=!0;2!==l.stat&&null!==l.stat||(d=!1);var u=null;u=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var s=!0;return l.integrity>=100&&2!==l.stat&&(s=!1),(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:u,value:l.integrity/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:d?"green":"red",children:d?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!s||l.active,content:!s||l.active?"Already Repaired":"Repair",onClick:function(){return i("fix")}})})]}),(0,o.createComponentVNode)(2,a.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(227);t.APC=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=(u.normallyLocked,l[u.externalPower]||l[0]),p=l[u.chargingStatus]||l[0],h=u.powerChannels||[],f=d[u.malfStatus]||d[0],C=u.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[u.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return c(f.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",selected:u.coverLocked,disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",selected:u.nightshiftLights,onClick:function(){return c("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.emergencyLights?"Engaged":"Disengaged",selected:u.emergencyLights,disabled:s,onClick:function(){return c("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ATM=function(e,t){var n,p=(0,r.useBackend)(t),h=(p.act,p.data),f=h.view_screen,C=h.authenticated_account,N=h.ticks_left_locked_down,b=h.linked_db;if(N>0)n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(b)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,d);break;case 3:n=(0,o.createComponentVNode)(2,m);break;default:n=(0,o.createComponentVNode)(2,u)}else n=(0,o.createComponentVNode)(2,s);else n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Section,{children:n})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(i.machine_id,i.held_card_name);return(0,o.createComponentVNode)(2,a.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,a.Box,{children:"For all your monetary needs!"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,a.Button,{content:l,icon:"eject",onClick:function(){return c("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.security_level;return(0,o.createComponentVNode)(2,a.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return c("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return c("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"fundsAmount",0),m=s[0],h=s[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],N=f[1],b=i.money;return(0,o.createComponentVNode)(2,a.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Account Number",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"7 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Funds to Transfer",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,onInput:function(e,t){return N(t)}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return c("transfer",{target_acc_number:d,funds_amount:m,purpose:C})}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),d=l[0],u=l[1],s=i.owner_name,m=i.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Welcome, "+s,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return c("logout")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",m]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return c("withdrawal",{funds_amount:d})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Change account security level",icon:"lock",onClick:function(){return c("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return c("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View transaction log",icon:"list",onClick:function(){return c("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print balance statement",icon:"print",onClick:function(){return c("balance_statement")}})})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"accountID",null),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"accountPin",null),m=s[0],p=s[1];i.machine_id,i.held_card_name;return(0,o.createComponentVNode)(2,a.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return p(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return c("attempt_auth",{account_num:d,account_pin:m})}})})]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name})]},e)}))]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return c("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(68),d=n(3),u=n(123),s=n(124);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,a.useBackend)(t),c=(r.act,r.data),i=c.loginState,l=c.currentPage;return i.logged_in?(1===l?n=(0,o.createComponentVNode)(2,p):2===l?n=(0,o.createComponentVNode)(2,b):3===l&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m),n]})})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"tabIndex",0),i=r[0],l=r[1];n.login_state;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"User Accounts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Department Accounts"]})]})},p=function(e,t){switch((0,a.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},h=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.accounts,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","owner_name")),m=s[0],p=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),h=p[0];p[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,C,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,C,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,C,{id:"suspended",children:"Account Status"}),(0,o.createComponentVNode)(2,C,{id:"money",children:"Account Balance"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended+"|"+e.money}))).sort((function(e,t){var n=h?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return i("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.department_accounts;return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:"Department Name"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Number"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Status"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Balance"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return r("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wallet"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},C=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=(n.data.is_printing,(0,a.useLocalState)(t,"searchText","")),d=(l[0],l[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}})}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.account_number,d=i.owner_name,u=i.money,s=i.suspended,m=i.transactions,p=i.account_pin,h=i.is_department_account;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"#"+l+" / "+d,mt:1,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Number",children:["#",l]}),!!h&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin Actions",children:(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:Boolean(h),onClick:function(){return r("set_account_pin",{account_number:l})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Status",color:s?"red":"green",children:[s?"Suspended":"Active",(0,o.createComponentVNode)(2,c.Button,{ml:1,content:s?"Unsuspend":"Suspend",icon:s?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.target_name})]},e)}))]})})],4)},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=(n.data,(0,a.useLocalState)(t,"accName","")),l=i[0],d=i[1],u=(0,a.useLocalState)(t,"accDeposit",""),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Name Here",onChange:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"0",onChange:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:s})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCardInfo=t.AgentCardAppearances=t.AgentCard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AgentCard=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"id-card"})," Appearance"]},"Appearance")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);default:return(0,o.createComponentVNode)(2,i)}}(d)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.registered_name,d=i.sex,u=i.age,s=i.assignment,m=i.associated_account_number,p=i.blood_type,h=i.dna_hash,f=i.fingerprint_hash,C=i.photo,N=i.ai_tracking;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Card Info",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"[UNSET]",onClick:function(){return c("change_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sex",children:(0,o.createComponentVNode)(2,a.Button,{iconRight:!1,content:d||"[UNSET]",onClick:function(){return c("change_sex")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Age",children:(0,o.createComponentVNode)(2,a.Button,{content:u||"[UNSET]",onClick:function(){return c("change_age")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,a.Button,{content:s||"[UNSET]",onClick:function(){return c("change_occupation")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"[UNSET]",onClick:function(){return c("change_fingerprints")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"[UNSET]",onClick:function(){return c("change_blood_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"DNA Hash",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"[UNSET]",onClick:function(){return c("change_dna_hash")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Money Account",children:(0,o.createComponentVNode)(2,a.Button,{content:m||"[UNSET]",onClick:function(){return c("change_money_account")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo",children:(0,o.createComponentVNode)(2,a.Button,{content:C?"Update":"[UNSET]",onClick:function(){return c("change_photo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Card Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card Info",children:(0,o.createComponentVNode)(2,a.Button,{content:"Delete Card Info",onClick:function(){return c("delete_info")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:(0,o.createComponentVNode)(2,a.Button,{content:"Reset Access",onClick:function(){return c("clear_access")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"AI Tracking",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Untrackable":"Trackable",onClick:function(){return c("change_ai_tracking")}})})]})})],4)};t.AgentCardInfo=i;var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.appearances;return(0,o.createComponentVNode)(2,a.Section,{title:"Card Appearance",children:i.map((function(e){return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+e.image,style:{"vertical-align":"middle",width:"64px",margin:"0px","margin-left":"0px"},onclick:function(){return c("change_appearance",{new_appearance:e.name})}},e.name)}))})};t.AgentCardAppearances=l},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_power?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_power?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&2!==d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock||0===d.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(227);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),!a&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,d=c.data,u=d.air,s=d.mode,m=d.atmos_alarm,p=d.locked,h=d.alarmActivated,f=d.rcon,C=d.target_temp;return n=0===u.danger.overall?0===m?"Optimal":"Caution: Atmos alert in area":1===u.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,a.Section,{title:"Air Status",children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.pressure),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.pressure})," kPa",!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:3===s?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===s,icon:"exclamation-triangle",onClick:function(){return i("mode",{mode:3===s?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.oxygen/100,fractionDigits:"1",color:l(u.danger.oxygen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.nitrogen/100,fractionDigits:"1",color:l(u.danger.nitrogen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.co2/100,fractionDigits:"1",color:l(u.danger.co2)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.plasma/100,fractionDigits:"1",color:l(u.danger.plasma)})}),u.contents.n2o>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrous Oxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.n2o/100,fractionDigits:"1",color:l(u.danger.n2o)})}),u.contents.other>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.other/100,fractionDigits:"1",color:l(u.danger.other)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.temperature),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature})," K /"," ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return i("temperature")}}),(0,o.createComponentVNode)(2,a.Button,{content:u.thermostat_state?"On":"Off",selected:u.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.overall),children:[n,!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Off",selected:1===f,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Auto",selected:2===f,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,a.Button,{content:"On",selected:3===f,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,a.Box,{children:"Unable to acquire air sample!"})})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),c=n[0],i=n[1];return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===c,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},s=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0];n[1];switch(a){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,p);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return c("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,a.Button,{content:"External",selected:1===e.checks,onClick:function(){return c("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return c("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"cog",onClick:function(){return c("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return c("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return c("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return c("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return c("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return c("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return c("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return c("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return c("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.modes,d=i.presets,u=i.emagged,s=i.mode,m=i.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!u)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===s,onClick:function(){return c("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===m,onClick:function(){return c("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.thresholds;return(0,o.createComponentVNode)(2,a.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return c("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AirlockAccessController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.exterior_status,m=u.interior_status,p=u.processing;return n="open"===s?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:p,onClick:function(){return d("force_ext")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext_door")}}),i="open"===m?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:p,color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int_door")}}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Door Status",children:"closed"===s?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Door Status",children:"closed"===m?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:i})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(99);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,d)]})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,a.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:1})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:2})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:4})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:8})}})})]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.selected_accesses,u=l.one_access,s=l.regions;return(0,o.createComponentVNode)(2,i.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:"One",onClick:function(){return c("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,content:"All",onClick:function(){return c("set_one_access",{access:"all"})}})],4),accesses:s,selectedList:d,accessMod:function(e){return c("set",{access:e})},grantAll:function(){return c("grant_all")},denyAll:function(){return c("clear_all")},grantDep:function(e){return c("grant_region",{region:e})},denyDep:function(e){return c("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.change_race,s=d.species,m=d.specimen,p=d.change_gender,h=d.gender,f=d.has_gender,C=d.change_eye_color,N=d.change_skin_tone,b=d.change_skin_color,V=d.change_head_accessory_color,g=d.change_hair_color,v=d.change_secondary_hair_color,y=d.change_facial_hair_color,x=d.change_secondary_facial_hair_color,_=d.change_head_marking_color,k=d.change_body_marking_color,L=d.change_tail_marking_color,B=d.change_head_accessory,w=d.head_accessory_styles,S=d.head_accessory_style,I=d.change_hair,T=d.hair_styles,A=d.hair_style,E=d.change_hair_gradient,M=d.change_facial_hair,O=d.facial_hair_styles,P=d.facial_hair_style,F=d.change_head_markings,R=d.head_marking_styles,D=d.head_marking_style,j=d.change_body_markings,W=d.body_marking_styles,z=d.body_marking_style,U=d.change_tail_markings,H=d.tail_marking_styles,G=d.tail_marking_style,K=d.change_body_accessory,Y=d.body_accessory_styles,q=d.body_accessory_style,$=d.change_alt_head,X=d.alt_head_styles,J=d.alt_head_style,Q=!1;return(C||N||b||V||g||v||y||x||_||k||L)&&(Q=!0),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.specimen,selected:e.specimen===m,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,a.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Q&&(0,o.createComponentVNode)(2,i),!!B&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head accessory",children:w.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===S,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!I&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair",children:T.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.hairstyle,selected:e.hairstyle===A,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!E&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!M&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Facial hair",children:O.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===P,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!F&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head markings",children:R.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body markings",children:W.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!U&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===G,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!K&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!$&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternate head",children:X.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.altheadstyle,selected:e.altheadstyle===J,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!i[e.key]&&(0,o.createComponentVNode)(2,a.Button,{content:e.text,onClick:function(){return c(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.priority||[],d=i.minor||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-bad",e,0,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(68),i=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),u=c[0],s=c[1];return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:0===u,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,c.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,a.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Access",onClick:function(){return i("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"zoom",1),i=c[0],l=c[1],d=n.alarms;return(0,o.createComponentVNode)(2,a.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,a.NanoMap,{onZoom:function(e){return l(e)},children:d.filter((function(e){return 2===e.z})).map((function(e){return(0,o.createComponentVNode)(2,a.NanoMap.Marker,{x:e.x,y:e.y,zoom:i,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0)},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.pressure,s=l.max_pressure,m=l.filter_type,p=l.filter_type_list;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_pressure")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.gas_type===m,content:e.label,onClick:function(){return i("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.pressure,m=d.max_pressure,p=d.node1_concentration,h=d.node2_concentration;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:m,value:s,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:s===m,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,i,{node_name:"Node 1",node_ref:p}),(0,o.createComponentVNode)(2,i,{node_name:"Node 2",node_ref:h})]})})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:i,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return c("set_node",{node_name:i,concentration:t/100})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.rate,s=l.max_rate,m=l.gas_unit,p=l.step;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_rate")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:m,width:6.1,lineHeight:1.5,step:p,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosTankControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(16),i=n(44),l=n(3);t.AtmosTankControl=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.sensors||{};return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[Object.keys(s[e]).indexOf("pressure")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[s[e].pressure," kpa"]}):"",Object.keys(s[e]).indexOf("temperature")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[s[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map((function(t){return Object.keys(s[e]).indexOf(t)>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,i.getGasLabel)(t),children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(0,i.getGasColor)(t),value:s[e][t],minValue:0,maxValue:100,children:(0,c.toFixed)(s[e][t],2)+"%"})},(0,i.getGasLabel)(t)):""}))]})},e)})),u.inlet&&Object.keys(u.inlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Inlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.inlet.on,"power-off"),content:u.inlet.on?"On":"Off",color:u.inlet.on?null:"red",selected:u.inlet.on,onClick:function(){return d("toggle_active",{dev:"inlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:u.inlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"inlet",val:t})}})})]})}):"",u.outlet&&Object.keys(u.outlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Outlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.outlet.on,"power-off"),content:u.outlet.on?"On":"Off",color:u.outlet.on?null:"red",selected:u.outlet.on,onClick:function(){return d("toggle_active",{dev:"outlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:u.outlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"outlet",val:t})}})})]})}):""]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=n(20),u=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,c.useBackend)(t),s=n.act,m=n.data,p=m.total_amount,h=(m.max_amount,m.metal_amount),f=m.glass_amount,C=m.busyname,N=(m.busyamt,m.showhacked,m.buildQueue),b=m.buildQueueLen,V=m.recipes,g=m.categories,v=(0,c.useSharedState)(t,"category",0),y=v[0],x=v[1];0===y&&(y="Tools");var _=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),k=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),L=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),B=(0,c.useSharedState)(t,"search_text",""),w=B[0],S=B[1],I=(0,d.createSearch)(w,(function(e){return e.name})),T="";b>0&&(T=N.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:N[t][0],onClick:function(){return s("remove_from_queue",{remove_from_queue:N.indexOf(e)+1})}},e)},t)})));var A=(0,r.flow)([(0,a.filter)((function(e){return(e.category.indexOf(y)>-1||w)&&(m.showhacked||!e.hacked)})),w&&(0,a.filter)(I),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(V),E="Build";w?E="Results for: '"+w+"':":y&&(E="Build ("+y+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Section,{title:E,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:g,selected:y,onSelected:function(e){return x(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return S(t)},mb:1}),A.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&1===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,1),onClick:function(){return s("make",{make:e.uid,multiplier:1})},children:(0,d.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&10===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,10),onClick:function(){return s("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&25===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,25),onClick:function(){return s("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&m.busyamt===e.max_multiplier,disabled:!u(e,m.metal_amount,m.glass_amount,e.max_multiplier),onClick:function(){return s("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,d.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,i.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metal",children:_}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Glass",children:k}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total",children:L}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Storage",children:[m.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Building",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Build Queue",children:[T,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Clear All",disabled:!m.buildQueueLen,onClick:function(){return s("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.Biogenerator=function(e,t){var n=(0,r.useBackend)(t),a=n.data,m=n.config,p=a.container,h=a.processing,f=m.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:h,name:f}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),p?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"flask",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.biomass,l=c.container,d=c.container_curr_reagents,u=c.container_max_reagents;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",children:i}),(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:d+" / "+u+" units"})}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"None"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_plants,d=i.container;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return c("activate")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!d,tooltip:d?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return c("detach_container")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return c("eject_plants")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.biomass,d=i.product_list,u=(0,r.useSharedState)(t,"vendAmount",1),s=u[0],m=u[1],p=Object.entries(d).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,a.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*s,(0,o.createComponentVNode)(2,a.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"40%",children:(0,o.createComponentVNode)(2,a.Button,{content:"Vend",disabled:lm?"bad":"good";return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(m>V)&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Level",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===s,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===s,onClick:function(){return l("set",{set_level:m})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===s,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:s,fillValue:m,minValue:0,color:v,maxValue:N,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:s===N,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:s===N,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:N})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Power Use",children:(0,i.formatPower)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power for next level",children:(0,i.formatPower)(g)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Surplus Power",children:(0,i.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Points",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.price>=p,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,c.Box,{children:t},t)],0)}),null):null},h=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,a.useBackend)(t).data,r=n.occupied,c=n.occupant,l=void 0===c?{}:c,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,y);return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"print",onClick:function(){return i("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",onClick:function(){return i("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Implants",children:d.implant_len?(0,o.createComponentVNode)(2,c.Box,{children:d.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"None"})})]})})},N=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,c.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])}))}):(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,c.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:s,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[p([!!e.status.splinted&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:p([1===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},y=function(){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BookBinder=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=n(34);t.BookBinder=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.selectedbook,m=u.book_categories,p=[];return m.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Book Binder",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:m.map((function(e){return e.description})),onSelected:function(e){return d("toggle_binder_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),m.filter((function(e){return s.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return d("toggle_binder_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:s.summary})]})})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return d("print_book")}})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.cleanblood;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Clean Blood",disabled:u,onClick:function(){return l("blood")}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotFloor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotFloor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.hullplating,p=d.replace,h=d.eat,f=d.make,C=d.fixfloor,N=d.nag_empty,b=d.magnet,V=d.tiles_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Floor Settings",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:V})}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Add tiles to new hull plating",disabled:u,onClick:function(){return l("autotile")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Replace floor tiles",disabled:u,onClick:function(){return l("replacetiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:u,onClick:function(){return l("fixfloors")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Miscellaneous",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:u,onClick:function(){return l("eattiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Make pieces of metal into tiles when empty",disabled:u,onClick:function(){return l("maketiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Transmit notice when empty",disabled:u,onClick:function(){return l("nagonempty")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"Traction Magnets",disabled:u,onClick:function(){return l("anchored")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotHonk=void 0;var o=n(0),r=n(1),a=(n(2),n(3)),c=n(100);t.BotHonk=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.BotStatus)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotMed=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotMed=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.shut_up,p=d.declare_crit,h=d.stationary_mode,f=d.heal_threshold,C=d.injection_amount,N=d.use_beaker,b=d.treat_virus,V=d.reagent_glass;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Communication Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!m,disabled:u,onClick:function(){return l("toggle_speaker")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:p,disabled:u,onClick:function(){return l("toggle_critical_alerts")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Treatment Settings",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{value:f.value,minValue:f.min,maxValue:f.max,step:5,disabled:u,onChange:function(e,t){return l("set_heal_threshold",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Level",children:(0,o.createComponentVNode)(2,a.Slider,{value:C.value,minValue:C.min,maxValue:C.max,step:5,format:function(e){return e+"u"},disabled:u,onChange:function(e,t){return l("set_injection_amount",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Beaker":"Internal Synthesizer",icon:N?"flask":"cogs",disabled:u,onClick:function(){return l("toggle_use_beaker")}})}),V&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V.amount,minValue:0,maxValue:V.max_amount,children:[V.amount," / ",V.max_amount]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,a.Button,{content:"Eject",disabled:u,onClick:function(){return l("eject_reagent_glass")}})})]})})]}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Treat Viral Infections",checked:b,disabled:u,onClick:function(){return l("toggle_treat_viral")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:u,onClick:function(){return l("toggle_stationary_mode")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.check_id,p=d.check_weapons,h=d.check_warrant,f=d.arrest_mode,C=d.arrest_declare;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unidentifiable Persons",disabled:u,onClick:function(){return l("authid")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Weapons",disabled:u,onClick:function(){return l("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:u,onClick:function(){return l("authwarrant")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Detain Targets Indefinitely",disabled:u,onClick:function(){return l("arrtype")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:u,onClick:function(){return l("arrdeclare")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),a=n(2),c=n(1),i=function(e,t){var n=e.cell,r=(0,c.useBackend)(t).act,i=n.cell_id,l=n.occupant,d=n.crimes,u=n.brigged_by,s=n.time_left_seconds,m=n.time_set_seconds,p=n.ref,h="";s>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,a.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:i}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:u}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:m})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{type:"button",onClick:function(){r("release",{ref:p})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,a.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,i,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,c.useBackend)(t),i=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:i})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:l.occupant}));var d="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(d="exclamation-triangle"));var u=[],s=0;for(s=0;se.current_positions&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"-",disabled:s.cooldown_time||!e.can_close,onClick:function(){return u("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"+",disabled:s.cooldown_time||!e.can_open,onClick:function(){return u("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:s.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,a.Button,{content:e.is_priority?"Yes":"No",selected:e.is_priority,disabled:s.cooldown_time||!e.can_prioritize,onClick:function(){return u("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=s.authenticated&&s.scan_name?s.modify_name?(0,o.createComponentVNode)(2,i.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(e){return u("set",{access:e})},grantAll:function(){return u("grant_all")},denyAll:function(){return u("clear_all")},grantDep:function(e){return u("grant_region",{region:e})},denyDep:function(e){return u("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,a.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=s.authenticated?s.records.length?(0,o.createComponentVNode)(2,a.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||0===s.records.length||s.target_dept,onClick:function(){return u("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.reason}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||0===s.records.length,onClick:function(){return u("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=s.authenticated&&s.scan_name?(0,o.createComponentVNode)(2,a.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return u("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p,m,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(42),a=n(26),c=n(1),i=n(2),l=n(3),d=(n(45),n(20)),u=n(34);t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)]})})};var s=function(e,t){var n=(0,c.useLocalState)(t,"contentsModal",null),r=n[0],a=n[1],l=(0,c.useLocalState)(t,"contentsModalTitle",null),d=l[0],u=l[1];return null!==r&&null!==d?(0,o.createComponentVNode)(2,i.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[d,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,i.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Close",onClick:function(){a(null),u(null)}})})]}):void 0},m=function(e,t){var n,r,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=d.is_public,s=d.timeleft,m=d.moving,p=d.at_station;return m||p?!m&&p?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==s?"Shuttle is en route (ETA: "+s+" minutes)":"Shuttle is en route (ETA: "+s+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:n}),0===u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n,r=(0,c.useBackend)(t),a=(r.act,r.data.accounts),l=(0,c.useLocalState)(t,"selectedAccount"),d=l[0],u=l[1],s=[];return a.map((function(e){return s[e.name]=e.account_UID})),(0,o.createComponentVNode)(2,i.Section,{title:"Payment",children:[(0,o.createComponentVNode)(2,i.Dropdown,{mt:.6,width:"190px",options:a.map((function(e){return e.name})),selected:null==(n=a.filter((function(e){return e.account_UID===d}))[0])?void 0:n.name,onSelected:function(e){return u(s[e])}}),a.filter((function(e){return e.account_UID===d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Name",children:e.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Balance",children:e.balance})]},e.account_UID)}))]})},h=function(e,t){var n=(0,c.useBackend)(t),l=n.act,u=n.data,s=u.categories,m=u.supply_packs,p=(0,c.useSharedState)(t,"category","Emergency"),h=p[0],f=p[1],C=(0,c.useSharedState)(t,"search_text",""),N=C[0],b=C[1],V=(0,c.useLocalState)(t,"contentsModal",null),g=(V[0],V[1]),v=(0,c.useLocalState)(t,"contentsModalTitle",null),y=(v[0],v[1]),x=(0,d.createSearch)(N,(function(e){return e.name})),_=(0,c.useLocalState)(t,"selectedAccount"),k=_[0],L=(_[1],(0,r.flow)([(0,a.filter)((function(e){return e.cat===s.filter((function(e){return e.name===h}))[0].category||N})),N&&(0,a.filter)(x),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(m)),B="Crate Catalogue";return N?B="Results for '"+N+"':":h&&(B="Browsing "+h),(0,o.createComponentVNode)(2,i.Section,{title:B,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:s.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return b(t)},mb:1}),(0,o.createComponentVNode)(2,i.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:L.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Order 1",icon:"shopping-cart",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:0,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:1,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Contents",icon:"search",onClick:function(){g(e.contents),y(e.name)}})]})]},e.name)}))})})]})},f=function(e,t){var n,r,a=e.request;switch(a.department){case"Engineering":r="CE",n="orange";break;case"Medical":r="CMO",n="teal";break;case"Science":r="RD",n="purple";break;case"Supply":r="CT",n="brown";break;case"Service":r="HOP",n="olive";break;case"Security":r="HOS",n="red";break;case"Command":r="CAP",n="blue";break;case"Assistant":r="Any Head",n="grey"}return(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:"Approval Required:"}),Boolean(a.req_cargo_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),Boolean(a.req_head_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{children:(0,o.createComponentVNode)(2,i.Button,{color:n,content:r,disabled:a.req_cargo_approval,icon:"user-tie",tooltip:a.req_cargo_approval?"This Order first requires approval from the QM before the "+r+" can approve it":"This Order requires approval from the "+r+" still"})})]})},C=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.requests,d=a.orders,u=a.shipments;return(0,o.createComponentVNode)(2,i.Section,{title:"Orders",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{className:"Cargo_RequestList",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{children:["Order #",e.ordernum,": ",e.supply_type," (",e.cost," credits) for"," ",(0,o.createVNode)(1,"b",null,e.orderedby,0)," with"," ",e.department?"The "+e.department+" Department":"Their Personal"," ","Account"]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]}),(0,o.createComponentVNode)(2,f,{request:e})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Approve",color:"green",disabled:!e.can_approve,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Deny",color:"red",disabled:!e.can_deny,onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Order in Transit"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChangelogView=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ChangelogView=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,r.useLocalState)(t,"onlyRecent",0),u=d[0],s=d[1],m=l.cl_data,p=l.last_cl,h={FIX:(0,o.createComponentVNode)(2,a.Icon,{name:"tools",title:"Fix"}),WIP:(0,o.createComponentVNode)(2,a.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,o.createComponentVNode)(2,a.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,o.createComponentVNode)(2,a.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})};return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:u?"Showing all changes":"Showing changes since last connection",onClick:function(){return s(!u)}}),children:m.map((function(e){return!u&&e.merge_ts<=p||(0,o.createComponentVNode)(2,a.Section,{mb:2,title:e.author+" - Merged on "+e.merge_date,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"#"+e.num,onClick:function(){return i("open_pr",{pr_number:e.num})}}),children:e.entries.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:[(t=e.etype,t in h?h[t]:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",color:"green"}))," ",e.etext]},e);var t}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(126),i=n(3),l=[1,5,10,20,30,50],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.amount,u=i.energy,s=i.maxEnergy;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:l.glass?"Glass":"Beaker",flex:"content",minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return i("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return i("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return i("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return i("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(126),l=n(3);t.ChemHeater=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.targetTemp,u=l.targetTempReached,s=l.autoEject,m=l.isActive,p=l.currentTemp,h=l.isBeakerLoaded;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",flexBasis:"content",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{content:"Auto-eject",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return i("toggle_autoeject")}}),(0,o.createComponentVNode)(2,c.Button,{content:m?"On":"Off",icon:"power-off",selected:m,disabled:!h,onClick:function(){return i("toggle_on")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(d,0),minValue:0,maxValue:1e3,onDrag:function(e,t){return i("adjust_temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",color:u?"good":"average",children:h&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:p,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.isBeakerLoaded,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.beakerContents;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",flexGrow:"1",buttons:!!d&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[u," / ",s," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return r("eject_beaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:d,beakerContents:m})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(126),l=n(30),d=[1,5,10],u=["bottle.png","small_bottle.png","wide_bottle.png","round_bottle.png","reagent_bottle.png"];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,i=n.beaker,d=n.beaker_reagents,u=void 0===d?[]:d,h=n.buffer_reagents,f=void 0===h?[]:h,N=n.mode;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s,{beaker:i,beakerReagents:u,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,m,{mode:N,bufferReagents:f}),(0,o.createComponentVNode)(2,p,{isCondiment:a,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,C)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t).act,c=e.beaker,u=e.beakerReagents,s=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"0",flexBasis:"300px",buttons:s?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:c?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!i.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:i.printing?"spinner":"print",disabled:i.printing,iconSpin:!!i.printing,ml:"0.5rem",content:"Print",onClick:function(){return c("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(44),l=n(30),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.menu;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return i("lock")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return i("eject")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,c.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return i("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return i("scan")}})]}),(0,o.createComponentVNode)(2,c.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,c.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return i("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,c.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.records;return i.length?(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,c.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,c.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.scanner,d=i.numberofpods,u=i.autoallowed,s=i.autoprocess;i.disk;return(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:(0,o.createFragment)(!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColourMatrixTester=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ColourMatrixTester=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.colour_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Modify Matrix",children:[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]].map((function(e){return(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:e.map((function(e){return(0,o.createFragment)([e.name,(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{value:l[e.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(t,n){return i("setvalue",{idx:e.idx+1,value:n})}})],0,e.name)}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){switch(e){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,m);case 3:return(0,o.createComponentVNode)(2,p);case 4:return(0,o.createComponentVNode)(2,f);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}};t.CommunicationsComputer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.menu_state);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),i(a)]})})};var l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authenticated,u=l.noauthbutton,s=l.esc_section,m=l.esc_callable,p=l.esc_recallable,h=l.esc_status,f=l.authhead,C=l.is_ai,N=l.lastCallLoc,b=!1;return d?1===d?n="Command":2===d?n="Captain":3===d?n="CentComm Officer":4===d?(n="CentComm Secure Connection",b=!0):n="ERROR: Report This Bug!":n="Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:n})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,disabled:u,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return i("auth")}})})})}),!!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:h}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!f,onClick:function(){return i("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!f||C,onClick:function(){return i("cancelshuttle")}})}),!!N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Last Call/Recall From",children:N})]})})],0)},d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.is_admin?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.gamma_armory_location,u=i.admin_levels,m=i.authenticated,p=i.ert_allowed;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"CentComm Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:u,required_access:l,use_confirm:1})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!l,onClick:function(){return c("send_to_cc_announcement_page")}}),4===m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Make Other Announcement",disabled:!l,onClick:function(){return c("make_other_announcement")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Response Team",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!l,onClick:function(){return c("dispatch_ert")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:p,content:p?"ERT calling enabled":"ERT calling disabled",tooltip:p?"Command can request an ERT":"ERTs cannot be requested",disabled:!l,onClick:function(){return c("toggle_ert_allowed")},selected:null})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!l,onClick:function(){return c("send_nuke_codes")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gamma Armory",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"biohazard",content:d?"Send Gamma Armory":"Recall Gamma Armory",disabled:!l,onClick:function(){return c("move_gamma_armory")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"coins",content:"View Economy",disabled:!l,onClick:function(){return c("view_econ")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fax",content:"Fax Manager",disabled:!l,onClick:function(){return c("view_fax")}})]})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"View Command accessible controls",children:(0,o.createComponentVNode)(2,s)})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.msg_cooldown,d=i.emagged,u=i.cc_cooldown,s=i.security_level_color,m=i.str_security_level,p=i.levels,f=i.authcapt,C=i.authhead,N=i.messages,b="Make Priority Announcement";l>0&&(b+=" ("+l+"s)");var V=d?"Message [UNKNOWN]":"Message CentComm",g="Request Authentication Codes";return u>0&&(V+=" ("+u+"s)",g+=" ("+u+"s)"),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:s,children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:p,required_access:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:b,disabled:!f||l>0,onClick:function(){return c("announce")}})}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:V,disabled:!f||u>0,onClick:function(){return c("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!f,onClick:function(){return c("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:V,disabled:!f||u>0,onClick:function(){return c("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",content:g,disabled:!f||u>0,onClick:function(){return c("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!C,onClick:function(){return c("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:"View ("+N.length+")",disabled:!C,onClick:function(){return c("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!C,onClick:function(){return c("RestartNanoMob")}})})]})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.stat_display,d=i.authhead,u=(i.current_message_title,l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return c("setstat",{statdisp:e.name})}},e.name)}))),s=l.alerts.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.alert===l.icon,disabled:!d,onClick:function(){return c("setstat",{statdisp:3,alert:e.alert})}},e.alert)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alerts",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return c("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return c("setmsg2")}})})]})})},p=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authhead,u=l.current_message_title,s=l.current_message,m=l.messages;l.security_level;if(u)n=(0,o.createComponentVNode)(2,a.Section,{title:u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!d,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:s})});else{var p=m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!d||u===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"times",content:"Delete",disabled:!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));n=(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p})})}return(0,o.createComponentVNode)(2,a.Box,{children:n})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.levels,d=e.required_access,u=e.use_confirm,s=i.security_level;return u?l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)})):l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)}))},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.possible_cc_sounds;if(!l)return c("main");var u=(0,r.useLocalState)(t,"subtitle",""),s=u[0],m=u[1],p=(0,r.useLocalState)(t,"text",""),h=p[0],f=p[1],C=(0,r.useLocalState)(t,"classified",0),N=C[0],b=C[1],V=(0,r.useLocalState)(t,"beepsound","Beep"),g=V[0],v=V[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Central Command Report",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:s,onChange:function(e,t){return m(t)},mb:"5px"}),(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:h,onChange:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("make_cc_announcement",{subtitle:s,text:h,classified:N,beepsound:g})}}),(0,o.createComponentVNode)(2,a.Flex,{mt:"5px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"260px",height:"20px",options:d,selected:g,onSelected:function(e){return v(e)},disabled:N})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",mx:"5px",disabled:N,tooltip:"Test sound",onClick:function(){return c("test_sound",{sound:g})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Classified",fluid:!0,tooltip:N?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!N)}})})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CompostBin=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.CompostBin=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.biomass,u=l.compost,s=l.biomass_capacity,m=l.compost_capacity,p=(0,r.useSharedState)(t,"vendAmount",1),h=p[0],f=p[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{label:"Resources",children:[(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Biomass",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[d," / ",s," Units"]})})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compost",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:m,ranges:{good:[.5*m,Infinity],average:[.25*m,.5*m],bad:[-Infinity,.25*m]},children:[u," / ",m," Units"]})})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:h,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(e,t){return f(t)}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",textAlign:"right",width:"0%",children:(0,o.createComponentVNode)(2,a.Button,{align:"right",content:"Make Soil",disabled:u<25*h,icon:"arrow-circle-down",onClick:function(){return i("create",{amount:h})}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(229),l=n(3);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},s=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,d=r.data;n=d.unauthorized?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):d.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"hidden",children:1===d.page?(0,o.createComponentVNode)(2,h,{height:"100%"}):(0,o.createComponentVNode)(2,C,{height:"100%"})})],4):(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:s,finishedTimeout:3e3,onFinished:function(){return i("complete_load_animation")}})});var u=(0,a.useLocalState)(t,"viewingPhoto",""),f=u[0];u[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[f&&(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:n})})]})};var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.tc_available,d=i.tc_paid_out,u=i.completed_contracts,s=i.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,c.Box,{verticalAlign:"middle",mt:"0.25rem",children:[s," Rep"]})},e,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,c.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Earned",children:[d," TC"]})]})}),(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:u})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"shopping-cart"}),"Hub"]})]})))},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.contracts,s=l.contract_active,m=l.can_extract,p=!!s&&d.filter((function(e){return 1===e.status}))[0],h=p&&p.time_left>0,C=(0,a.useLocalState)(t,"viewingPhoto",""),N=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,c.Button,{disabled:!m||h,icon:"parachute-box",content:["Call Extraction",h&&(0,o.createComponentVNode)(2,i.Countdown,{timeLeft:p.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,c.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return N("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,c.Box,{width:"100%",children:[!!u[e.status]&&(0,o.createComponentVNode)(2,c.Box,{color:u[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:u[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",f(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!!s,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,c.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},f=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,a=e.objective.locs.target_area_id,i=e.objective.locs.target_coords,l=t===a;return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(i[1]-n[1],i[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.rep,d=i.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,c.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,c.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),b=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.slowFactor,u=l.oneWay,s=l.position;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lever position",children:s>0?"forward":s<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,onClick:function(){return i("toggleOneWay")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",onClick:function(){return i("slowFactor",{value:d-5})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-left",onClick:function(){return i("slowFactor",{value:d-1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Slider,{width:"100px",mx:"1px",value:d,fillValue:d,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return i("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-right",onClick:function(){return i("slowFactor",{value:d+1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",onClick:function(){return i("slowFactor",{value:d+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(26),a=n(20),c=n(1),i=n(2),l=n(68),d=n(44),u=n(3),s=n(34),m=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.possible_levels,d=a.viewing_current_z_level,m=a.is_advanced,p=(0,c.useLocalState)(t,"tabIndex",0),C=p[0],N=p[1];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,s.FlexItem,{grow:!0,basis:100,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===C,onClick:function(){return N(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===C,onClick:function(){return N(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),m?(0,o.createComponentVNode)(2,s.FlexItem,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:l,selected:d,onSelected:function(e){return r("switch_level",{new_level:e})}})}):null]})}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}(C)]})})})};var h=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,h=(0,r.sortBy)((function(e){return e.name}))(s.crewmembers||[]),f=(0,c.useLocalState)(t,"search",""),C=f[0],N=f[1],b=(0,a.createSearch)(C,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Location"})]}),h.filter(b).map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p(e,s.critThreshold),children:m(e,s.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"grey",children:"Not Available"})})]},e.name)}))]})]})},f=function(e,t){var n=(0,c.useBackend)(t).data,r=(0,c.useLocalState)(t,"zoom",1),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return l(e)},children:n.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:a,icon:"circle",tooltip:e.name+" ("+e.assignment+")",color:p(e,n.critThreshold)},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,V=d.auto_eject_healthy,g=d.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return c(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dosage interval",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{average:[-Infinity,99],good:[99,Infinity]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c(V?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:V?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c(g?"auto_eject_dead_off":"auto_eject_dead_on")},children:g?"On":"Off"})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.isBeakerLoaded,l=c.beakerLabel,d=c.beakerVolume;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:!l&&"average",children:l||"No label"}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",float:"right",color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],4):(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"bad",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,i=n.account_name,u=n.allow_items;return(0,o.createComponentVNode)(2,c.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!u&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored crew!"})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.frozen_items,d=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,i.toTitleCase)(t)};return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Items",children:l.length?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:d(e.name),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return c("one_item",{item:e.uid})}})},e)}))})}),(0,o.createComponentVNode)(2,a.Button,{content:"Drop All Items",color:"red",onClick:function(){return c("all_items")}})],4):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,g,{duration:d})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),n,(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.locked,u=i.hasOccupant,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return c("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return c("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:i.occupant.uniqueEnzymes?i.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return i("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedUIBlock,d=i.selectedUISubBlock,u=i.selectedUITarget,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return c("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return c("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedSEBlock,d=i.selectedSESubBlock,u=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return c("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.radiationIntensity,d=i.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.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 c("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:c}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.id,d=e.name,u=e.buffer,s=i.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return c("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return c("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!i.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return c("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!i.hasDisk||!i.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return c("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return c("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.hasDisk,d=i.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return c("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.isBeakerLoaded,d=i.beakerVolume,s=i.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return c("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return c("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=i.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var i=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===i,content:m[e+r],mb:"0",onClick:function(){return c(s,{block:t,subblock:i})}}))},i=0;ii.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert",{silent:u})}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.ert_request_messages;return(0,o.createComponentVNode)(2,a.Section,{children:l&&l.length?l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.time,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.sender_real_name,onClick:function(){return c("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel"}),children:e.message},(0,i.decodeHtmlEntities)(e.time))})):(0,o.createComponentVNode)(2,a.Box,{fluid:!0,italic:!0,textAlign:"center",children:"No ERT requests"})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,(0,r.useLocalState)(t,"text","")),l=i[0],d=i[1];return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:l,onChange:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("deny_ert",{reason:l})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.EconomyManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=n(45);t.EconomyManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.next_payroll_time;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Global",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"global"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Members",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department_members"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Single Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return c("delay_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){return c("set_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return c("accelerate_payroll")}})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,h=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:h/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmotePanelContent=t.EmotePanel=void 0;var o=n(0),r=n(1),a=n(3),c=n(2);t.EmotePanel=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),a=n.act,i=n.data.emotes,l=(0,r.useLocalState)(t,"searchText",""),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"filterVisible",""),m=s[0],p=s[1],h=(0,r.useLocalState)(t,"filterAudible",""),f=h[0],C=h[1],N=(0,r.useLocalState)(t,"filterSound",""),b=N[0],V=N[1],g=(0,r.useLocalState)(t,"filterHands",""),v=g[0],y=g[1],x=(0,r.useLocalState)(t,"filterTargettable",""),_=x[0],k=x[1],L=(0,r.useLocalState)(t,"useTarget",""),B=L[0],w=L[1],S=(0,o.createComponentVNode)(2,c.Input,{placeholder:"\u0418\u0441\u043a\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u044e...",fluid:!0,onInput:function(e,t){return u(t)}});return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",buttons:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"eye",width:"100%",height:"100%",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043c\u044b\u0439",selected:m,onClick:function(){return p(!m)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"comment",width:"100%",height:"100%",align:"center",tooltip:"\u0421\u043b\u044b\u0448\u0438\u043c\u044b\u0439",selected:f,onClick:function(){return C(!f)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"volume-up",width:"100%",height:"100%",align:"center",tooltip:"\u0417\u0432\u0443\u043a",selected:b,onClick:function(){return V(!b)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"hand-paper",width:"100%",height:"100%",align:"center",tooltip:"\u0420\u0443\u043a\u0438",selected:v,onClick:function(){return y(!v)}}),(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",width:"100%",height:"100%",align:"center",tooltip:"\u0426\u0435\u043b\u044c",selected:_,onClick:function(){return k(!_)}})]}),children:S}),(0,o.createComponentVNode)(2,c.Section,{title:d.length>0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+d+'"':"\u0412\u0441\u0435 \u044d\u043c\u043e\u0446\u0438\u0438",fill:!0,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"crosshairs",selected:B,onClick:function(){return w(!B)},children:"\u0412\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0446\u0435\u043b\u044c"}),children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{children:i.filter((function(e){return e.key&&(!(d.length>0)||(e.key.toLowerCase().includes(d.toLowerCase())||e.name.toLowerCase().includes(d.toLowerCase())))&&(!m||e.visible)&&(!f||e.audible)&&(!b||e.sound)&&(!v||e.hands)&&(!_||e.targettable)})).map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return a("play_emote",{emote_key:e.key,useTarget:B})},children:[e.visible?(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}):"",e.audible?(0,o.createComponentVNode)(2,c.Icon,{name:"comment"}):"",e.sound?(0,o.createComponentVNode)(2,c.Icon,{name:"volume-up"}):"",e.hands?(0,o.createComponentVNode)(2,c.Icon,{name:"hand-paper"}):"",e.targettable?(0,o.createComponentVNode)(2,c.Icon,{name:"crosshairs"}):"",e.name.toUpperCase()]},e.name)}))})})})]})};t.EmotePanelContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.can_respec;return(0,o.createComponentVNode)(2,a.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){return c("readapt")}}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.evo_points,d=i.ability_list,u=i.purchased_abilities,s=i.view_mode,m=(0,r.useLocalState)(t,"tab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:s?"square-o":"check-square-o",selected:!s,content:"Compact",onClick:function(){return c("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:s?"check-square-o":"square-o",selected:s,content:"Expanded",onClick:function(){return c("set_view_mode",{mode:1})}})],4),children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){h(0)},children:"Offense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){h(1)},children:"Defense"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:"Utility"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===p,onClick:function(){return h(3)},children:"Stings"})]}),d[p].map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),u.includes(e.power_path)&&(0,o.createComponentVNode)(2,a.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,o.createComponentVNode)(2,a.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mr:.5,disabled:e.cost>l||u.includes(e.power_path),content:"Evolve",onClick:function(){return c("purchase",{power_path:e.power_path})}})})]}),!!s&&(0,o.createComponentVNode)(2,a.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(8),a=n(20),c=n(1),i=n(2),l=n(229),d=n(3),u=["id","amount","lineDisplay","onClick"];var s={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data.building);return(0,o.createComponentVNode)(2,d.Window,{children:(0,o.createComponentVNode)(2,d.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),r&&(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,f)})]})})]})})})};var m=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.materials,d=a.capacity,u=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,i.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.25rem",children:[(u/d*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,C,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,c.useBackend)(t),r=n.act,l=n.data,d=l.curCategory,u=l.categories,s=l.designs,m=l.syncing,p=(0,c.useLocalState)(t,"searchText",""),h=p[0],f=p[1],C=(0,a.createSearch)(h,(function(e){return e.name})),b=s.filter(C);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,i.Dropdown,{selected:d,options:u,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,i.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:m,iconSpin:m,icon:"sync-alt",content:m?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),b.map((function(e){return(0,o.createComponentVNode)(2,N,{design:e},e.id)})),0===b.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No designs found."})]})},h=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data),a=r.building,d=r.buildStart,u=r.buildEnd,s=r.worldTime;return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar.Countdown,{start:d,current:s,end:u,bold:!0,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",children:(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:!0})}),"Building ",a,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:s,timeLeft:u-s,format:function(e,t){return t.substr(3)}}),")"]})})},f=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.queue,d=a.processingQueue,u=Object.entries(a.queueDeficit).filter((function(e){return e[1]<0})),s=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Processing time:",(0,o.createComponentVNode)(2,i.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",bold:!0,children:new Date(s/10*1e3).toISOString().substr(14,5)})]}),Object.keys(u).length>0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Lacking materials to complete:",u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},C=function(e,t){var n=(0,c.useBackend)(t),a=(n.act,n.data),l=e.id,d=e.amount,m=e.lineDisplay,p=e.onClick,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),f=l.replace("$",""),C=a.materials[l]||0,N=d||C;if(!(N<=0&&"metal"!==f&&"glass"!==f)){var b=d&&d>C;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",m&&"Exofab__material--line"])},h,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,i.Button,{onClick:p,children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[f]||f)+".png"})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:m?(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",color:b&&"bad",children:N.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--name",children:f}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",children:[N.toLocaleString("en-US")," cm\xb3 (",Math.round(N/2e3*10)/10," ","sheets)"]})],4)})]})))}},N=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=e.design;return(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:l.notEnough||a.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ExternalAirlockController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.chamber_pressure,m=(u.exterior_status,u.interior_status),p=u.processing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(n=s,i="good",n<80?i="bad":n<95||n>110?i="average":n>120&&(i="bad"),i),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Abort",icon:"ban",color:"red",disabled:!p,onClick:function(){return d("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return i("scan")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){return i("auth")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return i("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return i("rename")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return i("dept")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,a.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return i("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FilingCabinet=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FilingCabinet=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=n.config,u=l.contents,s=d.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" The ",s," is empty. "]}),!!u&&u.slice().map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"80%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){return i("retrieve",{index:e.index})}})})]},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,e.image),c=e.isSelected,i=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+a,style:{"border-style":c?"solid":"none","border-width":"2px","border-color":"orange",padding:c?"2px":"4px"},onClick:i})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.availableStyles,s=d.selectedStyle,m=d.selectedDir,p=d.directionsPreview,h=d.allStylesPreview;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:s,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,a.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,i,{image:h[e],isSelected:s===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,a.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,a.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,i,{image:p[e],isSelected:e===m,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,a.useBackend)(t).data,r=n.emped,l=n.active,p=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,d,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,u)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{area:p,position:h})}),f&&(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,m,{height:"100%"})})],0):(0,o.createComponentVNode)(2,d)],0)})})})};var d=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,c.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.active,d=i.tag,u=i.same_z,s=(0,a.useLocalState)(t,"newTag",d),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,c.Input,{width:"5rem",value:d,onEnter:function(){return r("tag",{newtag:m})},onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:d===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:m})},children:(0,o.createComponentVNode)(2,c.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"compress":"expand",content:u?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},s=function(e,t){var n=e.title,r=e.area,a=e.position;return(0,o.createComponentVNode)(2,c.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,c.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(a)]})})},m=function(e,t){var n=(0,a.useBackend)(t).data,i=n.position,d=n.signals;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,c.Table,{children:d.map((function(e){return Object.assign({},e,function(e,t){if(e&&t){if(e[2]!==t[2])return null;var n=Math.atan2(t[1]-e[1],t[0]-e[0]),o=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(n),distance:o}}}(i,e.position))})).map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,c.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GeneModder=void 0;var o=n(0),r=n(1),a=n(2),c=n(30),i=n(3);t.GeneModder=function(e,t){var n=(0,r.useBackend)(t).data.has_seed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Genes",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Insert Gene from Disk",disabled:!i||!i.can_insert||i.is_core,icon:"arrow-circle-down",onClick:function(){return c("insert")}}),children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.has_seed,s=d.seed,m=d.has_disk,p=d.disk;return n=u?(0,o.createComponentVNode)(2,a.Flex.Item,{mb:"-6px",mt:"-4px",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{content:s.name,onClick:function(){return l("eject_seed")}}),(0,o.createComponentVNode)(2,a.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return l("variant_name")}})]}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",onClick:function(){return l("eject_seed")}})}),c=m?p.name:"None",(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Sample",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Disk",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:c,onClick:function(){return l("eject_disk")}})})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.disk,d=i.core_genes;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core Genes",open:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=l&&l.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Replace",disabled:!e.is_type||!l.can_insert,icon:"arrow-circle-down",onClick:function(){return c("replace",{id:e.id})}})})]},e)}))},"Core Genes")},m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.reagent_genes,c=n.has_reagent;return(0,o.createComponentVNode)(2,h,{title:"Reagent Genes",gene_set:a,do_we_show:c})},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.trait_genes,c=n.has_trait;return(0,o.createComponentVNode)(2,h,{title:"Trait Genes",gene_set:a,do_we_show:c})},h=function(e,t){var n=e.title,c=e.gene_set,i=e.do_we_show,l=(0,r.useBackend)(t),d=l.act,u=l.data.disk;return(0,o.createComponentVNode)(2,a.Collapsible,{title:n,open:!0,children:i?c.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=u&&u.can_extract),icon:"save",onClick:function(){return d("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"times",onClick:function(){return d("remove",{id:e.id})}})})]},e)})):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"No Genes Detected"})},n)}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),a=n(3),c=n(168);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,c.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,d=n.medical,u=n.diagnostic,s=n.radioactivity,m=n.ahud;return(0,o.createComponentVNode)(2,c.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,i,{label:"Medical",type:"medical",is_active:d}),(0,o.createComponentVNode)(2,i,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,i,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Antag HUD",is_active:m,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.label,i=e.type,l=void 0===i?null:i,d=e.is_active,u=e.act_on,s=void 0===u?"hud_on":u,m=e.act_off,p=void 0===m?"hud_off":m;return(0,o.createComponentVNode)(2,a.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){return n(d?p:s,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGen=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GravityGen=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.charging_state,s=d.charge_count,m=d.breaker,p=d.ext_power;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[function(e){if(e>0)return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,p:1.5,children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}(u),(0,o.createComponentVNode)(2,a.Section,{title:"Generator Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",content:m?"Online":"Offline",color:m?"green":"red",px:1.5,onClick:function(){return l("breaker")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Status",color:p?"good":"bad",children:(n=u,n>0?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:["[ ",1===n?"Charging":"Discharging"," ]"]}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:p?"good":"bad",children:["[ ",p?"Powered":"Unpowered"," ]"]}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GuestPass=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(99);t.GuestPass=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"id-card",selected:!d.showlogs,onClick:function(){return l("mode",{mode:0})},children:"Issue Pass"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"scroll",selected:d.showlogs,onClick:function(){return l("mode",{mode:1})},children:["Records (",d.issue_log.length,")"]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.scan_name?"eject":"id-card",selected:d.scan_name,content:d.scan_name?d.scan_name:"-----",tooltip:d.scan_name?"Eject ID":"Insert ID",onClick:function(){return l("scan")}})})})}),!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issue Guest Pass",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Issue To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.giv_name?d.giv_name:"-----",disabled:!d.scan_name,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.reason?d.reason:"-----",disabled:!d.scan_name,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.duration?d.duration:"-----",disabled:!d.scan_name,onClick:function(){return l("duration")}})})]}),!!d.scan_name&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AccessList,{grantableList:d.grantableList,accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return l("access",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d.printmsg,disabled:!d.canprint,onClick:function(){return l("issue")}})],4)]}),!!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issuance Log",children:!!d.issue_log.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:d.issue_log.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:e},t)}))}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!d.scan_name,onClick:function(){return l("print")}})],4)||(0,o.createComponentVNode)(2,a.Box,{children:"None."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.amount,u=l.energy,s=l.maxEnergy,m=l.mode;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"dispense"===m,content:"Dispense",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"remove"===m,content:"Remove",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"isolate"===m,content:"Isolate",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"isolate"})}})]})})]})})},d=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=i.current_reagent,s=[],m=0;m<(d.length+1)%3;m++)s.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:u===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HealthSensor=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.HealthSensor=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.on,m=u.user_health,p=u.minHealth,h=u.maxHealth,f=u.alarm_health;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanning",children:(0,o.createComponentVNode)(2,c.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return d("scan_toggle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health activation",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:p,maxValue:h,value:f,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return d("alarm_health",{alarm_health:t})}})}),null!==m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"User health",children:(0,o.createComponentVNode)(2,c.Box,{color:l(m),bold:m>=100,children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:m})})})]})})})})};var l=function(e){return e>50?"green":e>0?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=(n(30),n(45));t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.decks,s=d.current_deck,m=d.ai_override,p=d.emagged;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Holodeck Control System",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",s]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Available Programs",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{block:!0,content:e,selected:e===s,onClick:function(){return l("select_deck",{deck:e})}},e)})),Boolean(p)&&(0,o.createComponentVNode)(2,a.Button,{content:"Wildlife Simulation",color:"red",onClick:function(){return l("wildlifecarp")}}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[Boolean(m)&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Override Protocols",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){return l("ai_override")}})}),(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Safety Protocols",children:(0,o.createComponentVNode)(2,a.Box,{color:p?"bad":"good",children:p?"Off":"On"})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.implant,s=d.contains_case;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Bio-chip Mini-Computer",children:[u&&s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Life",children:u.life}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Notes",children:u.notes}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Function",children:u["function"]})]})],4):s?(0,o.createComponentVNode)(2,a.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,a.Box,{children:"Please insert a bio-chip casing!"}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!s,onClick:function(){return l("eject_case")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.Instrument=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)]})]})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,c.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.lines,s=l.playing,m=l.repeat,p=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,N=l.tickLag,b=l.volume,V=l.minVolume,g=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,c.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"info",content:"Help",onClick:function(){return i("help")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file",content:"New",onClick:function(){return i("newsong")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Import",onClick:function(){return i("import")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,disabled:0===d.length||m<0,icon:"play",content:"Play",onClick:function(){return i("play")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,icon:"stop",content:"Stop",onClick:function(){return i("stop")}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0",maxValue:p,value:m,stepPixelSize:"59",onChange:function(e,t){return i("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return i("tempo",{"new":h+N})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,c.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return i("tempo",{"new":h-N})}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:V,maxValue:g,value:b,stepPixelSize:"6",onDrag:function(e,t){return i("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,u)]})},u=function(e,t){var n,i,l=(0,a.useBackend)(t),d=l.act,u=l.data,s=u.allowedInstrumentNames,m=u.instrumentLoaded,p=u.instrument,h=u.canNoteShift,f=u.noteShift,C=u.noteShiftMin,N=u.noteShiftMax,b=u.sustainMode,V=u.sustainLinearDuration,g=u.sustainExponentialDropoff,v=u.legacy,y=u.sustainDropoffVolume,x=u.sustainHeldNote;return 1===b?(n="Linear",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"0.1",maxValue:"5",value:V,step:"0.5",stepPixelSize:"85",format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return d("setlinearfalloff",{"new":t/10})}})):2===b&&(n="Exponential",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:"1.025",maxValue:"10",value:g,step:"0.01",format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return d("setexpfalloff",{"new":t})}})),s.sort(),(0,o.createComponentVNode)(2,c.Box,{my:-1,children:(0,o.createComponentVNode)(2,c.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,c.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current",children:m?(0,o.createComponentVNode)(2,c.Dropdown,{options:s,selected:p,width:"40%",onSelected:function(e){return d("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:C,maxValue:N,value:f,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return d("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,c.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return d("setsustainmode",{"new":e})}}),i]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:y,stepPixelSize:"6",onChange:function(e,t){return d("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,c.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){return d("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return d("reset")}})]})})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.playing,d=i.lines,u=i.editing;return(0,o.createComponentVNode)(2,c.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!u||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:d.length+1})}}),(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!u&&(d.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(26),a=n(42),c=n(1),i=n(2),l=n(3);t.Jukebox=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.track_selected,p=u.track_length,h=u.track_beat,f=u.volume,C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"pause":"play",content:s?"\u0421\u0442\u043e\u043f":"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0422\u0440\u0435\u043a",children:(0,o.createComponentVNode)(2,i.Dropdown,{"overflow-y":"scroll",width:"240px",options:C.map((function(e){return e.name})),disabled:s,selected:m||"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u043a",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c",children:m?p:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0420\u0438\u0442\u043c",children:[m?h:"\u0422\u0440\u0435\u043a \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",1===h?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,i.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Knob,{size:3.2,color:f>=50?"red":"green",value:f,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,o.createComponentVNode)(2,a.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,a.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?u=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Waiting for second person to confirm..."})):u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,a.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return i("ert")}})})}),(0,o.createComponentVNode)(2,a.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return i("reset")}}),children:u})]})})}return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,(0,o.createComponentVNode)(2,a.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return i("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",onClick:function(){return i("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KitchenMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.KitchenMachine=function(e,t){var n=(0,r.useBackend)(t),d=n.data,u=n.config,s=d.ingredients,m=d.operating,p=u.title;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:m,name:p}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Section,{title:"Ingredients",flexGrow:1,children:(0,o.createComponentVNode)(2,a.Table,{className:"Ingredient__Table",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{tr:5,children:[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.name}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]}),2)]},e.name)}))})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.inactive,d=i.tooltip;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return c("cook")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return c("eject")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.isAdmin,m=u.isSlaved,p=u.isMalf,h=u.isAIMalf,f=u.view;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!(!s||!m)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!(!p&&!h)&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Law Management",selected:0===f,onClick:function(){return d("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Lawsets",selected:1===f,onClick:function(){return d("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,i),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,m=i.ion_laws,p=i.ion_law_nr,h=i.has_inherent_laws,f=i.inherent_laws,C=i.has_supplied_laws,N=i.supplied_laws,b=i.channels,V=i.channel,g=i.isMalf,v=i.isAdmin,y=i.zeroth_law,x=i.ion_law,_=i.inherent_law,k=i.supplied_law,L=i.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,d,{title:"ERR_NULL_VALUE",laws:u,ctx:t}),!!s&&(0,o.createComponentVNode)(2,d,{title:p,laws:m,ctx:t}),!!h&&(0,o.createComponentVNode)(2,d,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,d,{title:"Supplied",laws:N,ctx:t}),(0,o.createComponentVNode)(2,a.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:e.channel===V,onClick:function(){return c("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{content:"State Laws",onClick:function(){return c("state_laws")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{content:"Notify",onClick:function(){return c("notify_laws")}})})]})}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_zeroth_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_ion_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:_}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_inherent_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:L,onClick:function(){return c("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_supplied_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.law_sets;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Load Laws",icon:"download",onClick:function(){return c("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(e.ctx),c=n.act,i=n.data.isMalf;return(0,o.createComponentVNode)(2,a.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return c("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return c("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30),l=n(34);t.LibraryComputer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.selected_rating,d=Array(10).fill().map((function(e,t){return 1+t}));return(0,o.createComponentVNode)(2,a.Flex,{children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{bold:!0,icon:"star",color:i>=e?"caution":"default",onClick:function(){return c("set_rating",{rating_value:e})}})},t)})),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,ml:2,fontSize:"150%",children:[i+"/10",(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",0),i=c[0],l=c[1],d=n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Book Archives"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Corporate Literature"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Upload Book"]}),1===d&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===i,onClick:function(){return l(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Patron Manager"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:4===i,onClick:function(){return l(4)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Inventory"]})]})},s=function(e,t){switch((0,r.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,f);case 3:return(0,o.createComponentVNode)(2,C);case 4:return(0,o.createComponentVNode)(2,N);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.searchcontent,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Flex,{"flex-direction":"row",children:[(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title||"Input Title",onClick:function(){return(0,i.modalOpen)(t,"edit_search_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author||"Input Author",onClick:function(){return(0,i.modalOpen)(t,"edit_search_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ratings",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{mr:1,width:"min-content",content:u.ratingmin,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmin")}})}),(0,o.createComponentVNode)(2,l.FlexItem,{children:"To"}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{ml:1,width:"min-content",content:u.ratingmax,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmax")}})})]})})]})]}),(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_search_category",{category_id:p[e]})}})})})}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return c("toggle_search_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Search",icon:"eraser",onClick:function(){return c("clear_search")}}),u.ckey?(0,o.createComponentVNode)(2,a.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return c("clear_ckey_search")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Find My Books",icon:"search",onClick:function(){return c("find_users_books",{user_ckey:m})}})]})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.external_booklist,u=l.archive_pagenumber,s=l.num_pages,p=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Book System Access",children:[(0,o.createComponentVNode)(2,m),(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",disabled:1===u,onClick:function(){return c("deincrementpagemax")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",disabled:1===u,onClick:function(){return c("deincrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{bold:!0,content:u,onClick:function(){return(0,i.modalOpen)(t,"setpagenumber")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",disabled:u===s,onClick:function(){return c("incrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",disabled:u===s,onClick:function(){return c("incrementpagemax")}})],4),(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ratings"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Category"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===p&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_external_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},e.id)}))]})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.programmatic_booklist,u=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Corporate Book Catalog",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e,n){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:2}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===u&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_programmatic_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},n)}))]})})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.selectedbook,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Section,{title:"Book System Upload",children:[u.copyright?(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Uploader"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_upload_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,disabled:u.copyright,selected:!0,icon:"unlink",onClick:function(){return c("toggle_upload_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",disabled:u.copyright,content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:u.summary})]})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,mt:16,icon:"upload",width:"auto",disabled:u.copyright,content:"Upload Book",onClick:function(){return c("uploadbook",{user_ckey:m})}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.checkout_data;return(0,o.createComponentVNode)(2,a.Section,{title:"Checked Out Books",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Patron"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-tag"}),e.patron_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return c("reportlost",{libraryid:e.libraryid})}})})]},t)}))]})})},N=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.inventory_list);return(0,o.createComponentVNode)(2,a.Section,{title:"Library Inventory",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"LIB ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"})]}),c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.libraryid}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"})," ",e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},t)}))]})})};(0,i.modalRegisterBodyOverride)("expand_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=e.args,u=l.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:d.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:d.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:d.summary}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[d.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!d.isProgrammatic&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Categories",children:d.categories.join(", ")})]}),(0,o.createVNode)(1,"br"),u===d.ckey&&(0,o.createComponentVNode)(2,a.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:d.isProgrammatic,onClick:function(){return c("delete_book",{bookid:d.id,user_ckey:u})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Report Book",icon:"flag",color:"red",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"report_book",{bookid:d.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"rate_info",{bookid:d.id})}})]})})),(0,i.modalRegisterBodyOverride)("report_book",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,d=i.selected_report,u=i.report_categories,s=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Report this book for Rule Violations",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reasons",children:(0,o.createComponentVNode)(2,a.Box,{children:u.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:e.category_id===d,onClick:function(){return c("set_report",{report_type:e.category_id})}}),(0,o.createVNode)(1,"br")],4,t)}))})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return c("submit_report",{bookid:l.id,user_ckey:s})}})]})})),(0,i.modalRegisterBodyOverride)("rate_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,u=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:l.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[l.current_rating?l.current_rating:0,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Ratings",children:l.total_ratings?l.total_ratings:0})]}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return c("rate_book",{bookid:l.id,user_ckey:u})}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(30);t.LibraryManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,l)})]})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act;switch(n.data.pagestate){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,i.modalOpen)(t,"specify_ssid_delete")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_delete")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_search")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return c("view_reported_books")}})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reports;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"All Reported Books",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Uploader CKEY"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Report Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reporter Ckey"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.uploader_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.report_description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.reporter_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return c("unflag_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.ckey,d=i.booklist;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"Books uploaded by ",l,(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MODsuitContent=t.MODsuit=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.NumberInput,{value:c,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(e,t){return l("configure",{key:n,value:t,ref:i})}})},l=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:c,onClick:function(){return l("configure",{key:n,value:!c,ref:i})}})},d=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"paint-brush",onClick:function(){return l("configure",{key:n,ref:i})}}),(0,o.createComponentVNode)(2,a.ColorBox,{color:c,mr:.5})],4)},u=function(e,t){var n=e.name,c=e.value,i=e.values,l=e.module_ref,d=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Dropdown,{displayText:c,options:i,onSelected:function(e){return d("configure",{key:n,value:e,ref:l})}})},s=function(e,t){e.name;var n=e.display_name,r=e.type,c=(e.value,e.values,e.module_ref,{number:(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,Object.assign({},e))),bool:(0,o.normalizeProps)((0,o.createComponentVNode)(2,l,Object.assign({},e))),color:(0,o.normalizeProps)((0,o.createComponentVNode)(2,d,Object.assign({},e))),list:(0,o.normalizeProps)((0,o.createComponentVNode)(2,u,Object.assign({},e)))});return(0,o.createComponentVNode)(2,a.Box,{children:[n,": ",c[r]]})},m={rad_counter:function(e,t){var n=e.active,r=e.userradiated,c=e.usertoxins,i=e.usermaxtoxins,l=e.threatlevel;return(0,o.createComponentVNode)(2,a.Flex,{fill:!0,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Level",color:n&&r?"bad":"good",children:n&&r?"IRRADIATED!":"RADIATION-FREE"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxins Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?c/i:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Hazard Level",color:n&&l?"bad":"good",bold:!0,children:n&&l?l:0})})]})},health_analyzer:function(e,t){var n=e.active,r=e.userhealth,c=e.usermaxhealth,i=e.userbrute,l=e.userburn,d=e.usertoxin,u=e.useroxy;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?r/c:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?r:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?l/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?l:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})})]})],4)},status_readout:function(e,t){var n=e.active,r=e.statustime,c=e.statusid,i=e.statushealth,l=e.statusmaxhealth,d=e.statusbrute,u=e.statusburn,s=e.statustoxin,m=e.statusoxy,p=e.statustemp,h=e.statusnutrition,f=e.statusfingerprints,C=e.statusdna,N=e.statusviruses;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Time",children:n?r:"00:00:00"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Number",children:n?c||"0":"???"})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/l:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?s/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?m/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})})})]}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Body Temperature",children:n?p:0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Nutrition Status",children:n?h:0})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"DNA",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:n?f:"???"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:n?C:"???"})]})}),!!n&&!!N&&(0,o.createComponentVNode)(2,a.Section,{title:"Diseases",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.stage,"/",e.maxstage]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cure})]},e.name)}))]})})],0)}},p=function(){return(0,o.createComponentVNode)(2,a.Section,{align:"center",fill:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},h=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},f=function(e,t){var n=e.configuration_data,r=e.module_ref,c=Object.keys(n);return(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[c.map((function(e){var t=n[e];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,s,{name:e,display_name:t.display_name,type:t.type,value:t.value,values:t.values,module_ref:r})},t.key)})),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:e.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},C=function(e){switch(e){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.malfunctioning,u=i.locked,s=i.open,m=i.selected_module,p=i.complexity,h=i.complexity_max,f=i.wearer_name,C=i.wearer_job,N=d?"Malfunctioning":l?"Active":"Inactive";return(0,o.createComponentVNode)(2,a.Section,{title:"Parameters",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l?"Deactivate":"Activate",onClick:function(){return c("activate")}}),children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock-open":"lock",content:u?"Unlock":"Lock",onClick:function(){return c("lock")}}),children:u?"Locked":"Unlocked"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover",children:s?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected Module",children:m||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[p," (",h,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:[f,", ",C]})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.active,c.control),l=c.helmet,d=c.chestplate,u=c.gauntlets,s=c.boots,m=c.core,p=c.charge;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:[(0,o.createComponentVNode)(2,a.Collapsible,{title:"Parts",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Control Unit",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:l||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestplate",children:d||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",children:u||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",children:s||"None"})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Type",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/100,content:p+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},V=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.active,l=c.modules.filter((function(e){return!!e.id}));return(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==l.length&&l.map((function(e){var t=m[e.id];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[!i&&(0,o.createComponentVNode)(2,h),(0,o.normalizeProps)((0,o.createComponentVNode)(2,t,Object.assign({},e,{active:i})))]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.complexity_max,d=i.modules,u=(0,r.useLocalState)(t,"module_configuration",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Modules",fill:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:e.module_name,children:(0,o.createComponentVNode)(2,a.Section,{children:[s===e.ref&&(0,o.createComponentVNode)(2,f,{configuration_data:e.configuration_data,module_ref:e.ref,onExit:function(){return m(null)}}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.module_complexity,"/",l]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.idle_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.active_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.use_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.cooldown>0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:C(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return m(e.ref)},icon:"cog",selected:s===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===e.configuration_data.length}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,o.createComponentVNode)(2,a.Box,{children:e.description})]})})},e.ref)}))||(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Modules Detected"})})})})},v=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.ui_theme,c.interface_break);return(0,o.createComponentVNode)(2,a.Section,{children:!!i&&(0,o.createComponentVNode)(2,p)||(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,N)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,b)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,g)})]})})};t.MODsuitContent=v;t.MODsuit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),i=a.ui_theme,l=a.interface_break;return(0,o.createComponentVNode)(2,c.Window,{theme:i,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!l,children:(0,o.createComponentVNode)(2,v)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell,s=d&&d.name;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(16),n(1)),a=n(2),c=n(3),i=n(20);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return s.length?(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,i.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,i.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(30),l=n(34),d=n(3),u=n(123),s=n(124),m=n(169),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},h={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},f=function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,r=(0,a.useBackend)(t).data,l=r.loginState,p=r.screen;return l.logged_in?(2===p?n=(0,o.createComponentVNode)(2,C):3===p?n=(0,o.createComponentVNode)(2,N):4===p?n=(0,o.createComponentVNode)(2,b):5===p?n=(0,o.createComponentVNode)(2,v):6===p&&(n=(0,o.createComponentVNode)(2,y)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,k),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.records,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],p=(0,a.useLocalState)(t,"sortId","name"),f=p[0],C=(p[1],(0,a.useLocalState)(t,"sortOrder",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){return i("screen",{screen:3})}})}),(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Physical Status, or Mental Status",width:"100%",onInput:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,x,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,x,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,x,{id:"p_stat",children:"Patient Status"}),(0,o.createComponentVNode)(2,x,{id:"m_stat",children:"Mental Status"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.p_stat+"|"+e.m_stat}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listRow--"+h[e.p_stat],onClick:function(){return i("view_record",{view_record:e.ref})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.p_stat}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.m_stat})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all_med_records")}})],0)},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.medical,d=i.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Record",ml:"0.5rem",onClick:function(){return r("print_record")}}),children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,c.Section,{title:"Medical Data",level:2,buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",onClick:function(){return r("del_med_record")}}),children:(0,o.createComponentVNode)(2,g)})],4)},V=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,c.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return f(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return f(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,i.modalOpen)(t,"add_comment")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return r("del_comment",{del_comment:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return r("new_med_record")}})]})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.virus,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],h=(0,a.useLocalState)(t,"sortId2","name"),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sortOrder2",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, Max Stages, or Severity",width:"100%",onInput:function(e,t){return m(t)}})})}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,_,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,_,{id:"max_stages",children:"Max Stages"}),(0,o.createComponentVNode)(2,_,{id:"severity",children:"Severity"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.max_stages+"|"+e.severity}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listVirus--"+e.severity,onClick:function(){return i("vir",{vir:e.D})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"virus"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.max_stages}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:p[e.severity],children:e.severity})]},e.id)}))]})})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.medbots);return 0===r.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"There are no Medibots."}):(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Chemicals"})]}),r.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listMedbot--"+e.on,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"medical"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.on?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,c.Box,{color:"average",children:"Offline"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer"})]},e.id)}))]})})})},x=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},_=function(e,t){var n=(0,a.useLocalState)(t,"sortId2","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder2",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},k=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){r("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:5===l,onClick:function(){r("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:6===l,onClick:function(){return r("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"plus-square"}),"Medibot Tracking"]}),3===l&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wrench"}),"Record Maintenance"]}),4===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Severity",color:p[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MerchVendor=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productImage,u=e.productCategory,s=i.user_money;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{disabled:l.price>s,icon:"shopping-cart",content:l.price,textAlign:"left",onClick:function(){return c("purchase",{name:l.name,category:u})}})})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1)[0],i=n.products,d=n.imagelist,u=["apparel","toy","decoration"];return(0,o.createComponentVNode)(2,a.Table,{children:i[u[c]].map((function(e){return(0,o.createComponentVNode)(2,l,{product:e,productImage:d[e.path],productCategory:u[c]},e.name)}))})};t.MerchVendor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.user_cash,p=s.inserted_cash;return(0,o.createComponentVNode)(2,i.Window,{title:"Merch Computer",resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[(0,o.createComponentVNode)(2,a.Box,{m:2,children:"Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives."}),null!==m&&(0,o.createComponentVNode)(2,a.Box,{children:["Your balance is ",(0,o.createVNode)(1,"b",null,[m||0,(0,o.createTextVNode)(" credits")],0),"."]}),(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Box,{color:"light-grey",children:["There is ",(0,o.createVNode)(1,"b",null,p,0)," credits inserted."]})}),(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return l("change")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})]})})};var u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1),i=c[0],l=c[1];n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:"Toys"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:"Decorations"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3),l=["title","items"];var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_id,d=i.id;return(0,o.createComponentVNode)(2,c.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",d.name,".",(0,o.createVNode)(1,"br"),"You have ",d.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,c.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},s=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.has_id,u=i.id,s=i.items,m=(0,a.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,a.useLocalState)(t,"sort","Alphabetical")),C=f[0],N=(f[1],(0,a.useLocalState)(t,"descending",!1)),b=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),g=!1,v=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=l&&u.points>=e[1].price,e[1]})).sort(d[C]);if(0!==n.length)return b&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Section,{children:g?v:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No items matching your criteria was found!"})})})},m=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),i=(0,a.useLocalState)(t,"sort",""),l=(i[0],i[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,d=e.title,u=e.items,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Collapsible,Object.assign({open:!0,title:d},s,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,c.Button,{disabled:!i.has_id||i.id.points0?'\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 "'+l+'"':"\u0412\u0441\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438",fill:!0,children:(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"100%",width:"100%",display:"inline-block",children:a.filter((function(e){return e.name&&(!(l.length>0)||(e.name.toLowerCase().includes(l.toLowerCase())||e.desc.toLowerCase().includes(l.toLowerCase())||e.author.toLowerCase().includes(l.toLowerCase())))})).map((function(e){return(0,o.createComponentVNode)(2,c.Collapsible,{title:e.name,children:[(0,o.createComponentVNode)(2,c.Section,{title:"\u0410\u0432\u0442\u043e\u0440\u044b",children:e.author}),(0,o.createComponentVNode)(2,c.Section,{title:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",children:e.desc})]},e.name)}))})})})]})};t.ModpacksListContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NTRecruiter=void 0;var o=n(0),r=n(1),a=n(2),c=n(45),i=n(3);t.NTRecruiter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.gamestatus,s=d.cand_name,m=d.cand_gender,p=d.cand_age,h=d.cand_species,f=d.cand_planet,C=d.cand_job,N=d.cand_records,b=d.cand_curriculum,V=d.total_curriculums,g=d.reason;return 0===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"31px",color:"white",pb:"10px",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]}),(0,o.createComponentVNode)(2,a.Button,{mt:"50px",textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return l("start_game")}}),(0,o.createComponentVNode)(2,a.Button,{mt:"10px",textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return l("instructions")}})]})})}):1===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{color:"grey",title:"Guide",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss"," ",(0,o.createVNode)(1,"b",null,V,0)," candidates, one wrongly made choice leads to a game over."]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"3#",color:"silver",children:[(0,o.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,o.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"7#",color:"silver",children:["Pay attention to ",(0,o.createVNode)(1,"b",null,"typos",16)," and ",(0,o.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for ",(0,o.createVNode)(1,"b",null,"jobs",16)," that they"," ",(0,o.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,o.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]})]})})})}):2===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",b]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Name",color:"silver",children:(0,o.createVNode)(1,"b",null,s,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Gender",color:"silver",children:(0,o.createVNode)(1,"b",null,m,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Age",color:"silver",children:(0,o.createVNode)(1,"b",null,p,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Species",color:"silver",children:(0,o.createVNode)(1,"b",null,h,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Planet of Origin",color:"silver",children:(0,o.createVNode)(1,"b",null,f,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Requested Job",color:"silver",children:(0,o.createVNode)(1,"b",null,C,0)}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Employment Records",color:"silver",children:(0,o.createVNode)(1,"b",null,N,0)})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Stamp the application!",color:"grey",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{float:"right",color:"green",content:"Hire",fontSize:"150%",width:"49%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return l("hire")}}),(0,o.createComponentVNode)(2,a.Button,{float:"left",color:"red",content:"Dismiss",fontSize:"150%",width:"49%",icon:"ban",lineHeight:4.5,onClick:function(){return l("dismiss")}})]})]})}):3===u?(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{py:"140px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"15px",color:"label",textAlign:"center",children:g}),(0,o.createComponentVNode)(2,a.Flex.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",b-1,"/",V]}),(0,o.createComponentVNode)(2,a.Flex.Item,{pt:"20px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:2,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return l("back_to_menu")}})})]})})}):void 0}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(44),l=n(3),d=n(30),u=n(169),s=["icon","iconSpin","selected","security","onClick","title","children"],m=["name"];function p(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var h=["security","engineering","medical","science","service","supply"],f={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,i=(0,a.useBackend)(t),s=i.act,m=i.data,p=m.is_security,h=m.is_admin,f=m.is_silent,V=m.is_printing,g=m.screen,y=m.channels,x=m.channel_idx,_=void 0===x?-1:x,k=(0,a.useLocalState)(t,"menuOpen",!1),L=k[0],B=k[1],w=(0,a.useLocalState)(t,"viewingPhoto",""),S=w[0],I=(w[1],(0,a.useLocalState)(t,"censorMode",!1)),T=I[0],A=I[1];0===g||2===g?n=(0,o.createComponentVNode)(2,N):1===g&&(n=(0,o.createComponentVNode)(2,b));var E=y.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:p&&"security",children:[S?(0,o.createComponentVNode)(2,v):(0,o.createComponentVNode)(2,d.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",L&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,C,{icon:"bars",title:"Toggle Menu",onClick:function(){return B(!L)}}),(0,o.createComponentVNode)(2,C,{icon:"newspaper",title:"Headlines",selected:0===g,onClick:function(){return s("headlines")},children:E>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:E>=10?"9+":E})}),(0,o.createComponentVNode)(2,C,{icon:"briefcase",title:"Job Openings",selected:1===g,onClick:function(){return s("jobs")}}),(0,o.createComponentVNode)(2,c.Divider)]}),(0,o.createComponentVNode)(2,c.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:y.map((function(e){return(0,o.createComponentVNode)(2,C,{icon:e.icon,title:e.name,selected:2===g&&y[_-1]===e,onClick:function(){return s("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,c.Divider),(!!p||!!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,C,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,C,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return A(!T)}}),(0,o.createComponentVNode)(2,c.Divider)],4),(0,o.createComponentVNode)(2,C,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,C,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,d.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,c.Divider),(0,o.createComponentVNode)(2,C,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return s("print_newspaper")}}),(0,o.createComponentVNode)(2,C,{icon:f?"volume-mute":"volume-up",title:"Mute: "+(f?"On":"Off"),onClick:function(){return s("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,u.TemporaryNotice),n]})]})})]})};var C=function(e,t){(0,a.useBackend)(t).act;var n=e.icon,i=void 0===n?"":n,l=e.iconSpin,d=e.selected,u=void 0!==d&&d,m=e.security,h=void 0!==m&&m,f=e.onClick,C=e.title,N=e.children,b=p(e,s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",u&&"Newscaster__menuButton--selected",h&&"Newscaster__menuButton--security"]),onClick:f},b,{children:[u&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,c.Icon,{name:i,spin:l,size:"2"}),(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--title",children:C}),N]})))},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,u=i.is_admin,s=i.channel_idx,m=i.channel_can_manage,p=i.channels,h=i.stories,f=i.wanted,C=(0,a.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,a.useLocalState)(t,"censorMode",!1)),g=b[0],v=(b[1],2===l&&s>-1?p[s-1]:null);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,V,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,V,{story:e},e)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([g&&(0,o.createComponentVNode)(2,c.Button,{disabled:!!v.admin&&!u,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!m,icon:"cog",content:"Manage",onClick:function(){return(0,d.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),!!u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ckey",children:v.author_ckey}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},b=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.jobs,d=i.wanted,u=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!d&&(0,o.createComponentVNode)(2,V,{story:d,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:u>0?h.map((function(e){return Object.assign({},f[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},V=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=e.story,s=e.wanted,m=void 0!==s&&s,p=d.is_admin,h=(0,a.useLocalState)(t,"fullStories",[]),f=h[0],C=h[1],N=(0,a.useLocalState)(t,"censorMode",!1),b=N[0];N[1];return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__story",m&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&u.censor_flags?"[REDACTED]":u.title)||"News from "+u.author],0),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[!m&&b&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,o.createComponentVNode)(2,c.Button,{enabled:2&u.censor_flags,icon:2&u.censor_flags?"comment-slash":"comment",content:2&u.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:u.uid})}})}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",u.author," |\xa0",!!p&&(0,o.createFragment)([(0,o.createTextVNode)("ckey: "),u.author_ckey,(0,o.createTextVNode)(" |\xa0")],0),!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),u.view_count.toLocaleString(),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("|\xa0")],0),(0,o.createComponentVNode)(2,c.Icon,{name:"clock"})," ",(0,i.timeAgo)(u.publish_time,d.world_time)]})]})}),children:(0,o.createComponentVNode)(2,c.Box,{children:2&u.censor_flags?"[REDACTED]":(0,o.createFragment)([!!u.has_photo&&(0,o.createComponentVNode)(2,g,{name:"story_photo_"+u.uid+".png",float:"right",ml:"0.5rem"}),(u.body_short||u.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),u.body_short&&(0,o.createComponentVNode)(2,c.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return C([].concat(f,[u.uid]))}}),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})],0)})})},g=function(e,t){var n=e.name,r=p(e,m),i=(0,a.useLocalState)(t,"viewingPhoto",""),l=(i[0],i[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},v=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||i){var l="manage_channel"===e.id,u=!!e.args.is_admin,s=e.args.scanned_user,m=(0,a.useLocalState)(t,"author",(null==i?void 0:i.author)||s||"Unknown"),p=m[0],h=m[1],f=(0,a.useLocalState)(t,"name",(null==i?void 0:i.name)||""),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"description",(null==i?void 0:i.description)||""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"icon",(null==i?void 0:i.icon)||"newspaper"),y=v[0],x=v[1],_=(0,a.useLocalState)(t,"isPublic",!!l&&!(null==i||!i["public"])),k=_[0],L=_[1],B=(0,a.useLocalState)(t,"adminLocked",1===(null==i?void 0:i.admin)||!1),w=B[0],S=B[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+i.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!u,width:"100%",value:p,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return N(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:V,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,c.Input,{disabled:!u,value:y,width:"35%",mr:"0.5rem",onInput:function(e,t){return x(t)}}),(0,o.createComponentVNode)(2,c.Icon,{name:y,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,c.Button,{selected:k,icon:k?"toggle-on":"toggle-off",content:k?"Yes":"No",onClick:function(){return L(!k)}})}),u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:w,icon:w?"lock":"lock-open",content:w?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return S(!w)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===p.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:p,name:C.substr(0,49),description:V.substr(0,128),icon:y,"public":k?1:0,admin_locked:w?1:0}),(0,a.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,d.modalClose)(t)};(0,d.modalRegisterBodyOverride)("create_channel",y),(0,d.modalRegisterBodyOverride)("manage_channel",y),(0,d.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.channels,s=i.channel_idx,m=void 0===s?-1:s,p=!!e.args.is_admin,h=e.args.scanned_user,f=u.slice().sort((function(e,t){if(m<0)return 0;var n=u[m-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return p||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,a.useLocalState)(t,"author",h||"Unknown"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],y=V[1],x=(0,a.useLocalState)(t,"title",""),_=x[0],k=x[1],L=(0,a.useLocalState)(t,"body",""),B=L[0],w=L[1],S=(0,a.useLocalState)(t,"adminLocked",!1),I=S[0],T=S[1];return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!p,width:"100%",value:N,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return y(e)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Divider),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:_,onInput:function(e,t){return k(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:B,onInput:function(e,t){return w(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,title:_,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"}),B.split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})]})})}),p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:I,icon:I?"lock":"lock-open",content:I?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return T(!I)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===N.trim().length||0===v.trim().length||0===_.trim().length||0===B.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,"create_story","",{author:N,channel:v,title:_.substr(0,127),body:B.substr(0,1023),admin_locked:I?1:0}),(0,a.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,d.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.wanted,s=!!e.args.is_admin,m=e.args.scanned_user,p=(0,a.useLocalState)(t,"author",(null==u?void 0:u.author)||m||"Unknown"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"name",(null==u?void 0:u.title.substr(8))||""),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"description",(null==u?void 0:u.body)||""),v=V[0],y=V[1],x=(0,a.useLocalState)(t,"adminLocked",1===(null==u?void 0:u.admin_locked)||!1),_=x[0],k=x[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!s,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",value:N,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return y(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:_,icon:_?"lock":"lock-open",content:_?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return k(!_)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!u,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,d.modalClose)(t),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===h.trim().length||0===N.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:h,name:N.substr(0,127),description:v.substr(0,511),admin_locked:_?1:0}),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return i("auth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return i("code")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){return i("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return i("set_time")}})})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return i("toggle_safety")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,a.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return i("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return i("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(16),a=n(1),c=n(3),i=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.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,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,i.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.verbose,d=c.health,u=c.healthAlarm,s=c.oxy,m=c.oxyAlarm,p=c.crit;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,i.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:u,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:m,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(3);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},p=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(u),a=o.match(u);return r&&a&&n.replace(u,"")===o.replace(u,"")?parseInt(r[1],10)-parseInt(a[1],10):m(n,o)},h=function(e,t){var n=e.searchText,r=e.source,a=e.title,i=e.color,l=e.sorted,d=r.filter(s(n));return l&&d.sort(p),r.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:a+" - ("+r.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,f,{thing:e,color:i},e.name)}))})},f=function(e,t){var n=(0,a.useBackend)(t).act,r=e.color,i=e.thing;return(0,o.createComponentVNode)(2,c.Button,{color:r,onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,a.useBackend)(t),d=r.act,u=r.data,C=u.alive,N=u.antagonists,b=u.highlights,V=u.response_teams,g=(u.auto_observe,u.dead),v=u.ghosts,y=u.misc,x=u.npcs,_=(0,a.useLocalState)(t,"searchText",""),k=_[0],L=_[1],B={},w=l(N);!(n=w()).done;){var S=n.value;B[S.antag]===undefined&&(B[S.antag]=[]),B[S.antag].push(S)}var I=Object.entries(B);I.sort((function(e,t){return m(e[0],t[0])}));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:k,onInput:function(e,t){return L(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[I.map((function(e){return e[0],e[1]})),b,C,v,g,x,y];t0&&(0,o.createComponentVNode)(2,c.Section,{title:"Antagonists",children:I.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,c.Section,{title:t+" - ("+n.length+")",level:2,children:n.filter(s(k)).sort(p).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),b.length>0&&(0,o.createComponentVNode)(2,h,{title:"Highlights",source:b,searchText:k,color:"teal"}),(0,o.createComponentVNode)(2,h,{title:"Response Teams",source:V,searchText:k,color:"purple"}),(0,o.createComponentVNode)(2,h,{title:"Alive",source:C,searchText:k,color:"good"}),(0,o.createComponentVNode)(2,h,{title:"Ghosts",source:v,searchText:k,color:"grey"}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:g,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:x,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:y,searchText:k,sorted:!1})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),a=n(2),c=n(34),i=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"43%"}),(0,o.createComponentVNode)(2,s,{height:"57%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.id,u=i.points,s=i.disk,m=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({},m,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID card",children:d?(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:d.name,tooltip:"Ejects the ID card.",onClick:function(){return c("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return c("insert_id")}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.points)})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.total_points)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed Points",color:u>0?"good":"grey",bold:u>0&&"good",children:l(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"hand-holding-usd",content:"Claim",onClick:function(){return c("claim")}})})]}),(0,o.createComponentVNode)(2,a.Divider),s?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,icon:"eject",content:s.name,tooltip:"Ejects the design disk.",onClick:function(){return c("eject_disk")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,a.Box,{color:s.design&&(s.compatible?"good":"bad"),children:s.design||"N/A"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!s.design||!s.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return c("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.sheets),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,p,{ore:e},e.id)}))]})))},s=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.alloys),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,a.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)}))]})})},p=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore;if(!(c.value&&c.amount<=0)||["$metal","$glass"].indexOf(c.id)>-1){var i=c.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+i+".png",verticalAlign:"middle",ml:"0rem"}),c.name]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",color:c.amount>=1?"good":"gray",bold:c.amount>=1,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:c.value}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.ore,l=i.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,c.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:i.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",textAlign:"middle",color:i.amount>=1?"good":"gray",align:"center",children:i.description}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"10%",textAlign:"center",color:i.amount>=1?"good":"gray",bold:i.amount>=1,align:"center",children:i.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(i.amount,50),stepPixelSize:6,onChange:function(e,t){return n(i.value?"sheet":"alloy",{id:i.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(623);t.PAI=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.app_template,m=u.app_icon,p=u.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(s);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m,mr:1}),p,"pai_main_menu"!==s&&(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return d("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_atmosphere.js":624,"./pai_bioscan.js":625,"./pai_directives.js":626,"./pai_doorjack.js":627,"./pai_main_menu.js":628,"./pai_manifest.js":629,"./pai_medrecords.js":630,"./pai_messenger.js":631,"./pai_radio.js":632,"./pai_secrecords.js":633,"./pai_signaler.js":634};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=623},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),a=n(230);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.AtmosScan,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),a=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.app_data),i=c.holder,l=c.dead,d=c.health,u=c.brute,s=c.oxy,m=c.tox,p=c.burn;c.temp;return i?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"green",children:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"red",children:u})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),a=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.master,d=i.dna,u=i.prime,s=i.supplemental;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master",children:l?l+" ("+d+")":"None"}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return c("getdna")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prime Directive",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplemental Directives",children:s||"None"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),a=n(2);t.pai_doorjack=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data.app_data,u=d.cable,s=d.machine,m=d.inprogress,p=d.progress;d.aborted;return n=s?(0,o.createComponentVNode)(2,a.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,a.Button,{content:u?"Extended":"Retracted",color:u?"orange":null,onClick:function(){return l("cable")}}),s&&(c=(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[67,Infinity],average:[33,67],bad:[-Infinity,33]},value:p,maxValue:100}),m?(0,o.createComponentVNode)(2,a.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cable",children:n}),c]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),a=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.available_software,d=i.installed_software,u=i.installed_toggles,s=i.available_ram,m=i.emotions,p=i.current_emotion,h=[];return d.map((function(e){return h[e.key]=e.name})),u.map((function(e){return h[e.key]=e.name})),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available RAM",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!h[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>s,onClick:function(){return c("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!h[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Software",children:[d.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,onClick:function(){return c("startSoftware",{software_key:e.key})}},e.key)})),0===d.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Toggles",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return c("setToggle",{toggle_key:e.key})}},e.key)})),0===u.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Emotion",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.id===p,onClick:function(){return c("setEmotion",{emotion:e.id})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.CrewManifest,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),a=n(231);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return c.app_data.active_convo?(0,o.createComponentVNode)(2,a.ActiveConversation,{data:c.app_data}):(0,o.createComponentVNode)(2,a.MessengerList,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),a=n(16),c=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.app_data,d=l.minFrequency,u=l.maxFrequency,s=l.frequency,m=l.broadcasting;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,a.toFixed)(e,1)},onChange:function(e,t){return i("freq",{freq:t})}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return i("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return i("toggleBroadcast")},selected:m,content:m?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),a=n(170);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Signaler,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(636);t.PDA=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data),m=s.app;if(!s.owner)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var p=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(m.template);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m.icon,mr:1}),m.name]}),p:1,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.idInserted,d=i.idLink,u=i.stationTime,s=i.cartridge_name;return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",color:"transparent",onClick:function(){return c("Authenticate")},content:d})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),s?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sd-card",color:"transparent",onClick:function(){return c("Eject")},content:"Eject "+s})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:u})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app;return(0,o.createComponentVNode)(2,a.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return c("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){c("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":637,"./pda_janitor.js":638,"./pda_main_menu.js":639,"./pda_manifest.js":640,"./pda_medical.js":641,"./pda_messenger.js":231,"./pda_mob_hunt.js":642,"./pda_mule.js":643,"./pda_nanobank.js":644,"./pda_notes.js":645,"./pda_power.js":646,"./pda_secbot.js":647,"./pda_security.js":648,"./pda_signaler.js":649,"./pda_status_display.js":650,"./pda_supplyrecords.js":651};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=636},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),a=n(230);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.janitor),i=c.user_loc,l=c.mops,d=c.buckets,u=c.cleanbots,s=c.carts;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:[i.x,",",i.y]}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Bucket Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cleanbot Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(16),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.owner,d=i.ownjob,u=i.idInserted,s=i.categories,m=i.pai,p=i.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return c("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=i.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.uid in p?e.notify_icon:e.icon,iconSpin:e.uid in p,color:e.uid in p?"red":"transparent",content:e.name,onClick:function(){return c("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return c("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return c("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),a=n(127);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.wild_captures,u=i.no_collection,s=i.entry;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return c("Disconnect")}})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return c("Reconnect")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Wild Captures",children:d})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,a.Box,{children:!u&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return c("Prev")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Next",icon:"arrow-right",onClick:function(){return c("Next")}})]})}),children:u?"Your collection is empty! Go capture some Nano-Mobs!":s?(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:s.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[s.nickname&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nickname",children:s.nickname}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.real_name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:s.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Type",children:s.type1}),s.type2&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Type",children:s.type2}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return c("Transfer")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Release",icon:"arrow-up",onClick:function(){return c("Release")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return c("Rename")}}),!!s.is_hacked&&(0,o.createComponentVNode)(2,a.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return c("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,a.Box,{children:l?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.mulebot.bots.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.Name,icon:"cog",onClick:function(){return c("control",{bot:e.uid})}})},e.Name)}))},i=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.mulebot,d=l.botstatus,u=l.active,s=d.mode,m=d.loca,p=d.load,h=d.powr,f=d.dest,C=d.home,N=d.retn,b=d.pick;switch(s){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=s}return(0,o.createComponentVNode)(2,a.Section,{title:u,children:[-1===s&&(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,a.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return i("target")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,a.Button,{content:p?p+" (Unload)":"None",disabled:!p,onClick:function(){return i("unload")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,a.Button,{content:b?"Yes":"No",selected:b,onClick:function(){return i("set_pickup_type",{autopick:b?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return i("set_auto_return",{autoret:N?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Stop",icon:"stop",onClick:function(){return i("stop")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Proceed",icon:"play",onClick:function(){return i("start")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Return Home",icon:"home",onClick:function(){return i("home")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_nanobank=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34);t.pda_nanobank=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.logged_in,u=r.owner_name,s=r.money;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Name",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:["$",s]})]})}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})],4):(0,o.createComponentVNode)(2,p)};var l=function(e,t){(0,a.useBackend)(t).data;var n=(0,a.useLocalState)(t,"tabIndex",1),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Tabs,{mt:2,children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transfers"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Account Actions"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transaction History"]})]})},d=function(e,t){var n=(0,a.useLocalState)(t,"tabIndex",1)[0];if(!(0,a.useBackend)(t).data.db_status)return(0,o.createComponentVNode)(2,c.Box,{children:"Account Database Connection Severed"});switch(n){case 1:return(0,o.createComponentVNode)(2,u);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},u=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.requests,s=d.available_accounts,m=d.money,p=(0,a.useLocalState)(t,"selectedAccount"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"transferAmount"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"searchText",""),g=V[0],v=V[1],y=[];return s.map((function(e){return y[e.name]=e.UID})),(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account",children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account name",onInput:function(e,t){return v(t)}}),(0,o.createComponentVNode)(2,c.Dropdown,{mt:.6,width:"190px",options:s.filter((0,r.createSearch)(g,(function(e){return e.name}))).map((function(e){return e.name})),selected:null==(n=s.filter((function(e){return e.UID===h}))[0])?void 0:n.name,onSelected:function(e){return f(y[e])}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Amount",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Up to 5000",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:m0&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Approved Orders",children:s>0&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(125);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.active,s=d.anchored,m=d.broken,p=d.emagged,h=d.fuel_type,f=d.fuel_usage,C=d.fuel_stored,N=d.fuel_cap,b=d.is_ai,V=d.tmp_current,g=d.tmp_max,v=d.tmp_overheat,y=d.output_max,x=d.power_gen,_=d.output_set,k=d.has_fuel,L=C/N,B=V/g,w=_*x,S=Math.round(C/f),I=Math.round(S/60),T=S>120?I+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(m||!s)&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[!!m&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator is malfunctioning!"}),!m&&!s&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!m&&!!s&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:u,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,a.NumberInput,{value:_,minValue:1,maxValue:y*(p?2.5:1),step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,i.formatPower)(w),")"]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:B,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[V," \u2103"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[v>50&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Temperature High"}),0===v&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||b||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:L,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(C/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel usage",children:[f/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(f?T:"N/A"),!k&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength,m=l.max_strength;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Control Panel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Connect",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",mb:"5px",children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Operational":"Error: Verify Configuration"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d||0===s,onClick:function(){return i("remove_strength")},mr:"4px"}),s,(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d||s===m,onClick:function(){return i("add_strength")},ml:"4px"})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PdaPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PdaPainter=function(e,t){var n=(0,r.useBackend)(t).data.has_pda;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:n?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Section,{height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"download",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.pda_colors;return(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"180px",mr:"3px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"65%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{className:"PdaPainter__list",children:Object.keys(i).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("choose_pda",{selectedPda:e})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+i[e][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e})]},e)}))})})})})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.current_appearance,d=i.preview_appearance;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current PDA",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return c("eject_pda")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return c("paint_pda")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Preview",children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.busy,m=u.category,p=u.display_craftable_only,h=u.display_compact,f=u.prev_cat,C=u.next_cat,N=u.subcategory,b=u.prev_subcat,V=u.next_subcat;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,a.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Show Craftable Only",icon:p?"check-square-o":"square-o",selected:p,onClick:function(){return d("toggle_recipes")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return d("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:f,icon:"arrow-left",onClick:function(){return d("backwardCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:C,icon:"arrow-right",onClick:function(){return d("forwardCat")}})]}),N&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:b,icon:"arrow-left",onClick:function(){return d("backwardSubCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:V,icon:"arrow-right",onClick:function(){return d("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Photocopier",color:"silver",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Copies",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{width:"2em",bold:!0,children:u.copynumber}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",content:"",onClick:function(){return d("minus")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",content:"",onClick:function(){return d("add")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toner",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:u.toner})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Document",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.copyitem&&!u.mob,content:u.copyitem?u.copyitem:u.mob?u.mob+"'s ass!":"document",onClick:function(){return d("removedocument")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Folder",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.folder,content:u.folder?u.folder:"folder",onClick:function(){return d("removefolder")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.issilicon;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){return c("copy")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){return c("scandocument")}}),!!i&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print from database",onClick:function(){return c("ai_pic")}})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Scanned Files",children:i.files.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:i.toner<=0,onClick:function(){return c("filecopy",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return c("deletefile",{uid:e.uid})}})]})},e.name)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier220=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(26),l=n(34),d=n(42),u=n(20);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne?this.substring(0,e)+"...":this};t.Photocopier220=function(e,t){for(var n,m,p=(0,r.useBackend)(t),h=p.act,f=p.data,C=(0,r.useLocalState)(t,"searchText",""),N=C[0],b=C[1],V=function(e,t){void 0===t&&(t="");var n=(0,u.createSearch)(t,(function(e){return e.altername}));return(0,d.flow)([(0,i.filter)((function(e){return null==e?void 0:e.altername})),t&&(0,i.filter)(n),(0,i.sortBy)((function(e){return e.id}))])(e)}((0,i.sortBy)((function(e){return e.category}))(f.forms||[]),N),g=[],v=s(V);!(n=v()).done;){var y=n.value;g.includes(y.category)||g.push(y.category)}return m=""===f.category?V:V.filter((function(e){return e.category===f.category})),(0,o.createComponentVNode)(2,c.Window,{theme:f.ui_theme,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:24,shrink:0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"grey",children:"\u0417\u0430\u0440\u044f\u0434 \u0442\u043e\u043d\u0435\u0440\u0430:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",color:f.toner>0?"good":"bad",bold:!0,children:f.toner})]}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:"8px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!f.copyitem&&!f.mob,content:f.copyitem?f.copyitem:f.mob?"\u0416\u043e\u043f\u0430 "+f.mob+"!":"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",onClick:function(){return h("removedocument")}})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mt:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!f.folder,content:f.folder?f.folder:"\u0421\u043b\u043e\u0442 \u0434\u043b\u044f \u043f\u0430\u043f\u043a\u0438",onClick:function(){return h("removefolder")}})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"60%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"clone",content:"\u041a\u043e\u043f\u0438\u044f",disabled:0===f.toner||!f.copyitem&&!f.mob,onClick:function(){return h("copy")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"file",disabled:0===f.toner||null===f.form,content:"\u041f\u0435\u0447\u0430\u0442\u044c",onClick:function(){return h("print_form")}})})]}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",mr:"5px",children:!!f.isAI&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"terminal",disabled:f.toner<5,content:"\u0424\u043e\u0442\u043e \u0438\u0437 \u0411\u0414",onClick:function(){return h("ai_pic")}})})}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",mt:"10px",color:"grey",children:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"15px",mt:"10px",children:f.copynumber}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"3px",mt:"8px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",disabled:1===f.copynumber,content:"",onClick:function(){return h("minus")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"3px",mt:"8px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",disabled:f.copynumber>=f.toner,content:"",onClick:function(){return h("add")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0411\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u044f",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"grey",children:"\u0424\u043e\u0440\u043c\u0430:"}),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,children:""===f.form_id?"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430":f.form_id})]}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:2,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"chevron-right",content:"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",selected:""===f.category?"selected":null,onClick:function(){return h("choose_category",{category:null})},mb:1})}),g.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"chevron-right",content:e,selected:f.category===e?"selected":null,onClick:function(){return h("choose_category",{category:e})},mb:1},e)},e)}))]})]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:35,children:(0,o.createComponentVNode)(2,a.Section,{title:""===f.category?"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b":f.category,children:[(0,o.createComponentVNode)(2,a.Input,{fluid:!0,mb:1,placeholder:"\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u0440\u043c\u044b",onInput:function(e,t){return b(t)}}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",mt:2,children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.id+": "+e.altername.trimLongStr(27),tooltip:e.id+": "+e.altername,selected:f.form_id===e.id?"selected":null,onClick:function(){return h("choose_form",{path:e.path,id:e.id})},mb:1},e.path)},e.path)}))})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=["tempKey"];var l={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},d=function(e,t){var n=e.tempKey,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),d=l[n];if(!d)return null;var u=(0,r.useBackend)(t),s=u.data,m=u.act,p=s.currentTemp,h=d.label,f=d.icon,C=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({selected:C,onClick:function(){m("setTemp",{temp:n})}},c,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:f}),h]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,i=n.emagged,u=n.currentTemp,s=l[u]||l.normal,m=s.label,p=s.color,h=[],f=0,C=Object.entries(l);f0?"envelope-open-text":"envelope",onClick:function(){return i("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return i("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Supplies",icon:"box",onClick:function(){return i("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return i("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return i("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return i("setScreen",{setScreen:10})}})})]}),!!u&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return i("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:s?"Speaker Off":"Speaker On",selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return i("toggleSilent")}})})]})},l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.department,u=[];switch(e.purpose){case"ASSISTANCE":u=l.assist_dept,n="Request assistance from another department";break;case"SUPPLIES":u=l.supply_dept,n="Request supplies from another department";break;case"INFO":u=l.info_dept,n="Relay information to another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Message",icon:"envelope",onClick:function(){return i("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return i("writeInput",{write:e,priority:2})}})]},e)}))})})},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act;c.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data;switch(e.type){case"MESSAGES":n=d.message_log,c="Message Log";break;case"SHIPPING":n=d.shipping_log,c="Shipping label print log"}return(0,o.createComponentVNode)(2,a.Section,{title:c,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.map((function(e,t){return(0,o.createVNode)(1,"div",null,e,0,null,t)})),(0,o.createVNode)(1,"hr")]},e)}))})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.recipient,d=i.message,u=i.msgVerified,s=i.msgStamped;return(0,o.createComponentVNode)(2,a.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",color:"green",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stamped by",color:"blue",children:s})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return c("department",{department:l})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.message,d=i.announceAuth;return(0,o.createComponentVNode)(2,a.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return c("writeAnnouncement")}}),d?(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(d&&l),onClick:function(){return c("sendAnnouncement")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.shipDest,d=i.msgVerified,u=i.ship_dept;return(0,o.createComponentVNode)(2,a.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",children:d})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&d),onClick:function(){return c("printLabel")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,a.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return c("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),a=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,c=e.desc;return(0,o.createComponentVNode)(2,a.Box,{children:[t>0?(0,o.createComponentVNode)(2,a.Divider):null,(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,a.Box,{children:["* Summary: ",c]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83),l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;return l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_tech")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_tech")}}),(0,o.createComponentVNode)(2,s)]})]}):null},d=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;if(!l)return null;var d=l.name,u=l.lathe_types,m=l.materials,p=u.join(", ");return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Materials"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_design")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_design")}}),(0,o.createComponentVNode)(2,s)]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{submenu:i.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,s)]})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type;return l?(0,o.createComponentVNode)(2,a.Button,{content:"Eject Disk",icon:"eject",onClick:function(){i("tech"===l?"eject_tech":"eject_design")}}):null},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.disk_data,i=n.disk_type;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk Contents",children:function(){if(!c)return(0,o.createComponentVNode)(2,u);switch(i){case"design":return(0,o.createComponentVNode)(2,d);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type,d=c.to_copy;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){i("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,m)}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,p)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),a=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_item;return c.linked_destroy?l?(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,a.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){i("deconstruct")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject Item",icon:"eject",onClick:function(){i("eject_item")}})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,a.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.category,u=i.matching_designs,s=4===i.menu?"build":"imprint";return(0,o.createComponentVNode)(2,a.Section,{title:d,children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,a.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:u.map((function(e){var t=e.id,n=e.name,r=e.can_build,c=e.materials;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(s,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,a.Button,{content:"x5",onClick:function(){return l(s,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,a.Button,{content:"x10",onClick:function(){return l(s,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_chemicals,d=4===c.menu;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Purge All",icon:"trash",onClick:function(){i(d?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,a.Button,{content:"Purge",icon:"trash",onClick:function(){i(d?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.menu,u=i.categories,s=4===d?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,a.Section,{title:s+" Menu",children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,c.LatheSearch),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,c=n.total_materials,i=n.max_materials,l=n.max_chemicals,d=n.total_chemicals;return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,a.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c}),i?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+i}):null]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),l?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_materials;return(0,o.createComponentVNode)(2,a.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===c.menu?"lathe_ejectsheet":"imprinter_ejectsheet";i(n,{id:t,amount:e})},d=Math.floor(n/2e3),u=n<1,s=1===d?"":"s";return(0,o.createComponentVNode)(2,a.Table.Row,{className:u?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"110px",children:["(",d," sheet",s,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,a.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,a.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,a.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),a=n(233),c=n(63),i=n(2),l=n(83);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,d=n.menu,u=n.linked_lathe,s=n.linked_imprinter;return 4!==d||u?5!==d||s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,c.LatheMainMenu)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,c.LatheCategory)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,i.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,i.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),a=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",onChange:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,d=n.linked_destroy,u=n.linked_lathe,s=n.linked_imprinter,m=n.tech_levels;return(0,o.createComponentVNode)(2,a.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,a.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!l,menu:i.MENU.DISK,submenu:i.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!d,menu:i.MENU.DESTROY,submenu:i.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,menu:i.MENU.LATHE,submenu:i.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!s,menu:i.MENU.IMPRINTER,submenu:i.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{menu:i.MENU.SETTINGS,submenu:i.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(63),a=n(2),c=n(83);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==c.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:c.MENU.MAIN,submenu:c.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==c.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===c.MENU.LATHE||e===c.MENU.IMPRINTER},submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),a=n(2);t.RndNavButton=function(e,t){var n=e.icon,c=e.children,i=e.disabled,l=e.content,d=(0,r.useBackend)(t),u=d.data,s=d.act,m=u.menu,p=u.submenu,h=m,f=p;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,a.Button,{content:l,icon:n,disabled:i,onClick:function(){s("nav",{menu:h,submenu:f})},children:c})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,d=n.act,u=l.sync,s=l.admin,m=l.linked_destroy,p=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Sync Database with Network",icon:"sync",disabled:!u,onClick:function(){d("sync")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Connect to Research Network",icon:"plug",disabled:u,onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,content:"Device Linkage Menu",icon:"link",menu:i.MENU.SETTINGS,submenu:i.SUBMENU.SETTINGS_DEVICES}),1===s?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return d("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return d("find_device")}}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){d("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(20),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{title:(0,i.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,a.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_lock_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Lock Down",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",disabled:s,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return l("masslock",{})}})]}),(0,o.createComponentVNode)(2,i,{cyborgs:h,can_hack:u})]})})};var i=function(e,t){var n=e.cyborgs,c=(e.can_hack,(0,r.useBackend)(t)),i=c.act,l=c.data,d="Detonate";return l.detonate_cooldown>0&&(d+=" ("+l.detonate_cooldown+"s)"),n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return i("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return i("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:d,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){return i("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),s=u.dial,m=u.open;u.locked,u.contents;return(0,o.createComponentVNode)(2,c.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,a.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),m?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,a.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*s+"deg)","z-index":0}})]}),!m&&(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.dial,d=i.open,u=i.locked,s=function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:d||t&&!u,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return c(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:u,icon:d?"lock":"lock-open",content:d?"Close":"Open",mb:"0.5rem",onClick:function(){return c("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",children:[s(50),s(10),s(1)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[s(1,!0),s(10,!0),s(50,!0)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.contents;return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--contents",overflow:"auto",children:i.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{mb:"0.5rem",onClick:function(){return c("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,a.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.satellites,u=l.notice,s=l.meteor_shield,m=l.meteor_shield_coverage,p=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,a.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:h>=100?"good":"average",value:m,maxValue:p,children:[h," %"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,a.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return i("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(8),a=n(1),c=n(2),i=n(3),l=n(68),d=n(122);t.SecureStorage=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"securestorage",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),u=i.locked,m=i.no_passcode,p=i.emagged,h=i.user_entered_code,f=m?"":u?"bad":"good";return(0,o.createComponentVNode)(2,c.Section,{height:"100%",stretchContents:!0,onKeyDown:function(e){return function(e,t){var n=(0,a.useBackend)(t).act,o=window.event?e.which:e.keyCode;return o===d.KEY_ENTER?(e.preventDefault(),void n("keypad",{digit:"E"})):o===d.KEY_ESCAPE?(e.preventDefault(),void n("keypad",{digit:"C"})):o===d.KEY_BACKSPACE?(e.preventDefault(),void n("backspace")):o>=d.KEY_0&&o<=d.KEY_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_0})):o>=d.KEY_NUMPAD_0&&o<=d.KEY_NUMPAD_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_NUMPAD_0})):void 0}(e,t)},children:[(0,o.createComponentVNode)(2,c.Flex.Item,{height:"20%",mb:"5px",children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+f]),height:"100%",children:p?"ERROR":h})}),(0,o.createComponentVNode)(2,c.Table,{width:"1px",children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map((function(e){return(0,o.createComponentVNode)(2,l.TableRow,{children:e.map((function(e){return(0,o.createComponentVNode)(2,l.TableCell,{children:(0,o.createComponentVNode)(2,s,{number:e})},e)}))},e[0])}))})]})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=(n.data,e.number);return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:l,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,r.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+l]),onClick:function(){return i("keypad",{digit:l})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(20),a=n(1),c=n(2),i=n(34),l=n(3),d=n(30),u=n(123),s=n(124),m=n(169),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,d.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,a.useBackend)(t),i=(r.act,r.data),p=i.loginState,h=i.currentPage;return p.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,d.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.currentPage,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),2===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.records,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","name")),m=s[0],h=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,N,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,N,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"SecurityRecords__listRow--"+p[e.status],onClick:function(){return i("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.isPrinting,u=(0,a.useLocalState)(t,"searchText",""),s=(u[0],u[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,d.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return s(t)}})})]})},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.isPrinting,d=i.general,u=i.security;return d&&d.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,c.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:u.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,v)})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,d.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return i("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return i("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SeedExtractor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.stored_seeds,s=d.vend_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored Seeds",children:[(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createTextVNode)("Set Amount to be Vended:\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:s,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(e,t){return l("set_vend_amount",{vend_amount:t})}})],4),null!=u&&u.length?(0,o.createComponentVNode)(2,i):"No Seeds"]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.stored_seeds;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Stock"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),e.name,e.variant?" ("+e.variant+")":""]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Vend",icon:"arrow-circle-down",onClick:function(){return c("vend",{seedid:e.id,seedvariant:e.variant})}}),"\xa0(",e.amount," Left)"]})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(45);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:d.status?d.status:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!d.shuttle&&(!!d.docking_ports_len&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Send to ",children:d.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",content:e.name,onClick:function(){return l("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!d.admin_controlled&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!d.status,onClick:function(){return l("request")}})})],0))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),u=n[0],s=n[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.shuttles;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return c("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.templates_tabs,d=i.existing_shuttle,u=i.templates;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===d.id,icon:"file",content:e,onClick:function(){return c("select_template_category",{cat:e})}},e)}))}),!!d&&u[d.id].templates.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Load Template",icon:"download",onClick:function(){return c("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.existing_shuttle,d=i.selected;return(0,o.createComponentVNode)(2,a.Box,{children:[l?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: None"}),d?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: "+d.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),d.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:d.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",icon:"eye",onClick:function(){return c("preview",{shuttle_id:d.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",icon:"download",onClick:function(){return c("load",{shuttle_id:d.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var m=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return i("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",content:"Eject",onClick:function(){return i("ejectify")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.hasOccupant,d=i.isBeakerLoaded,u=i.beakerMaxSpace,s=i.beakerFreeSpace,m=i.dialysis&&s>0;return(0,o.createComponentVNode)(2,c.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!d||s<=0||!l,selected:m,icon:m?"toggle-on":"toggle-off",content:m?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!d,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:d?(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:s/u,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.occupant,d=i.chemicals,u=i.maxchem,s=i.amounts;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,c.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,c.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SlotMachine=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return null===d.money?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,a.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===d.plays?d.plays+" player has tried their luck today!":d.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.money})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"10 credits to spin",children:(0,o.createComponentVNode)(2,a.Button,{icon:"coins",disabled:d.working,content:d.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,lineHeight:2,color:d.resultlvl,children:d.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.secure,u=l.can_dry,s=l.drying,m=l.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return i("drying")}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:" No products loaded. "}),!!m&&m.slice().sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return i("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return i("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return i("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),c=n(125),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,h=d.inputLevel,f=d.inputLevelMax,C=d.inputAvailable,N=d.outputAttempt,b=d.outputting,V=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,y=(u>=100?"good":p&&"average")||"bad",x=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:y,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){return l("tryoutput")},children:N?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:x,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===V,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===V,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:V/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:V===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:V===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.generated,u=l.generated_ratio,s=l.tracking_state,m=l.tracking_rate,p=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,N=l.rotating_direction;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:p>0?"good":"bad",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[2===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Automated "}),1===s&&(0,o.createComponentVNode)(2,a.Box,{children:[" ",m,"\xb0/h (",N,")"," "]}),0===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[2!==s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return i("cdir",{cdir:t})}}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===s,onClick:function(){return i("track",{track:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===s,onClick:function(){return i("track",{track:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===s,disabled:!h,onClick:function(){return i("track",{track:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[1===s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("tdir",{tdir:t})}}),0===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Tracker offline "}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return i("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return i("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpecMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpecMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Hemomancer",onClick:function(){return c("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16),(0,o.createComponentVNode)(2,a.Button,{content:"Umbrae",onClick:function(){return c("umbrae")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Desecrated Duel",16),(0,o.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Gargantua",onClick:function(){return c("gargantua")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Dantalion",onClick:function(){return c("dantalion")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.helmet,u=i.suit,s=i.magboots,m=i.mask,p=i.storage,h=i.open,f=i.locked;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return c("cook")}}),(0,o.createComponentVNode)(2,a.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return c("toggle_lock")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.object),l=e.label,d=e.missingText,u=e.eject;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,a.Box,{my:.5,children:i?(0,o.createComponentVNode)(2,a.Button,{my:-1,icon:"eject",content:i,onClick:function(){return c(u)}}):(0,o.createComponentVNode)(2,a.Box,{color:"silver",bold:!0,children:["No ",d," found."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.open,d=i.locked;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:l?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:l?"times-circle":"expand",color:l?"red":"green",disabled:d,textAlign:"center",onClick:function(){return c("toggle_open")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(26),a=n(42),c=n(16),i=n(1),l=n(2),d=n(44),u=n(3);n(68);t.SupermatterMonitor=function(e,t){var n=(0,i.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p)};var s=function(e){return Math.log2(16+Math.max(0,e))-4},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.supermatter_id+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("view",{view:e.supermatter_id})}})})]},e.supermatter_id)}))})})})})},p=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,h=(p.active,p.SM_integrity),f=p.SM_power,C=p.SM_ambienttemp,N=p.SM_ambientpressure,b=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(p.gases||[]),V=Math.max.apply(Math,[1].concat(b.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:f,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(f)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(C),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(C)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(N),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(N)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return m("back")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:b.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:V,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),a=n(2),c=(n(45),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return i(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,a.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEG=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};t.TEG=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return d.error?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[d.error,(0,o.createComponentVNode)(2,a.Button,{icon:"circle",content:"Recheck",onClick:function(){return l("check")}})]})})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Cold Loop ("+d.cold_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Inlet",children:[i(d.cold_inlet_temp)," K,"," ",i(d.cold_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Outlet",children:[i(d.cold_outlet_temp)," K,"," ",i(d.cold_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hot Loop ("+d.hot_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Inlet",children:[i(d.hot_inlet_temp)," K,"," ",i(d.hot_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Outlet",children:[i(d.hot_outlet_temp)," K,"," ",i(d.hot_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Output",children:[i(d.output_power)," W",!!d.warning_switched&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!d.warning_cold_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!d.warning_hot_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TTSSeedsExplorerContent=t.TTSSeedsExplorer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={0:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},l={"\u041c\u0443\u0436\u0441\u043a\u043e\u0439":{icon:"mars",color:"blue"},"\u0416\u0435\u043d\u0441\u043a\u0438\u0439":{icon:"venus",color:"purple"},"\u041b\u044e\u0431\u043e\u0439":{icon:"venus-mars",color:"white"}},d=function(e,t,n,r){return void 0===r&&(r=null),e.map((function(e){var c,i=null!=(c=e[r])?c:e;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:t.includes(e),content:i,onClick:function(){t.includes(e)?n(t.filter((function(t){var n;return(null!=(n=t[r])?n:t)!==e}))):n([e].concat(t))}},i)}))};t.TTSSeedsExplorer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.providers,m=u.seeds,p=u.selected_seed,h=u.phrases,f=u.donator_level,C=m.map((function(e){return e.category})).filter((function(e,t,n){return n.indexOf(e)===t})),N=m.map((function(e){return e.gender})).filter((function(e,t,n){return n.indexOf(e)===t})),b=m.map((function(e){return e.required_donator_level})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return i[e]})),V=(0,r.useLocalState)(t,"selectedProviders",s),g=V[0],v=V[1],y=(0,r.useLocalState)(t,"selectedGenders",N),x=y[0],_=y[1],k=(0,r.useLocalState)(t,"selectedCategories",C),L=k[0],B=k[1],w=(0,r.useLocalState)(t,"selectedDonatorLevels",b),S=w[0],I=w[1],T=(0,r.useLocalState)(t,"selectedPhrase",h[0]),A=T[0],E=T[1],M=(0,r.useLocalState)(t,"searchtext",""),O=M[0],P=M[1],F=d(s,g,v,"name"),R=d(N,x,_),D=d(C,L,B),j=d(b,S,I),W=(0,o.createComponentVNode)(2,a.Dropdown,{options:h,selected:A.replace(/(.{25})..+/,"$1..."),width:"220px",onSelected:function(e){return E(e)}}),z=(0,o.createComponentVNode)(2,a.Input,{placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435...",fluid:!0,onInput:function(e,t){return P(t)}}),U=m.sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return n>o?1:n0&&p!==e.name?"orange":"white",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:p===e.name?.5:.25,textAlign:"left",children:e.category}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:p===e.name?"white":l[e.gender].color,textAlign:"left",children:(0,o.createComponentVNode)(2,a.Icon,{mx:1,size:1.2,name:l[e.gender].icon})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:e.required_donator_level>0&&(0,o.createFragment)([i[e.required_donator_level],(0,o.createComponentVNode)(2,a.Icon,{ml:1,mr:2,name:"coins"})],0)})]},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b",children:F}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u043b",children:R}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",children:D}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438",children:j}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:W}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u043e\u0438\u0441\u043a",children:z})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"\u0413\u043e\u043b\u043e\u0441\u0430 ("+U.length+"/"+m.length+")",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{children:H})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.BlockQuote,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,o.createComponentVNode)(2,a.Box,{mt:2,italic:!0,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c Discord-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})],4)};t.TTSSeedsExplorerContent=u},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.records,s=void 0===u?[]:u,m=d.explosion_target,p=d.toxins_tech,h=d.printing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shift's Target",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Toxins Level",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print All Logs",disabled:!s.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!s.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),s.length?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Records"})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.records,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return c("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Tank=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return n=d.has_mask?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.connected?"check":"times",content:d.connected?"Internals On":"Internals Off",selected:d.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:d.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:d.ReleasePressure===d.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.releasePressure),width:"65px",unit:"kPa",minValue:d.minReleasePressure,maxValue:d.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:d.ReleasePressure===d.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:d.ReleasePressure===d.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.o_tanks,u=l.p_tanks;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Oxygen Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return i("oxygen")}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Plasma Tank ("+u+")",disabled:0===u,icon:"arrow-circle-down",onClick:function(){return i("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.ion),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[1===s&&(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,u);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(p)]})})};var i=function(){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.sectors_available,u=i.nttc_toggle_jobs,s=i.nttc_toggle_job_color,m=i.nttc_toggle_name_color,p=i.nttc_toggle_command_bold,h=i.nttc_job_indicator_type,f=i.nttc_setting_language,C=i.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return c("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"On":"Off",selected:u,icon:"user-tag",onClick:function(){return c("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:s?"On":"Off",selected:s,icon:"clipboard-list",onClick:function(){return c("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"user-tag",onClick:function(){return c("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){return c("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return c("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return c("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return c("network_id")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return c("import")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return c("export")}})]})],4)},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.link_password,d=i.relay_entries;return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return c("change_password")}})})}),(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Unlink"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",onClick:function(){return c("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.filtered_users;return(0,o.createComponentVNode)(2,a.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Add User",icon:"user-plus",onClick:function(){return c("add_filter")}}),children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"user-times",onClick:function(){return c("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.linked,m=u.active,p=u.network_id;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"power-off",onClick:function(){return d("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"Unset",selected:p,icon:"server",onClick:function(){return d("network_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Link Status",children:1===s?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Unlinked"})})]})}),1===s?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.linked_core_id,d=i.linked_core_addr,u=i.hidden_link;return(0,o.createComponentVNode)(2,a.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){return c("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return c("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.cores;return(0,o.createComponentVNode)(2,a.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Link"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Link",icon:"link",onClick:function(){return c("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(224);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.targetsTeleport?d.targetsTeleport:{},s=d.calibrated,m=d.calibrating,p=d.powerstation,h=d.regime,f=d.teleporterhub,C=d.target,N=d.locked;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(!p||!f)&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[f,!p&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Powerstation not linked "}),p&&!f&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Teleporter hub not linked "})]}),p&&f&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!N,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),1===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),2===h&&(0,o.createComponentVNode)(2,a.Box,{children:C})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,i.GridColumn,{size:"2",children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"In Progress"})||s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,i.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,a.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!s&&!m),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(N&&p&&f&&2===h)&&(0,o.createComponentVNode)(2,a.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TempGun=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.TempGun=function(e,t){var n=(0,a.useBackend)(t),s=n.act,m=n.data,p=m.target_temperature,h=m.temperature,f=m.max_temp,C=m.min_temp;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:C,maxValue:f,value:p,format:function(e){return(0,r.toFixed)(e,2)},width:"50px",onDrag:function(e,t){return s("target_temperature",{target_temperature:t})}}),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,c.Box,{color:l(h),bold:h>500-273.15,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(h,2)}),"\xb0C"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power Cost",children:(0,o.createComponentVNode)(2,c.Box,{color:u(h),children:d(h)})})]})})})})};var l=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},d=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},u=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.ThermoMachine=void 0;var o=n(0),r=n(16),a=n(1),c=n(2),i=n(3);t.ThermoMachine=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.temperature,format:function(e){return(0,r.toFixed)(e,2)}})," K"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.pressure,format:function(e){return(0,r.toFixed)(e,2)}})," kPa"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Setting",children:(0,o.createComponentVNode)(2,c.Button,{icon:d.cooling?"temperature-low":"temperature-high",content:d.cooling?"Cooling":"Heating",selected:d.cooling,onClick:function(){return l("cooling")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,c.NumberInput,{animated:!0,value:Math.round(d.target),unit:"K",width:"62px",minValue:Math.round(d.min),maxValue:Math.round(d.max),step:5,stepPixelSize:3,onDrag:function(e,t){return l("target",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"fast-backward",disabled:d.target===d.min,title:"Minimum temperature",onClick:function(){return l("target",{target:d.min})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",disabled:d.target===d.initial,title:"Room Temperature",onClick:function(){return l("target",{target:d.initial})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"fast-forward",disabled:d.target===d.max,title:"Maximum Temperature",onClick:function(){return l("target",{target:d.max})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return i("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return i("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return i("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return i("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return i("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TurbineComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(16);t.TurbineComputer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.compressor,m=u.compressor_broken,p=u.turbine,h=u.turbine_broken,f=u.online,C=Boolean(s&&!m&&p&&!h);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Online":"Offline",selected:f,disabled:!C,onClick:function(){return i("toggle_power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Disconnect",onClick:function(){return i("disconnect")}})],4),children:C?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,c=n.compressor,i=n.compressor_broken,l=n.turbine,d=n.turbine_broken;n.online;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compressor Status",color:!c||i?"bad":"good",children:i?c?"Offline":"Missing":"Online"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Status",color:!l||d?"bad":"good",children:d?l?"Offline":"Missing":"Online"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.rpm,l=n.temperature,d=n.power,u=n.bearing_heat;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Speed",children:[c," RPM"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temp",children:[l," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generated Power",children:[d," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bearing Heat",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[-Infinity,60],average:[60,90],bad:[90,Infinity]},children:(0,i.toFixed)(u)+"%"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Uplink=void 0;var o=n(0),r=n(26),a=n(42),c=n(20),i=n(1),l=n(2),d=n(34),u=n(3),s=n(30),m=function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,V);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}};t.Uplink=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.cart,c=(0,i.useLocalState)(t,"tabIndex",0),d=c[0],p=c[1],h=(0,i.useLocalState)(t,"searchText",""),f=(h[0],h[1]);return(0,o.createComponentVNode)(2,u.Window,{theme:"syndicate",children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===d,onClick:function(){p(0),f("")},icon:"store",children:"View Market"},"PurchasePage"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===d,onClick:function(){p(1),f("")},icon:"shopping-cart",children:["View Shopping Cart"," ",a&&a.length?"("+a.length+")":""]},"Cart"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===d,onClick:function(){p(2),f("")},icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{onClick:function(){return r("lock")},icon:"lock",children:"Lock Uplink"},"LockUplink")]}),m(d)]})]})};var p=function(e,t){var n=(0,i.useBackend)(t),u=n.act,s=n.data,m=s.crystals,p=s.cats,h=(0,i.useLocalState)(t,"uplinkItems",p[0].items),f=h[0],N=h[1],b=(0,i.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=function(e){if(g(e),""===e)return N(p[0].items);N(function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){var t=1===e.hijack_only?"|hijack":"";return e.name+"|"+e.desc+"|"+e.cost+"tc"+t}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(p.map((function(e){return e.items})).flat(),e))},y=(0,i.useLocalState)(t,"showDesc",1),x=y[0],_=y[1];return(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+m+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:x,onClick:function(){return _(!x)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Random Item",icon:"question",onClick:function(){return u("buyRandom")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return u("refund")}})],4),children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1.5,placeholder:"Search Equipment",onInput:function(e,t){v(t)},value:V}),(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{children:(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:p.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:""===V&&e.items===f,onClick:function(){N(e.items),g("")},children:e.cat},e)}))})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:f.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:x},(0,c.decodeHtmlEntities)(e.name))}))})]})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,d=a.cart,u=a.crystals,s=a.cart_price,m=(0,i.useLocalState)(t,"showDesc",0),p=m[0],h=m[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+u+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:p,onClick:function(){return h(!p)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Empty Cart",icon:"trash",onClick:function(){return r("empty_cart")},disabled:!d}),(0,o.createComponentVNode)(2,l.Button,{content:"Purchase Cart ("+s+"TC)",icon:"shopping-cart",onClick:function(){return r("purchase_cart")},disabled:!d||s>u})],4),children:(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:d?d.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:p,buttons:(0,o.createComponentVNode)(2,b,{i:e})},(0,c.decodeHtmlEntities)(e.name))})):(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})}),(0,o.createComponentVNode)(2,f)],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.cats,d=a.lucky_numbers;return(0,o.createComponentVNode)(2,l.Section,{title:"Suggested Purchases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"dice",content:"See more suggestions",onClick:function(){return r("shuffle_lucky_numbers")}}),children:(0,o.createComponentVNode)(2,l.Box,{display:"flex",flexWrap:"wrap",mb:"5px",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,l.Flex.Item,{flexShrink:0,p:"0.5%",width:"49%",children:(0,o.createComponentVNode)(2,C,{grow:!0,i:c[e.cat].items[e.item]})},t)}))})})},C=function(e,t){var n=e.i,r=e.showDecription,a=void 0===r?1:r,i=e.buttons,d=void 0===i?(0,o.createComponentVNode)(2,N,{i:n}):i;return(0,o.createComponentVNode)(2,l.Section,{title:(0,c.decodeHtmlEntities)(n.name),showBottom:a,borderRadius:"5px",buttons:d,stretchContents:!0,children:a?(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,c.decodeHtmlEntities)(n.desc)}):null})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i,d=a.crystals;return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{icon:"shopping-cart",color:1===c.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return r("add_to_cart",{item:c.obj_path})},disabled:c.cost>d}),(0,o.createComponentVNode)(2,l.Button,{content:"Buy ("+c.cost+"TC)"+(c.refundable?" [Refundable]":""),color:1===c.hijack_only&&"red",tooltip:1===c.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return r("buyItem",{item:c.obj_path})},disabled:c.cost>d})],4)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i;a.exploitable;return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Button,{icon:"times",content:"("+c.cost*c.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return r("remove_from_cart",{item:c.obj_path})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"minus",tooltip:0===c.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:--c.amount})},disabled:c.amount<=0}),(0,o.createComponentVNode)(2,l.Button.Input,{content:c.amount,width:"45px",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onCommit:function(e,t){return r("set_cart_item_quantity",{item:c.obj_path,quantity:t})},disabled:-1!==c.limit&&c.amount>=c.limit&&c.amount<=0}),(0,o.createComponentVNode)(2,l.Button,{icon:"plus",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:++c.amount})},disabled:-1!==c.limit&&c.amount>=c.limit})]})},V=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.exploitable),s=(0,i.useLocalState)(t,"selectedRecord",u[0]),m=s[0],p=s[1],h=(0,i.useLocalState)(t,"searchText",""),f=h[0],C=h[1],N=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(u,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:N.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===m,onClick:function(){return p(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+m.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",m.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",m.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",m.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",m.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",m.species]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Vending=void 0;var o=n(0),r=(n(8),n(1)),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productStock,u=e.productImage,s=i.chargesMoney,m=(i.user,i.usermoney),p=i.inserted_cash,h=i.vend_ready,f=(i.inserted_item_name,!s||0===l.price),C="ERROR!",N="";f?(C="FREE",N="arrow-circle-down"):(C=l.price,N="shopping-cart");var b=!h||0===d||!f&&l.price>m&&l.price>p;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{color:(d<=0?"bad":d<=l.max_amount/2&&"average")||"good",children:[d," in stock"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:b,icon:N,content:C,textAlign:"left",onClick:function(){return c("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.user,m=u.usermoney,p=u.inserted_cash,h=u.chargesMoney,f=u.product_records,C=void 0===f?[]:f,N=u.hidden_records,b=void 0===N?[]:N,V=u.stock,g=(u.vend_ready,u.inserted_item_name),v=u.panel_open,y=u.speaker,x=u.imagelist;return n=[].concat(C),u.extended_inventory&&(n=[].concat(n,b)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,c.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[s&&(0,o.createComponentVNode)(2,a.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),", ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),".",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Box,{children:["There is ",(0,o.createVNode)(1,"b",null,[p,(0,o.createTextVNode)(" credits ")],0)," of space cash inserted.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return d("change")}})]})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return d("eject_item",{})}}),children:(0,o.createComponentVNode)(2,a.Box,{children:g})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,a.Button,{icon:y?"check":"volume-mute",selected:y,content:"Speaker",textAlign:"left",onClick:function(){return d("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,i,{product:e,productStock:V[e.name],productImage:x[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return i("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.remaining,u=l.question,s=l.choices,m=l.user_vote,p=l.counts,h=l.show_counts;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:u,children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:["Time remaining: ",Math.round(d/10),"s"]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{multiLine:e,content:e+(h?" ("+(p[e]||0)+")":""),onClick:function(){return i("vote",{target:e})},selected:e===m})},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return i("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return i("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return i("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.WizardApprenticeContract=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.WizardApprenticeContract=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.used;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,o.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,o.createComponentVNode)(2,a.Section,{title:"Which school of magic is your apprentice studying?",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destruction",children:["Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("destruction")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bluespace Manipulation",children:["Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("bluespace")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing",children:["Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("healing")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Robeless",children:["Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("robeless")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}}]); \ No newline at end of file