diff --git a/tgui/packages/tgui/interfaces/AgentCard.js b/tgui/packages/tgui/interfaces/AgentCard.js index 2bf0cefd60f1..4ec402bc89a5 100644 --- a/tgui/packages/tgui/interfaces/AgentCard.js +++ b/tgui/packages/tgui/interfaces/AgentCard.js @@ -214,7 +214,7 @@ export const AgentCardInfo = (props, context) => { export const AgentCardAppearances = (props, context) => { const { act, data } = useBackend(context); - const [selectedAppearance, setSelectedAppearance] = useSharedState(context, 'selectedAppearance', 'null'); + const [selectedAppearance, setSelectedAppearance] = useSharedState(context, 'selectedAppearance', ''); const { appearances } = data; return ( @@ -223,10 +223,9 @@ export const AgentCardAppearances = (props, context) => { {Object.entries(appearances).map(([name, image]) => ( { setSelectedAppearance(name); diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index 4fb800852e3b..bf66d6c7d073 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -238,7 +238,7 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var b=(0,t.createLogger)("hotkeys"),y={},B=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],k={},C=function(l){if(l===16)return"Shift";if(l===17)return"Ctrl";if(l===18)return"Alt";if(l===33)return"Northeast";if(l===34)return"Southeast";if(l===35)return"Southwest";if(l===36)return"Northwest";if(l===37)return"West";if(l===38)return"North";if(l===39)return"East";if(l===40)return"South";if(l===45)return"Insert";if(l===46)return"Delete";if(l>=48&&l<=57||l>=65&&l<=90)return String.fromCharCode(l);if(l>=96&&l<=105)return"Numpad"+(l-96);if(l>=112&&l<=123)return"F"+(l-111);if(l===188)return",";if(l===189)return"-";if(l===190)return"."},i=function(l){var h=String(l);if(h==="Ctrl+F5"||h==="Ctrl+R"){location.reload();return}if(h!=="Ctrl+F"&&!(l.event.defaultPrevented||l.isModifierKey()||B.includes(l.code))){h==="F5"&&(l.event.preventDefault(),l.event.returnValue=!1);var N=C(l.code);if(N){var v=y[N];if(v)return b.debug("macro",v),Byond.command(v);if(l.isDown()&&!k[N]){k[N]=!0;var f='Key_Down "'+N+'"';return b.debug(f),Byond.command(f)}if(l.isUp()&&k[N]){k[N]=!1;var g='Key_Up "'+N+'"';return b.debug(g),Byond.command(g)}}}},c=r.acquireHotKey=function(){function s(l){B.push(l)}return s}(),p=r.releaseHotKey=function(){function s(l){var h=B.indexOf(l);h>=0&&B.splice(h,1)}return s}(),u=r.releaseHeldKeys=function(){function s(){for(var l=0,h=Object.keys(k);l=75?c="green":i.integrity>=25?c="yellow":c="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:c,value:i.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,i.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(p,u){return(0,e.createComponentVNode)(2,t.Box,{children:p},u)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.wireless?"check":"times",content:i.wireless?"Enabled":"Disabled",color:i.wireless?"green":"red",onClick:function(){function p(){return C("wireless")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.radio?"check":"times",content:i.radio?"Enabled":"Disabled",color:i.radio?"green":"red",onClick:function(){function p(){return C("radio")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:i.flushing||i.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function p(){return C("wipe")}return p}()})})]})})})]})})})}return b}()},39454:function(T,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AIFixer=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;if(i.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var c=!0;(i.stat===2||i.stat===null)&&(c=!1);var p=null;i.integrity>=75?p="green":i.integrity>=25?p="yellow":p="red";var u=!0;return i.integrity>=100&&i.stat!==2&&(u=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:p,value:i.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(d,s){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d},s)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.wireless?"times":"check",content:i.wireless?"Disabled":"Enabled",color:i.wireless?"red":"green",onClick:function(){function d(){return C("wireless")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.radio?"times":"check",content:i.radio?"Disabled":"Enabled",color:i.radio?"red":"green",onClick:function(){function d(){return C("radio")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!u||i.active,content:!u||i.active?"Already Repaired":"Repair",onClick:function(){function d(){return C("fix")}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:i.active?"Reconstruction in progress.":""})]})})]})})})}return b}()},88422:function(T,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(195),b=r.APC=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return C}(),y={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"}},B={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"}},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.locked&&!d.siliconUser,l=d.normallyLocked,h=y[d.externalPower]||y[0],N=y[d.chargingStatus]||y[0],v=d.powerChannels||[],f=B[d.malfStatus]||B[0],g=d.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,m.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:h.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.isOperating?"power-off":"times",content:d.isOperating?"On":"Off",selected:d.isOperating&&!s,color:d.isOperating?"":"bad",disabled:s,onClick:function(){function V(){return u("breaker")}return V}()}),children:["[ ",h.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:g})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:N.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.chargeMode?"sync":"times",content:d.chargeMode?"Auto":"Off",selected:d.chargeMode,disabled:s,onClick:function(){function V(){return u("charge")}return V}()}),children:["[ ",N.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.map(function(V){var S=V.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:V.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:V.status>=2?"good":"bad",children:V.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!s&&(V.status===1||V.status===3),disabled:s,onClick:function(){function I(){return u("channel",S.auto)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!s&&V.status===2,disabled:s,onClick:function(){function I(){return u("channel",S.on)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!s&&V.status===0,disabled:s,onClick:function(){function I(){return u("channel",S.off)}return I}()})],4),children:[V.powerLoad," W"]},V.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[d.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!d.siliconUser&&(0,e.createFragment)([!!d.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){function V(){return u(f.action)}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function V(){return u("overload")}return V}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:d.coverLocked?"lock":"unlock",content:d.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){function V(){return u("cover")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:d.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){function V(){return u("emergency_lighting")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:d.nightshiftLights?"Enabled":"Disabled",onClick:function(){function V(){return u("toggle_nightshift")}return V}()})})]})})],4)}},99660:function(T,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ATM=function(){function p(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.view_screen,v=h.authenticated_account,f=h.ticks_left_locked_down,g=h.linked_db,V;if(f>0)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!g)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(v)switch(N){case 1:V=(0,e.createComponentVNode)(2,y);break;case 2:V=(0,e.createComponentVNode)(2,B);break;case 3:V=(0,e.createComponentVNode)(2,i);break;default:V=(0,e.createComponentVNode)(2,k)}else V=(0,e.createComponentVNode)(2,C);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Section,{children:V})]})})}return p}(),b=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.machine_id,v=h.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"eject",onClick:function(){function f(){return l("insert_card")}return f}()})})})]})},y=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:N===0,onClick:function(){function v(){return l("change_security_level",{new_security_level:1})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:N===2,onClick:function(){function v(){return l("change_security_level",{new_security_level:2})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},B=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=(0,a.useLocalState)(d,"targetAccNumber",0),v=N[0],f=N[1],g=(0,a.useLocalState)(d,"fundsAmount",0),V=g[0],S=g[1],I=(0,a.useLocalState)(d,"purpose",0),L=I[0],w=I[1],A=h.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function x(E,P){return f(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function x(E,P){return S(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function x(E,P){return w(P)}return x}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function x(){return l("transfer",{target_acc_number:v,funds_amount:V,purpose:L})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},k=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=(0,a.useLocalState)(d,"fundsAmount",0),v=N[0],f=N[1],g=h.owner_name,V=h.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+g,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function S(){return l("logout")}return S}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",V]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function S(I,L){return f(L)}return S}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function S(){return l("withdrawal",{funds_amount:v})}return S}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function S(){return l("view_screen",{view_screen:1})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function S(){return l("view_screen",{view_screen:2})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function S(){return l("view_screen",{view_screen:3})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function S(){return l("balance_statement")}return S}()})})]})],4)},C=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=(0,a.useLocalState)(d,"accountID",null),v=N[0],f=N[1],g=(0,a.useLocalState)(d,"accountPin",null),V=g[0],S=g[1],I=h.machine_id,L=h.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return f(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return S(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function w(){return l("attempt_auth",{account_num:v,account_pin:V})}return w}()})})]})})},i=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),N.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:v.is_deposit?"green":"red",children:["$",v.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.target_name})]},v)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function N(){return l("view_screen",{view_screen:0})}return N}()})}},86423:function(T,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(36352),b=n(98595),y=n(321),B=n(5485),k=r.AccountsUplinkTerminal=function(){function h(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.loginState,I=V.currentPage,L;if(S.logged_in)I===1?L=(0,e.createComponentVNode)(2,i):I===2?L=(0,e.createComponentVNode)(2,s):I===3&&(L=(0,e.createComponentVNode)(2,l));else return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B.LoginScreen)})})});return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:L})]})})})}return h}(),C=function(N,v){var f=(0,t.useBackend)(v),g=f.data,V=(0,t.useLocalState)(v,"tabIndex",0),S=V[0],I=V[1],L=g.login_state;return(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,mb:1,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===0,onClick:function(){function w(){return I(0)}return w}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===1,onClick:function(){function w(){return I(1)}return w}(),children:"Department Accounts"})]})})})},i=function(N,v){var f=(0,t.useLocalState)(v,"tabIndex",0),g=f[0];switch(g){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,p);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.accounts,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1],A=(0,t.useLocalState)(v,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(v,"sortOrder",!0),j=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,u,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,u,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,u,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,u,{id:"money",children:"Account Balance"})]}),S.filter((0,a.createSearch)(L,function(O){return O.owner_name+"|"+O.account_number+"|"+O.suspended+"|"+O.money})).sort(function(O,D){var F=j?1:-1;return O[x].localeCompare(D[x])*F}).map(function(O){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+O.suspended,onClick:function(){function D(){return g("view_account_detail",{account_num:O.account_number})}return D}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",O.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.money})]},O.account_number)})]})})})]})},p=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.department_accounts;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,m.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,m.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,m.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,m.TableCell,{children:"Account Balance"})]}),S.map(function(I){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+I.suspended,onClick:function(){function L(){return g("view_account_detail",{account_num:I.account_number})}return L}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"wallet"})," ",I.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",I.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.money})]},I.account_number)})]})})})})},u=function(N,v){var f=(0,t.useLocalState)(v,"sortId","name"),g=f[0],V=f[1],S=(0,t.useLocalState)(v,"sortOrder",!0),I=S[0],L=S[1],w=N.id,A=N.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:g!==w&&"transparent",width:"100%",onClick:function(){function x(){g===w?L(!I):(V(w),L(!0))}return x}(),children:[A,g===w&&(0,e.createComponentVNode)(2,o.Icon,{name:I?"sort-up":"sort-down",ml:"0.25rem;"})]})})},d=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.is_printing,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function A(){return g("create_new_account")}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function A(x,E){return w(E)}return A}()})})]})},s=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.account_number,I=V.owner_name,L=V.money,w=V.suspended,A=V.transactions,x=V.account_pin,E=V.is_department_account;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+S+" / "+I,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return g("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",S]}),!!E&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin",children:x}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin Actions",children:(0,e.createComponentVNode)(2,o.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:!!E,onClick:function(){function P(){return g("set_account_pin",{account_number:S})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:I}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:L}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:w?"red":"green",children:[w?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:w?"Unsuspend":"Suspend",icon:w?"unlock":"lock",onClick:function(){function P(){return g("toggle_suspension")}return P}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),A.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:P.is_deposit?"green":"red",children:["$",P.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.target_name})]},P)})]})})})]})},l=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=(0,t.useLocalState)(v,"accName",""),I=S[0],L=S[1],w=(0,t.useLocalState)(v,"accDeposit",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function E(){return g("back")}return E}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function E(P,j){return L(j)}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function E(P,j){return x(j)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return g("finalise_create_account",{holder_name:I,starting_funds:A})}return E}()})]})}},79571:function(T,r,n){"use strict";r.__esModule=!0,r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=[{name:"Male",icon:"mars"},{name:"Female",icon:"venus"},{name:"Genderless",icon:"genderless"}],b=["A+","A-","B+","B-","AB+","AB-","O+","O-"],y=r.AgentCard=function(){function c(p,u){var d=(0,a.useLocalState)(u,"tabIndex",0),s=d[0],l=d[1],h=function(){function N(v){switch(v){case 0:return(0,e.createComponentVNode)(2,C);case 1:return(0,e.createComponentVNode)(2,i);default:return(0,e.createComponentVNode)(2,C)}}return N}();return(0,e.createComponentVNode)(2,o.Window,{width:405,height:505,theme:"syndicate",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"table",selected:s===0,onClick:function(){function N(){return l(0)}return N}(),children:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F"},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:s===1,onClick:function(){function N(){return l(1)}return N}(),children:"\u0412\u043D\u0435\u0448\u043D\u0438\u0439 \u0432\u0438\u0434"},"Appearance")]})}),h(s)]})})})}return c}(),B="\u041F\u0443\u0441\u0442\u043E",k=function(p){var u=p.label,d=p.value,s=p.onCommit,l=p.onClick,h=p.onRClick,N=p.tooltip;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Input,{fluid:!0,textAlign:"center",content:d||B,onCommit:s})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"file-signature",tooltip:N,tooltipPosition:"bottom-end",onClick:l,onContextMenu:h})})]})})},C=r.AgentCardInfo=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.registered_name,N=l.sex,v=l.age,f=l.assignment,g=l.associated_account_number,V=l.blood_type,S=l.dna_hash,I=l.fingerprint_hash,L=l.photo,w=l.ai_tracking,A=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("\u0410\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("\u041B\u041A\u041C - \u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043E\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("\u041F\u041A\u041C - \u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0447\u0443\u0436\u043E\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440.")],4);return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NoticeBox,{m:0,children:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438 \u043D\u0435 \u0432\u043B\u0438\u044F\u044E\u0442 \u043D\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u044B."})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,k,{label:"\u0418\u043C\u044F",value:h,tooltip:A,onCommit:function(){function x(E,P){return s("change_name",{name:P})}return x}(),onClick:function(){function x(){return s("change_name",{option:"Primary"})}return x}(),onRClick:function(){function x(E){E.preventDefault(),s("change_name",{option:"Secondary"})}return x}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u043B",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:m.map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:x.icon,content:x.name,selected:N===x.name,onClick:function(){function E(){return s("change_sex",{sex:x.name})}return E}()})},x.name)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u043E\u0437\u0440\u0430\u0441\u0442",children:(0,e.createComponentVNode)(2,t.Slider,{fluid:!0,minValue:17,value:v||0,maxValue:300,onChange:function(){function x(E,P){return s("change_age",{age:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:f||B,onClick:function(){function x(){return s("change_occupation")}return x}()})}),(0,e.createComponentVNode)(2,k,{label:"\u041E\u0442\u043F\u0435\u0447\u0430\u0442\u043A\u0438",value:I,tooltip:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043E\u0438 \u043E\u0442\u043F\u0435\u0447\u0430\u0442\u043A\u0438.",onCommit:function(){function x(E,P){return s("change_fingerprints",{new_fingerprints:P})}return x}(),onClick:function(){function x(){return s("change_fingerprints",{option:"Primary"})}return x}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F \u043A\u0440\u043E\u0432\u0438",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:b.map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:x,selected:V===x,onClick:function(){function E(){return s("change_blood_type",{new_type:x})}return E}()})},x)})})}),(0,e.createComponentVNode)(2,k,{label:"\u0414\u041D\u041A",value:S,onCommit:function(){function x(E,P){return s("change_dna_hash",{new_dna:P})}return x}(),onClick:function(){function x(){return s("change_dna_hash",{option:"Primary"})}return x}(),tooltip:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043E\u0451 \u0414\u041D\u041A."}),(0,e.createComponentVNode)(2,k,{label:"\u0410\u043A\u043A\u0430\u0443\u043D\u0442",value:g||0,onCommit:function(){function x(E,P){return s("change_money_account",{new_account:P})}return x}(),onClick:function(){function x(){return s("change_money_account",{option:"Primary"})}return x}(),tooltip:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0446\u0438\u0444\u0440."}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0424\u043E\u0442\u043E",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:L?"Update":B,onClick:function(){function x(){return s("change_photo")}return x}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u0430\u0440\u0442\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E",confirmContent:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?",onClick:function(){function x(){return s("delete_info")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043E\u0441\u0442\u0443\u043F\u044B",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u044B",confirmContent:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?",onClick:function(){function x(){return s("clear_access")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0418\u0418",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:w?"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E":"\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E",onClick:function(){function x(){return s("change_ai_tracking")}return x}()})})]})})})],4)}return c}(),i=r.AgentCardAppearances=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=(0,a.useSharedState)(u,"selectedAppearance","null"),N=h[0],v=h[1],f=l.appearances;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0412\u043D\u0435\u0448\u043D\u0438\u0439 \u0432\u0438\u0434",children:Object.entries(f).map(function(g){var V=g[0],S=g[1];return(0,e.createComponentVNode)(2,t.ImageButton,{m:.5,vertical:!0,image:S,imageSize:"64px",selected:N===V,onClick:function(){function I(){v(V),s("change_appearance",{new_appearance:V})}return I}()},V)})})})}return c}()},56793:function(T,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},b=r.AiAirlock=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=m[c.power.main]||m[0],u=m[c.power.backup]||m[0],d=m[c.shock]||m[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:p.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function s(){return i("disrupt-main")}return s}()}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"["+c.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:u.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function s(){return i("disrupt-backup")}return s}()}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"["+c.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:d.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&c.shock!==2),content:"Restore",onClick:function(){function s(){return i("shock-restore")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){function s(){return i("shock-temp")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!c.wires.shock||c.shock===0,content:"Permanent",onClick:function(){function s(){return i("shock-perm")}return s}()})],4),children:[c.shock===2?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"["+c.shock_timeleft+"s]"||c.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){function s(){return i("idscan-toggle")}return s}()}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){function s(){return i("emergency-toggle")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){function s(){return i("bolt-toggle")}return s}()}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){function s(){return i("light-toggle")}return s}()}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){function s(){return i("safe-toggle")}return s}()}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){function s(){return i("speed-toggle")}return s}()}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){function s(){return i("open-close")}return s}()}),children:!!(c.locked||c.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return y}()},72475:function(T,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(195),b=r.AirAlarm=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:f?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,B),!f&&(0,e.createFragment)([(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C)],4)]})})}return d}(),y=function(s){return s===0?"green":s===1?"orange":"red"},B=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.air,g=v.mode,V=v.atmos_alarm,S=v.locked,I=v.alarmActivated,L=v.rcon,w=v.target_temp,A;return f.danger.overall===0?V===0?A="Optimal":A="Caution: Atmos alert in area":f.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:f?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:y(f.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:f.pressure})," kPa",!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:g===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:g===3,icon:"exclamation-triangle",onClick:function(){function x(){return N("mode",{mode:g===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.oxygen/100,fractionDigits:"1",color:y(f.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.nitrogen/100,fractionDigits:"1",color:y(f.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.co2/100,fractionDigits:"1",color:y(f.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.plasma/100,fractionDigits:"1",color:y(f.danger.plasma)})}),f.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.n2o/100,fractionDigits:"1",color:y(f.danger.n2o)})}),f.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.other/100,fractionDigits:"1",color:y(f.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:y(f.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:f.temperature})," K / ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:f.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function x(){return N("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:f.thermostat_state?"On":"Off",selected:f.thermostat_state,icon:"power-off",onClick:function(){function x(){return N("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:y(f.danger.overall),children:[A,!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:I?"Reset Alarm":"Activate Alarm",selected:I,onClick:function(){function x(){return N(I?"atmos_reset":"atmos_alarm")}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:L===1,onClick:function(){function x(){return N("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function x(){return N("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function x(){return N("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},k=function(s,l){var h=(0,a.useLocalState)(l,"tabIndex",0),N=h[0],v=h[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===0,onClick:function(){function f(){return v(0)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===1,onClick:function(){function f(){return v(1)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===2,onClick:function(){function f(){return v(2)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===3,onClick:function(){function f(){return v(3)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},C=function(s,l){var h=(0,a.useLocalState)(l,"tabIndex",0),N=h[0],v=h[1];switch(N){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,p);case 3:return(0,e.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},i=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.vents;return f.map(function(g){return(0,e.createComponentVNode)(2,t.Section,{title:g.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:g.power?"On":"Off",selected:g.power,icon:"power-off",onClick:function(){function V(){return N("command",{cmd:"power",val:!g.power,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:g.direction?"Blowing":"Siphoning",icon:g.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function V(){return N("command",{cmd:"direction",val:!g.direction,id_tag:g.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:g.checks===1,onClick:function(){function V(){return N("command",{cmd:"checks",val:1,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:g.checks===2,onClick:function(){function V(){return N("command",{cmd:"checks",val:2,id_tag:g.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:g.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function V(){return N("command",{cmd:"set_external_pressure",id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function V(){return N("command",{cmd:"set_external_pressure",val:101.325,id_tag:g.id_tag})}return V}()})]})]})},g.name)})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.scrubbers;return f.map(function(g){return(0,e.createComponentVNode)(2,t.Section,{title:g.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:g.power?"On":"Off",selected:g.power,icon:"power-off",onClick:function(){function V(){return N("command",{cmd:"power",val:!g.power,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:g.scrubbing?"Scrubbing":"Siphoning",icon:g.scrubbing?"filter":"sign-in-alt",onClick:function(){function V(){return N("command",{cmd:"scrubbing",val:!g.scrubbing,id_tag:g.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:g.widenet?"Extended":"Normal",selected:g.widenet,icon:"expand-arrows-alt",onClick:function(){function V(){return N("command",{cmd:"widenet",val:!g.widenet,id_tag:g.id_tag})}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:g.filter_co2,onClick:function(){function V(){return N("command",{cmd:"co2_scrub",val:!g.filter_co2,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:g.filter_toxins,onClick:function(){function V(){return N("command",{cmd:"tox_scrub",val:!g.filter_toxins,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:g.filter_n2o,onClick:function(){function V(){return N("command",{cmd:"n2o_scrub",val:!g.filter_n2o,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:g.filter_o2,onClick:function(){function V(){return N("command",{cmd:"o2_scrub",val:!g.filter_o2,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:g.filter_n2,onClick:function(){function V(){return N("command",{cmd:"n2_scrub",val:!g.filter_n2,id_tag:g.id_tag})}return V}()})]})]})},g.name)})},p=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.modes,g=v.presets,V=v.emagged,S=v.mode,I=v.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:f.map(function(L){return(!L.emagonly||L.emagonly&&!!V)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===S,onClick:function(){function w(){return N("mode",{mode:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:g.map(function(L){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===I,onClick:function(){function w(){return N("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},u=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),f.map(function(g){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:g.name}),g.settings.map(function(V){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:V.selected===-1?"Off":V.selected,onClick:function(){function S(){return N("command",{cmd:"set_threshold",env:V.env,var:V.val})}return S}()})},V.val)})]},g.name)})]})})}},12333:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AirlockAccessController=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.exterior_status,p=i.interior_status,u=i.processing,d,s;return c==="open"?d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:u,onClick:function(){function l(){return C("force_ext")}return l}()}):d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:u,onClick:function(){function l(){return C("cycle_ext_door")}return l}()}),p==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:u,color:p==="open"?"red":u?"yellow":null,onClick:function(){function l(){return C("force_int")}return l}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:u,onClick:function(){function l(){return C("cycle_int_door")}return l}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:c==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:p==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[d,s]})})]})})}return b}()},28736:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(49148),b=1,y=2,B=4,k=8,C=r.AirlockElectronics=function(){function p(u,d){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})})}return p}(),i=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:N&B,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:B})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:N&y,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:y})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:N&k,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:k})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:N&b,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:b})}return v}()})})]})]})})},c=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.selected_accesses,v=h.one_access,f=h.regions;return(0,e.createComponentVNode)(2,m.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:v,content:"One",onClick:function(){function g(){return l("set_one_access",{access:"one"})}return g}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!v,content:"All",onClick:function(){function g(){return l("set_one_access",{access:"all"})}return g}()})],4),accesses:f,selectedList:N,accessMod:function(){function g(V){return l("set",{access:V})}return g}(),grantAll:function(){function g(){return l("grant_all")}return g}(),denyAll:function(){function g(){return l("clear_all")}return g}(),grantDep:function(){function g(V){return l("grant_region",{region:V})}return g}(),denyDep:function(){function g(V){return l("deny_region",{region:V})}return g}()})}},47365:function(T,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(92986),m=n(36036),b=n(98595),y=-1,B=1,k=r.AlertModal=function(){function c(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=l.autofocus,N=l.buttons,v=N===void 0?[]:N,f=l.large_buttons,g=l.message,V=g===void 0?"":g,S=l.timeout,I=l.title,L=(0,t.useLocalState)(u,"selected",0),w=L[0],A=L[1],x=110+(V.length>30?Math.ceil(V.length/4):0)+(V.length&&f?5:0),E=325+(v.length>2?100:0),P=function(){function j(M){w===0&&M===y?A(v.length-1):w===v.length-1&&M===B?A(0):A(w+M)}return j}();return(0,e.createComponentVNode)(2,b.Window,{title:I,height:x,width:E,children:[!!S&&(0,e.createComponentVNode)(2,a.Loader,{value:S}),(0,e.createComponentVNode)(2,b.Window.Content,{onKeyDown:function(){function j(M){var O=window.event?M.which:M.keyCode;O===o.KEY_SPACE||O===o.KEY_ENTER?s("choose",{choice:v[w]}):O===o.KEY_ESCAPE?s("cancel"):O===o.KEY_LEFT?(M.preventDefault(),P(y)):(O===o.KEY_TAB||O===o.KEY_RIGHT)&&(M.preventDefault(),P(B))}return j}(),children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,m.Box,{color:"label",overflow:"hidden",children:V})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:[!!h&&(0,e.createComponentVNode)(2,m.Autofocus),(0,e.createComponentVNode)(2,C,{selected:w})]})]})})})]})}return c}(),C=function(p,u){var d=(0,t.useBackend)(u),s=d.data,l=s.buttons,h=l===void 0?[]:l,N=s.large_buttons,v=s.swapped_buttons,f=p.selected;return(0,e.createComponentVNode)(2,m.Flex,{fill:!0,align:"center",direction:v?"row":"row-reverse",justify:"space-around",wrap:!0,children:h==null?void 0:h.map(function(g,V){return N&&h.length<3?(0,e.createComponentVNode)(2,m.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{button:g,id:V.toString(),selected:f===V})},V):(0,e.createComponentVNode)(2,m.Flex.Item,{grow:N?1:0,children:(0,e.createComponentVNode)(2,i,{button:g,id:V.toString(),selected:f===V})},V)})})},i=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=l.large_buttons,N=p.button,v=p.selected,f=N.length>7?"100%":7;return(0,e.createComponentVNode)(2,m.Button,{mx:h?1:0,pt:h?.33:0,content:N,fluid:!!h,onClick:function(){function g(){return s("choose",{choice:N})}return g}(),selected:v,textAlign:"center",height:!!h&&2,width:!h&&f})}},71824:function(T,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AppearanceChanger=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.change_race,u=c.species,d=c.specimen,s=c.change_gender,l=c.gender,h=c.change_eye_color,N=c.change_skin_tone,v=c.change_skin_color,f=c.change_runechat_color,g=c.change_head_accessory_color,V=c.change_hair_color,S=c.change_secondary_hair_color,I=c.change_facial_hair_color,L=c.change_secondary_facial_hair_color,w=c.change_head_marking_color,A=c.change_body_marking_color,x=c.change_tail_marking_color,E=c.change_head_accessory,P=c.head_accessory_styles,j=c.head_accessory_style,M=c.change_hair,O=c.hair_styles,D=c.hair_style,F=c.change_hair_gradient,W=c.change_facial_hair,U=c.facial_hair_styles,K=c.facial_hair_style,G=c.change_head_markings,$=c.head_marking_styles,Q=c.head_marking_style,Z=c.change_body_markings,ie=c.body_marking_styles,ne=c.body_marking_style,se=c.change_tail_markings,ve=c.tail_marking_styles,Ve=c.tail_marking_style,ge=c.change_body_accessory,Ce=c.body_accessory_styles,oe=c.body_accessory_style,ce=c.change_alt_head,te=c.alt_head_styles,fe=c.alt_head_style,ue=!1;return(h||N||v||g||f||V||S||I||L||w||A||x)&&(ue=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:u.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.specimen,selected:Y.specimen===d,onClick:function(){function he(){return i("race",{race:Y.specimen})}return he}()},Y.specimen)})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:l==="male",onClick:function(){function Y(){return i("gender",{gender:"male"})}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:l==="female",onClick:function(){function Y(){return i("gender",{gender:"female"})}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:l==="plural",onClick:function(){function Y(){return i("gender",{gender:"plural"})}return Y}()})]}),!!ue&&(0,e.createComponentVNode)(2,b),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.headaccessorystyle,selected:Y.headaccessorystyle===j,onClick:function(){function he(){return i("head_accessory",{head_accessory:Y.headaccessorystyle})}return he}()},Y.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:O.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.hairstyle,selected:Y.hairstyle===D,onClick:function(){function he(){return i("hair",{hair:Y.hairstyle})}return he}()},Y.hairstyle)})}),!!F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function Y(){return i("hair_gradient")}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function Y(){return i("hair_gradient_offset")}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function Y(){return i("hair_gradient_colour")}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function Y(){return i("hair_gradient_alpha")}return Y}()})]}),!!W&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:U.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.facialhairstyle,selected:Y.facialhairstyle===K,onClick:function(){function he(){return i("facial_hair",{facial_hair:Y.facialhairstyle})}return he}()},Y.facialhairstyle)})}),!!G&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:$.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.headmarkingstyle,selected:Y.headmarkingstyle===Q,onClick:function(){function he(){return i("head_marking",{head_marking:Y.headmarkingstyle})}return he}()},Y.headmarkingstyle)})}),!!Z&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:ie.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.bodymarkingstyle,selected:Y.bodymarkingstyle===ne,onClick:function(){function he(){return i("body_marking",{body_marking:Y.bodymarkingstyle})}return he}()},Y.bodymarkingstyle)})}),!!se&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:ve.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.tailmarkingstyle,selected:Y.tailmarkingstyle===Ve,onClick:function(){function he(){return i("tail_marking",{tail_marking:Y.tailmarkingstyle})}return he}()},Y.tailmarkingstyle)})}),!!ge&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:Ce.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.bodyaccessorystyle,selected:Y.bodyaccessorystyle===oe,onClick:function(){function he(){return i("body_accessory",{body_accessory:Y.bodyaccessorystyle})}return he}()},Y.bodyaccessorystyle)})}),!!ce&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:te.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.altheadstyle,selected:Y.altheadstyle===fe,onClick:function(){function he(){return i("alt_head",{alt_head:Y.altheadstyle})}return he}()},Y.altheadstyle)})})]})})})}return y}(),b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=[{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_runechat_color",text:"Change runechat color",action:"runechat_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"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:p.map(function(u){return!!c[u.key]&&(0,e.createComponentVNode)(2,t.Button,{content:u.text,onClick:function(){function d(){return i(u.action)}return d}()},u.key)})})}},72285:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosAlertConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.priority||[],p=i.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[c.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),c.map(function(u){return(0,e.createVNode)(1,"li","color-bad",u,0,null,u)}),p.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),p.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)})})})}return b}()},65805:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(36352),m=n(98595),b=function(c){if(c===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(c===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(c===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},y=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},B=r.AtmosControl=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=(0,a.useLocalState)(p,"tabIndex",0),h=l[0],N=l[1],v=function(){function f(g){switch(g){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,C);default:return"WE SHOULDN'T BE HERE!"}}return f}();return(0,e.createComponentVNode)(2,m.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:h===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===0,onClick:function(){function f(){return N(0)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===1,onClick:function(){function f(){return N(1)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),v(h)]})})})}return i}(),k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),l.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:h.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:b(h.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function N(){return d("open_alarm",{aref:h.ref})}return N}()})})]},h.name)})]})})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{children:l.filter(function(h){return h.z===3}).map(function(h){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:h.x,y:h.y,icon:"circle",tooltip:h.name,color:y(h.danger),onClick:function(){function N(){return d("open_alarm",{aref:h.ref})}return N}()},h.ref)})})})}},87816:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosFilter=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.on,p=i.pressure,u=i.max_pressure,d=i.filter_type,s=i.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function l(){return C("power")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:p===0,width:2.2,onClick:function(){function l(){return C("min_pressure")}return l}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:p,onDrag:function(){function l(h,N){return C("custom_pressure",{pressure:N})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:p===u,width:2.2,onClick:function(){function l(){return C("max_pressure")}return l}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:s.map(function(l){return(0,e.createComponentVNode)(2,t.Button,{selected:l.gas_type===d,content:l.label,onClick:function(){function h(){return C("set_filter",{filter:l.gas_type})}return h}()},l.label)})})]})})})})}return b}()},57258:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosGraphMonitor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(44879),b=n(88510),y=n(35840),B=["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth","horizontalLinesCount","verticalLinesCount","gridColor","gridWidth","pointTextColor","pointTextSize","labelViewBoxSize"];function k(l,h){if(l==null)return{};var N={};for(var v in l)if({}.hasOwnProperty.call(l,v)){if(h.includes(v))continue;N[v]=l[v]}return N}function C(l,h){l.prototype=Object.create(h.prototype),l.prototype.constructor=l,i(l,h)}function i(l,h){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,v){return N.__proto__=v,N},i(l,h)}var c=r.AtmosGraphMonitor=function(){function l(h,N){var v=(0,a.useBackend)(N),f=v.data,g=(0,a.useLocalState)(N,"tabIndex",0),V=g[0],S=g[1],I=function(){function w(A){switch(A){case 0:return(0,e.createComponentVNode)(2,p,{data:f,info:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u0437\u0430\u043F\u0438\u0441\u0438 T = 60 \u0441. | \u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u043C\u0435\u0436\u0434\u0443 \u0437\u0430\u043F\u0438\u0441\u044F\u043C\u0438 t = 3 \u0441.",pressureListName:"pressure_history",temperatureListName:"temperature_history"});case 1:return(0,e.createComponentVNode)(2,p,{data:f,info:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u0437\u0430\u043F\u0438\u0441\u0438 T = 10 \u043C\u0438\u043D. | \u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u043C\u0435\u0436\u0434\u0443 \u0437\u0430\u043F\u0438\u0441\u044F\u043C\u0438 t = 30 \u0441.",pressureListName:"long_pressure_history",temperatureListName:"long_temperature_history"});default:return"WE SHOULDN'T BE HERE!"}}return w}(),L=function(){function w(A){switch(A){case 0:return 180;case 1:return 350;case 2:return 590;case 3:return 830;default:return 870}}return w}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:L(Object.keys(f.sensors).length),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:V===0,onClick:function(){function w(){return S(0)}return w}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"area-chart"})," \u0422\u0435\u043A\u0443\u0449\u0438\u0435"]},"View"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:V===1,onClick:function(){function w(){return S(1)}return w}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"bar-chart"})," \u0418\u0441\u0442\u043E\u0440\u0438\u044F"]},"History")]}),I(V),Object.keys(f.sensors).length===0&&(0,e.createComponentVNode)(2,t.Box,{pt:2,textAlign:"center",textColor:"gray",bold:!0,fontSize:1.3,children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 gas sensor \u0438\u043B\u0438 meter \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E multitool"})]})})})}return l}(),p=function(h){var N=h.data,v=h.info,f=h.pressureListName,g=h.temperatureListName,V=N.sensors||{},S=function(x,E){return V[x][E].slice(-1)[0]},I=function(x,E){return Math.min.apply(Math,V[x][E])},L=function(x,E){return Math.max.apply(Math,V[x][E])},w=function(x,E){return V[x][E].map(function(P,j){return[j,P]})};return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{color:"gray",children:v}),Object.keys(V).map(function(A){return(0,e.createComponentVNode)(2,t.Section,{title:A,children:(0,e.createComponentVNode)(2,t.Section,{px:2,children:[g in V[A]&&(0,e.createComponentVNode)(2,t.Box,{mb:4,children:[(0,e.createComponentVNode)(2,t.Box,{children:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430: "+(0,m.toFixed)(S(A,g),0)+"\u041A (MIN: "+(0,m.toFixed)(I(A,g),0)+"\u041A; MAX: "+(0,m.toFixed)(L(A,g),0)+"\u041A)"}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:5,mt:1,children:(0,e.createComponentVNode)(2,s,{fillPositionedParent:!0,data:w(A,g),rangeX:[0,w(A,g).length-1],rangeY:[I(A,g)-10,L(A,g)+5],strokeColor:"rgba(219, 40, 40, 1)",fillColor:"rgba(219, 40, 40, 0.1)",horizontalLinesCount:2,verticalLinesCount:w(A,g).length-2,labelViewBoxSize:400})})]}),f in V[A]&&(0,e.createComponentVNode)(2,t.Box,{mb:-1,children:[(0,e.createComponentVNode)(2,t.Box,{children:"\u0414\u0430\u0432\u043B\u0435\u043D\u0438\u0435: "+(0,m.toFixed)(S(A,f),0)+"\u043A\u041F\u0430 (MIN: "+(0,m.toFixed)(I(A,f),0)+"\u043A\u041F\u0430; MAX: "+(0,m.toFixed)(L(A,f),0)+"\u043A\u041F\u0430)"}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:5,mt:1,children:(0,e.createComponentVNode)(2,s,{fillPositionedParent:!0,data:w(A,f),rangeX:[0,w(A,f).length-1],rangeY:[I(A,f)-10,L(A,f)+5],strokeColor:"rgba(40, 219, 40, 1)",fillColor:"rgba(40, 219, 40, 0.1)",horizontalLinesCount:2,verticalLinesCount:w(A,f).length-2,labelViewBoxSize:400})})]})]})},A)})]})},u=function(h,N,v,f){if(h.length===0)return[];var g=(0,b.zipWith)(Math.min).apply(void 0,h),V=(0,b.zipWith)(Math.max).apply(void 0,h);v!==void 0&&(g[0]=v[0],V[0]=v[1]),f!==void 0&&(g[1]=f[0],V[1]=f[1]);var S=function(A,x,E,P){return(A-x)/(E-x)*P},I=(0,b.zipWith)(S),L=(0,b.map)(function(w){return I(w,g,V,N)});return L(h)},d=function(h){for(var N="",v=0;v0){var Ce=ge[0],oe=ge[ge.length-1];ge.push([Ve[0]+j,oe[1]]),ge.push([Ve[0]+j,-j]),ge.push([-j,-j]),ge.push([-j,Ce[1]])}var ce=d(ge);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({position:"relative"},ve,{children:function(){function te(fe){return(0,e.normalizeProps)((0,e.createVNode)(1,"div",null,(0,e.createVNode)(32,"svg",null,[Array.from({length:O}).map(function(ue,Y){return(0,e.createVNode)(32,"line",null,null,1,{x1:0,y1:(Y+1)*(Ve[1]/(O+1)),x2:Ve[0],y2:(Y+1)*(Ve[1]/(O+1)),stroke:U,"stroke-width":G},"horizontal-line-"+Y)}),Array.from({length:F}).map(function(ue,Y){return(0,e.createVNode)(32,"line",null,null,1,{x1:(Y+1)*(Ve[0]/(F+1)),y1:0,x2:(Y+1)*(Ve[0]/(F+1)),y2:Ve[1],stroke:U,"stroke-width":G},"vertical-line-"+Y)}),(0,e.createVNode)(32,"polyline",null,null,1,{transform:"scale(1, -1) translate(0, -"+Ve[1]+")",fill:A,points:ce}),S.map(function(ue,Y){return Y===0?null:(0,e.createVNode)(32,"line",null,null,1,{x1:ge[Y-1][0],y1:Ve[1]-ge[Y-1][1],x2:ge[Y][0],y2:Ve[1]-ge[Y][1],stroke:E,"stroke-width":j},"line-"+Y)}),S.map(function(ue,Y){return(0,e.createVNode)(32,"circle",null,null,1,{cx:ge[Y][0],cy:Ve[1]-ge[Y][1],r:2,fill:"#ffffff",stroke:E,"stroke-width":1},"point-"+Y)}),S.map(function(ue,Y){return Ve[0]>se&&Y%2===1&&(0,e.createVNode)(32,"text",null,ue[1]!==null?ue[1].toFixed(0):"N/A",0,{x:ge[Y][0],y:Ve[1]-ge[Y][1],fill:Q,"font-size":ie,dy:"1em",style:{"text-anchor":"end"}},"point-text-"+Y)})],0,{viewBox:"0 0 "+Ve[0]+" "+Ve[1]}),2,Object.assign({},fe),null,f.ref))}return te}()})))}return v}(),h}(e.Component);s.defaultHooks=void 0,s.defaultHooks=y.pureComponentHooks},52977:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosMixer=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.on,u=c.pressure,d=c.max_pressure,s=c.node1_concentration,l=c.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:p?"On":"Off",color:p?null:"red",selected:p,onClick:function(){function h(){return i("power")}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:u===0,width:2.2,onClick:function(){function h(){return i("min_pressure")}return h}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:u,onDrag:function(){function h(N,v){return i("custom_pressure",{pressure:v})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:u===d,width:2.2,onClick:function(){function h(){return i("max_pressure")}return h}()})]}),(0,e.createComponentVNode)(2,b,{node_name:"Node 1",node_ref:s}),(0,e.createComponentVNode)(2,b,{node_name:"Node 2",node_ref:l})]})})})})}return y}(),b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=B.node_name,u=B.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:p,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:u===0,onClick:function(){function d(){return i("set_node",{node_name:p,concentration:(u-10)/100})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:u,onChange:function(){function d(s,l){return i("set_node",{node_name:p,concentration:l/100})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:u===100,onClick:function(){function d(){return i("set_node",{node_name:p,concentration:(u+10)/100})}return d}()})]})}},11748:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosPump=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.on,p=i.rate,u=i.max_rate,d=i.gas_unit,s=i.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function l(){return C("power")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:p===0,width:2.2,onClick:function(){function l(){return C("min_rate")}return l}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:s,minValue:0,maxValue:u,value:p,onDrag:function(){function l(h,N){return C("custom_rate",{rate:N})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:p===u,width:2.2,onClick:function(){function l(){return C("max_rate")}return l}()})]})]})})})})}return b}()},69321:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosTankControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(44879),m=n(76910),b=n(98595),y=r.AtmosTankControl=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.sensors||{};return(0,e.createComponentVNode)(2,b.Window,{width:400,height:400,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:[Object.keys(u).map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(u[d]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[u[d].pressure," kpa"]}):"",Object.keys(u[d]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[u[d].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(s){return Object.keys(u[d]).indexOf(s)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,m.getGasLabel)(s),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,m.getGasColor)(s),value:u[d][s],minValue:0,maxValue:100,children:(0,o.toFixed)(u[d][s],2)+"%"})},(0,m.getGasLabel)(s)):""})]})},d)}),p.inlet&&Object.keys(p.inlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Inlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(p.inlet.on,"power-off"),content:p.inlet.on?"On":"Off",color:p.inlet.on?null:"red",selected:p.inlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"inlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:p.inlet.rate,onDrag:function(){function d(s,l){return c("set_pressure",{dev:"inlet",val:l})}return d}()})})]})}):"",p.outlet&&Object.keys(p.outlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Outlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(p.outlet.on,"power-off"),content:p.outlet.on?"On":"Off",color:p.outlet.on?null:"red",selected:p.outlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"outlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:p.outlet.rate,onDrag:function(){function d(s,l){return c("set_pressure",{dev:"outlet",val:l})}return d}()})})]})}):""]})})}return B}()},59179:function(T,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),m=n(36036),b=n(98595),y=n(25328),B=function(i,c,p,u){return i.requirements===null?!0:!(i.requirements.metal*u>c||i.requirements.glass*u>p)},k=r.Autolathe=function(){function C(i,c){var p=(0,o.useBackend)(c),u=p.act,d=p.data,s=d.total_amount,l=d.max_amount,h=d.metal_amount,N=d.glass_amount,v=d.busyname,f=d.busyamt,g=d.showhacked,V=d.buildQueue,S=d.buildQueueLen,I=d.recipes,L=d.categories,w=(0,o.useSharedState)(c,"category",0),A=w[0],x=w[1];A===0&&(A="Tools");var E=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=N.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),j=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),O=M[0],D=M[1],F=(0,y.createSearch)(O,function(G){return G.name}),W="";S>0&&(W=V.map(function(G,$){return(0,e.createComponentVNode)(2,m.Box,{children:(0,e.createComponentVNode)(2,m.Button,{fluid:!0,icon:"times",color:"transparent",content:V[$][0],onClick:function(){function Q(){return u("remove_from_queue",{remove_from_queue:V.indexOf(G)+1})}return Q}()},G)},$)}));var U=(0,a.flow)([(0,t.filter)(function(G){return(G.category.indexOf(A)>-1||O)&&(d.showhacked||!G.hacked)}),O&&(0,t.filter)(F),(0,t.sortBy)(function(G){return G.name.toLowerCase()})])(I),K="Build";return O?K="Results for: '"+O+"':":A&&(K="Build ("+A+")"),(0,e.createComponentVNode)(2,b.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:K,buttons:(0,e.createComponentVNode)(2,m.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function G($){return x($)}return G}()}),children:[(0,e.createComponentVNode)(2,m.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function G($,Q){return D(Q)}return G}(),mb:1}),U.map(function(G){return(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+G.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===1,disabled:!B(G,d.metal_amount,d.glass_amount,1),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:1})}return $}(),children:(0,y.toTitleCase)(G.name)}),G.max_multiplier>=10&&(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===10,disabled:!B(G,d.metal_amount,d.glass_amount,10),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:10})}return $}(),children:"10x"}),G.max_multiplier>=25&&(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===25,disabled:!B(G,d.metal_amount,d.glass_amount,25),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:25})}return $}(),children:"25x"}),G.max_multiplier>25&&(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===G.max_multiplier,disabled:!B(G,d.metal_amount,d.glass_amount,G.max_multiplier),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:G.max_multiplier})}return $}(),children:[G.max_multiplier,"x"]}),G.requirements&&Object.keys(G.requirements).map(function($){return(0,y.toTitleCase)($)+": "+G.requirements[$]}).join(", ")||(0,e.createComponentVNode)(2,m.Box,{children:"No resources required."})]},G.ref)})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,m.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Total",children:j}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Storage",children:[d.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,m.Section,{title:"Building",children:(0,e.createComponentVNode)(2,m.Box,{color:v?"green":"",children:v||"Nothing"})}),(0,e.createComponentVNode)(2,m.Section,{title:"Build Queue",height:23.7,children:[W,(0,e.createComponentVNode)(2,m.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!d.buildQueueLen,onClick:function(){function G(){return u("clear_queue")}return G}()})]})]})]})})})}return C}()},29943:function(T,r,n){"use strict";r.__esModule=!0,r.Autolathe220=void 0;var e=n(89005),a=n(25328),t=n(88510),o=n(64795),m=n(72253),b=n(36036),y=n(98595),B=["metal","glass"],k=function(h,N,v,f){return h.requirements===null?!0:!(h.requirements.metal*f>N||h.requirements.glass*f>v)},C=function(h,N){var v=h*N/2e3;return v===0?0:v<.01&&v>0?(0,e.createComponentVNode)(2,b.Box,{fontSize:.75,children:"< 0.01"}):Math.floor(v*100)/100},i=r.Autolathe220=function(){function l(h,N){var v=(0,m.useSharedState)(N,"category","Tools"),f=v[0],g=v[1];return(0,e.createComponentVNode)(2,y.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{basis:"20%",children:(0,e.createComponentVNode)(2,c,{category:f,setCategory:g})}),(0,e.createComponentVNode)(2,b.Stack.Item,{basis:"55%",children:(0,e.createComponentVNode)(2,p,{category:f})}),(0,e.createComponentVNode)(2,b.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,s)]})})]})})})}return l}(),c=function(h,N){var v=(0,m.useBackend)(N),f=v.data,g=h.category,V=h.setCategory,S=f.categories,I=["All"].concat(S);return(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Categories",children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:I.map(function(L){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{mb:.5,height:"2.5em",color:"blue",selected:L===g,onClick:function(){function w(){return V(L)}return w}(),children:L},L)})})})},p=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.metal_amount,S=g.glass_amount,I=g.recipes,L=h.category,w=(0,m.useSharedState)(N,"searchText",""),A=w[0],x=w[1],E=(0,o.flow)([(0,t.filter)(function(M){return L==="All"||M.category.includes(L)||A&&(g.showhacked||!M.hacked)}),A&&(0,t.filter)((0,a.createSearch)(A,function(M){return M.name})),(0,t.sortBy)(function(M){return M.name.toLowerCase()})])(I),P=function(O,D){return(0,e.createComponentVNode)(2,b.Button,{translucent:!0,tooltip:j(O,D),tooltipPosition:"top",disabled:!k(O,V,S,D),onClick:function(){function F(){return f("make",{make:O.uid,multiplier:D})}return F}(),children:[D,"x"]})},j=function(O,D){return(0,e.createFragment)(B.map(function(F){return O.requirements[F]&&(0,e.createComponentVNode)(2,b.ImageButton,{asset:["materials32x32",F],imageSize:32,children:C(O.requirements[F],D)},F)}),0)};return(0,e.createComponentVNode)(2,b.Section,{fill:!0,title:"Build ("+L+")",children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function M(O,D){return x(D)}return M}()})}),(0,e.createComponentVNode)(2,b.Stack.Item,{mt:.5,mb:-2.33,grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:E.map(function(M){return(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,base64:M.image,imageSize:32,textAlign:"left",color:M.category.includes("hacked")&&"brown",tooltip:j(M,1),tooltipPosition:"top",disabled:!k(M,V,S,1),buttons:M.max_multiplier>1&&(0,e.createFragment)([M.max_multiplier>=10&&P(M,10),M.max_multiplier>=25&&P(M,25),M.max_multiplier>25&&P(M,M.max_multiplier)],0),onClick:function(){function O(){return f("make",{make:M.uid,multiplier:1})}return O}(),children:M.name},M.name)})})})]})})},u=function(h,N){var v=(0,m.useBackend)(N),f=v.data,g=f.metal_amount,V=f.glass_amount,S=f.fill_percent,I=function(w,A){return(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,asset:["materials32x32",w],color:"nope",buttons:(0,e.createComponentVNode)(2,b.Box,{backgroundColor:"rgba(255, 255, 255, 0.05)",width:"45px",children:C(A,1)}),children:(0,a.toTitleCase)(w)})};return(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Materials",children:[I("metal",g),I("glass",V),(0,e.createComponentVNode)(2,b.ProgressBar,{minValue:0,value:S,maxValue:100,children:["Storage ",S,"% full"]})]})})},d=function(h,N){var v=(0,m.useBackend)(N),f=v.data,g=f.recipes,V=f.busyname,S=f.busyamt,I=g.find(function(L){return L.name===V});return(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Building",children:(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,color:V&&"green",base64:I==null?void 0:I.image,imageSize:32,children:V?S>1?V+" x"+S:V:"Nothing"})})})},s=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.recipes,S=g.buildQueue,I=g.buildQueueLen,L;return I>0&&(L=S.map(function(w,A){var x=V.find(function(E){return E.name===S[A][0]});return(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,base64:x.image,imageSize:32,buttons:(0,e.createComponentVNode)(2,b.Button,{translucent:!0,width:"32px",icon:"times",iconColor:"red",onClick:function(){function E(){return f("remove_from_queue",{remove_from_queue:S.indexOf(w)+1})}return E}()},w),children:[x.name," ",Number(S[A][1])>1&&"x"+S[A][1]]},A)})),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Queue "+(I>0?I:""),children:L})}),(0,e.createComponentVNode)(2,b.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,b.Section,{fitted:!0,p:.75,children:(0,e.createComponentVNode)(2,b.Button,{fluid:!0,translucent:!I,color:"red",icon:"trash-can",disabled:!I,onClick:function(){function w(){return f("clear_queue")}return w}(),children:"Clear Queue"})})})]})})}},5147:function(T,r,n){"use strict";r.__esModule=!0,r.BioChipPad=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.BioChipPad=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.implant,p=i.contains_case,u=i.gps,d=i.tag,s=(0,a.useLocalState)(B,"newTag",d),l=s[0],h=s[1];return(0,e.createComponentVNode)(2,o.Window,{width:410,height:325,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Bio-chip Mini-Computer",buttons:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject Case",icon:"eject",disabled:!p,onClick:function(){function N(){return C("eject_case")}return N}()})}),children:c&&p?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+c.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),c.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:c.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:c.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:c.function}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:d,onEnter:function(){function N(){return C("tag",{newtag:l})}return N}(),onInput:function(){function N(v,f){return h(f)}return N}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:d===l,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function N(){return C("tag",{newtag:l})}return N}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):p?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"})})})})}return b}()},64273:function(T,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(62411),b=r.Biogenerator=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.config,l=d.container,h=d.processing,N=s.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Operating,{operating:h,name:N}),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),l?(0,e.createComponentVNode)(2,C):(0,e.createComponentVNode)(2,y)]})})})}return i}(),y=function(c,p){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},B=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.biomass,h=s.container,N=s.container_curr_reagents,v=s.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:l}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),h?(0,e.createComponentVNode)(2,t.ProgressBar,{value:N,maxValue:v,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:N+" / "+v+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.has_plants,h=s.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function N(){return d("activate")}return N}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!h,tooltip:h?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function N(){return d("detach_container")}return N}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function N(){return d("eject_plants")}return N}()})})]})})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.biomass,h=s.product_list,N=(0,a.useSharedState)(p,"vendAmount",1),v=N[0],f=N[1],g=Object.entries(h).map(function(V,S){var I=Object.entries(V[1]).map(function(L){return L[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:V[0],open:!0,children:I.map(function(L){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:L.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[L.cost*v,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:ls&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:[(0,e.createComponentVNode)(2,t.Button,{icon:S&&!g?"toggle-on":"toggle-off",content:"Auto shutdown",color:S&&!g?"green":"red",disabled:!!g,tooltip:"Turn auto shutdown on or off",onClick:function(){function A(){return c("auto_shutdown")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:I&&!g?"toggle-on":"toggle-off",content:"Stabilizers",color:I&&!g?"green":"red",disabled:!!g,tooltip:"Turn stabilizers on or off",onClick:function(){function A(){return c("stabilizers")}return A}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Level",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:d===0||g,tooltip:"Set to 0",onClick:function(){function A(){return c("set",{set_level:0})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:d===0||g,onClick:function(){function A(){return c("set",{set_level:s})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:d===0||g,tooltip:"Decrease one step",onClick:function(){function A(){return c("decrease")}return A}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,mx:1,children:(0,e.createComponentVNode)(2,t.Slider,{disabled:g,value:d,fillValue:s,minValue:0,color:w,maxValue:f,stepPixelSize:20,step:1,onChange:function(){function A(x,E){return c("set",{set_level:E})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:d===f||g,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){function A(){return c("increase")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:d===f||g,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){function A(){return c("set",{set_level:f})}return A}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Power Use",children:(0,m.formatPower)(N)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power Use",children:(0,m.formatPower)(N-L)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stabilizer Power Use",children:(0,m.formatPower)(L)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power for next level",children:(0,m.formatPower)(V)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,m.formatPower)(v)})]})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:A.price>=l,onClick:function(){function x(){return c("vend",{target:A.key})}return x}(),content:A.price})},A.key)})})})})]})})]})})})}return B}(),y=r.Alerts=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.product||[],d=p.inputLevel,s=p.emagged,l=p.safeLevels,h=p.autoShutown,N=p.stabilizers,v=p.overhead;return(0,e.createFragment)([!h&&!s&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Auto shutdown disabled"}),s?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"All safeties disabled"}):d<=l?"":N?d-v>l?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"High Power, engaging stabilizers"}):(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers disabled, Instability likely"})],0)}return B}()},33758:function(T,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(89005),a=n(44879),t=n(25328),o=n(72253),m=n(36036),b=n(98595),y=[["good","Alive"],["average","Critical"],["bad","DEAD"]],B=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],k=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],C={average:[.25,.5],bad:[.5,1/0]},i=function(S,I){for(var L=[],w=0;w0?S.filter(function(I){return!!I}).reduce(function(I,L){return(0,e.createFragment)([I,(0,e.createComponentVNode)(2,m.Box,{children:L},L)],0)},null):null},p=function(S){if(S>100){if(S<300)return"mild infection";if(S<400)return"mild infection+";if(S<500)return"mild infection++";if(S<700)return"acute infection";if(S<800)return"acute infection+";if(S<900)return"acute infection++";if(S>=900)return"septic"}return""},u=r.BodyScanner=function(){function V(S,I){var L=(0,o.useBackend)(I),w=L.data,A=w.occupied,x=w.occupant,E=x===void 0?{}:x,P=A?(0,e.createComponentVNode)(2,d,{occupant:E}):(0,e.createComponentVNode)(2,g);return(0,e.createComponentVNode)(2,b.Window,{width:700,height:600,title:"Body Scanner",children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:P})})}return V}(),d=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,m.Box,{children:[(0,e.createComponentVNode)(2,s,{occupant:I}),(0,e.createComponentVNode)(2,l,{occupant:I}),(0,e.createComponentVNode)(2,h,{occupant:I}),(0,e.createComponentVNode)(2,v,{organs:I.extOrgan}),(0,e.createComponentVNode)(2,f,{organs:I.intOrgan})]})},s=function(S,I){var L=(0,o.useBackend)(I),w=L.act,A=L.data,x=A.occupant;return(0,e.createComponentVNode)(2,m.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"Print Report"}),(0,e.createComponentVNode)(2,m.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Status",color:y[x.stat][0],children:y[x.stat][1]}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,m.AnimatedNumber,{value:(0,a.round)(x.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,m.AnimatedNumber,{value:(0,a.round)(x.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Implants",children:x.implant_len?(0,e.createComponentVNode)(2,m.Box,{children:x.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"None"})})]})})},l=function(S){var I=S.occupant;return I.hasBorer||I.blind||I.colourblind||I.nearsighted||I.hasVirus?(0,e.createComponentVNode)(2,m.Section,{title:"Abnormalities",children:B.map(function(L,w){if(I[L[0]])return(0,e.createComponentVNode)(2,m.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,m.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"No abnormalities found."})})},h=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,m.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,m.Table,{children:i(k,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:(0,e.createComponentVNode)(2,N,{value:I[L[1]],marginBottom:A100)&&"average"||!!I.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,m.ProgressBar,{m:-.5,min:"0",max:I.maxHealth,mt:L>0&&"0.5rem",value:I.totalLoss/I.maxHealth,ranges:C,children:(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:[(0,e.createComponentVNode)(2,m.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(I.totalLoss)]})}),!!I.bruteLoss&&(0,e.createComponentVNode)(2,m.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,m.Icon,{name:"bone",mr:.5}),(0,a.round)(I.bruteLoss)]})}),!!I.fireLoss&&(0,e.createComponentVNode)(2,m.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:[(0,e.createComponentVNode)(2,m.Icon,{name:"fire",mr:.5}),(0,a.round)(I.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,m.Box,{color:"average",inline:!0,children:c([!!I.internalBleeding&&"Internal bleeding",!!I.burnWound&&"Critical tissue burns",!!I.lungRuptured&&"Ruptured lung",!!I.status.broken&&I.status.broken,p(I.germ_level),!!I.open&&"Open incision"])}),(0,e.createComponentVNode)(2,m.Box,{inline:!0,children:[c([!!I.status.splinted&&(0,e.createComponentVNode)(2,m.Box,{color:"good",children:"Splinted"}),!!I.status.robotic&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"Robotic"}),!!I.status.dead&&(0,e.createComponentVNode)(2,m.Box,{color:"bad",bold:!0,children:"DEAD"})]),c(I.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},f=function(S){return S.organs.length===0?(0,e.createComponentVNode)(2,m.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,m.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,m.Table,{children:[(0,e.createComponentVNode)(2,m.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",children:"Injuries"})]}),S.organs.map(function(I,L){return(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{color:!!I.dead&&"bad"||I.germ_level>100&&"average"||I.robotic>0&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:I.maxHealth,value:I.damage/I.maxHealth,mt:L>0&&"0.5rem",ranges:C,children:(0,a.round)(I.damage)})}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,m.Box,{color:"average",inline:!0,children:c([p(I.germ_level)])}),(0,e.createComponentVNode)(2,m.Box,{inline:!0,children:c([I.robotic===1&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"Robotic"}),I.robotic===2&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"Assisted"}),!!I.dead&&(0,e.createComponentVNode)(2,m.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},g=function(){return(0,e.createComponentVNode)(2,m.Section,{fill:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},67963:function(T,r,n){"use strict";r.__esModule=!0,r.BookBinder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=n(39473),y=r.BookBinder=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.selectedbook,d=p.book_categories,s=[];return d.map(function(l){return s[l.description]=l.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Book Binder",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){function l(){return c("print_book")}return l}()}),children:[(0,e.createComponentVNode)(2,t.Box,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title,onClick:function(){function l(){return(0,m.modalOpen)(C,"edit_selected_title")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author,onClick:function(){function l(){return(0,m.modalOpen)(C,"edit_selected_author")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"190px",options:d.map(function(l){return l.description}),onSelected:function(){function l(h){return c("toggle_binder_category",{category_id:s[h]})}return l}()})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){function l(){return(0,m.modalOpen)(C,"edit_selected_summary")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:u.summary})]}),(0,e.createVNode)(1,"br"),d.filter(function(l){return u.categories.includes(l.category_id)}).map(function(l){return(0,e.createComponentVNode)(2,t.Button,{content:l.description,selected:!0,icon:"unlink",onClick:function(){function h(){return c("toggle_binder_category",{category_id:l.category_id})}return h}()},l.category_id)})]})})]})})})]})}return B}()},61925:function(T,r,n){"use strict";r.__esModule=!0,r.BotCall=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(i){var c=[{modes:[0],label:"Idle",color:"green"},{modes:[1,2,3],label:"Arresting",color:"yellow"},{modes:[4,5],label:"Patrolling",color:"average"},{modes:[9],label:"Moving",color:"average"},{modes:[6,11],label:"Responding",color:"green"},{modes:[12],label:"Delivering Cargo",color:"blue"},{modes:[13],label:"Returning Home",color:"blue"},{modes:[7,8,10,14,15,16,17,18,19],label:"Working",color:"blue"}],p=c.find(function(u){return u.modes.includes(i)});return(0,e.createComponentVNode)(2,t.Box,{color:p.color,children:[" ",p.label," "]})},b=r.BotCall=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=(0,a.useLocalState)(c,"tabIndex",0),l=s[0],h=s[1],N={0:"Security",1:"Medibot",2:"Cleanbot",3:"Floorbot",4:"Mule",5:"Honkbot"},v=function(){function f(g){return N[g]?(0,e.createComponentVNode)(2,y,{model:N[g]}):"This should not happen. Report on Paradise Github"}return f}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:l===0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:Array.from({length:6}).map(function(f,g){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:l===g,onClick:function(){function V(){return h(g)}return V}(),children:N[g]},g)})})}),v(l)]})})})}return C}(),y=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.bots;return s[i.model]!==void 0?(0,e.createComponentVNode)(2,k,{model:[i.model]}):(0,e.createComponentVNode)(2,B,{model:[i.model]})},B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data;return(0,e.createComponentVNode)(2,t.Stack,{justify:"center",align:"center",fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Box,{bold:1,color:"bad",children:["No ",[i.model]," detected"]})})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.bots;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Model"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Location"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Interface"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Call"})]}),s[i.model].map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.model}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.on?m(l.status):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Off"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.location}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Interface",onClick:function(){function h(){return u("interface",{botref:l.UID})}return h}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Call",onClick:function(){function h(){return u("call",{botref:l.UID})}return h}()})})]},l.UID)})]})})})}},20464:function(T,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotClean=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.locked,u=c.noaccess,d=c.maintpanel,s=c.on,l=c.autopatrol,h=c.canhack,N=c.emagged,v=c.remote_disabled,f=c.painame,g=c.cleanblood,V=c.area;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:g,content:"Clean Blood",disabled:u,onClick:function(){function S(){return i("blood")}return S}()})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc Settings",children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:V?"Reset Area Selection":"Restrict to Current Area",onClick:function(){function S(){return i("area")}return S}()}),V!==null&&(0,e.createComponentVNode)(2,t.LabeledList,{mb:1,children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Locked Area",children:V})})]}),f&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:f,disabled:u,onClick:function(){function S(){return i("ejectpai")}return S}()})})]})})}return y}()},69479:function(T,r,n){"use strict";r.__esModule=!0,r.BotFloor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotFloor=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.noaccess,u=c.painame,d=c.hullplating,s=c.replace,l=c.eat,h=c.make,N=c.fixfloor,v=c.nag_empty,f=c.magnet,g=c.tiles_amount;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Floor Settings",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"5px",children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tiles Left",children:g})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:p,onClick:function(){function V(){return i("autotile")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:p,onClick:function(){function V(){return i("replacetiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Repair damaged tiles and platings",disabled:p,onClick:function(){function V(){return i("fixfloors")}return V}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:l,content:"Finds tiles",disabled:p,onClick:function(){function V(){return i("eattiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Make pieces of metal into tiles when empty",disabled:p,onClick:function(){function V(){return i("maketiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Transmit notice when empty",disabled:p,onClick:function(){function V(){return i("nagonempty")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:f,content:"Traction Magnets",disabled:p,onClick:function(){function V(){return i("anchored")}return V}()})]}),u&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:u,disabled:p,onClick:function(){function V(){return i("ejectpai")}return V}()})})]})})}return y}()},59887:function(T,r,n){"use strict";r.__esModule=!0,r.BotHonk=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotHonk=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:220,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,m.BotStatus)})})}return y}()},80063:function(T,r,n){"use strict";r.__esModule=!0,r.BotMed=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotMed=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.locked,u=c.noaccess,d=c.maintpanel,s=c.on,l=c.autopatrol,h=c.canhack,N=c.emagged,v=c.remote_disabled,f=c.painame,g=c.shut_up,V=c.declare_crit,S=c.stationary_mode,I=c.heal_threshold,L=c.injection_amount,w=c.use_beaker,A=c.treat_virus,x=c.reagent_glass;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!g,disabled:u,onClick:function(){function E(){return i("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:V,disabled:u,onClick:function(){function E(){return i("toggle_critical_alerts")}return E}()})]}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Treatment Settings",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Healing Threshold",children:(0,e.createComponentVNode)(2,t.Slider,{value:I.value,minValue:I.min,maxValue:I.max,step:5,disabled:u,onChange:function(){function E(P,j){return i("set_heal_threshold",{target:j})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Injection Level",children:(0,e.createComponentVNode)(2,t.Slider,{value:L.value,minValue:L.min,maxValue:L.max,step:5,format:function(){function E(P){return P+"u"}return E}(),disabled:u,onChange:function(){function E(P,j){return i("set_injection_amount",{target:j})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reagent Source",children:(0,e.createComponentVNode)(2,t.Button,{content:w?"Beaker":"Internal Synthesizer",icon:w?"flask":"cogs",disabled:u,onClick:function(){function E(){return i("toggle_use_beaker")}return E}()})}),x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x.amount,minValue:0,maxValue:x.max_amount,children:[x.amount," / ",x.max_amount]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{ml:1,children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",disabled:u,onClick:function(){function E(){return i("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:u,onClick:function(){function E(){return i("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:S,disabled:u,onClick:function(){function E(){return i("toggle_stationary_mode")}return E}()})]}),f&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:f,disabled:u,onClick:function(){function E(){return i("ejectpai")}return E}()})})]})})})}return y}()},74439:function(T,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotSecurity=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.noaccess,u=c.painame,d=c.check_id,s=c.check_weapons,l=c.check_warrant,h=c.arrest_mode,N=c.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:445,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:p,onClick:function(){function v(){return i("authid")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Unauthorized Weapons",disabled:p,onClick:function(){function v(){return i("authweapon")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:l,content:"Wanted Criminals",disabled:p,onClick:function(){function v(){return i("authwarrant")}return v}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Detain Targets Indefinitely",disabled:p,onClick:function(){function v(){return i("arrtype")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Announce Arrests On Radio",disabled:p,onClick:function(){function v(){return i("arrdeclare")}return v}()})]}),u&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:u,disabled:p,onClick:function(){function v(){return i("ejectpai")}return v}()})})]})})}return y}()},10833:function(T,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(89005),a=n(98595),t=n(36036),o=n(72253),m=function(k,C){var i=k.cell,c=(0,o.useBackend)(C),p=c.act,u=i.cell_id,d=i.occupant,s=i.crimes,l=i.brigged_by,h=i.time_left_seconds,N=i.time_set_seconds,v=i.ref,f="";h>0&&(f+=" BrigCells__listRow--active");var g=function(){p("release",{ref:v})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:f,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:N})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:h})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:g,children:"Release"})})]})},b=function(k){var C=k.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),C.map(function(i){return(0,e.createComponentVNode)(2,m,{cell:i},i.ref)})]})},y=r.BrigCells=function(){function B(k,C){var i=(0,o.useBackend)(C),c=i.act,p=i.data,u=p.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b,{cells:u})})})})})}return B}()},45761:function(T,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.BrigTimer=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;i.nameText=i.occupant,i.timing&&(i.prisoner_hasrec?i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:i.occupant}):i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:i.occupant}));var c="pencil-alt";i.prisoner_name&&(i.prisoner_hasrec||(c="exclamation-triangle"));var p=[],u=0;for(u=0;up?this.substring(0,p)+"...":this};var k=function(u,d){var s,l;if(!d)return[];var h=u.findIndex(function(N){return N.name===d.name});return[(s=u[h-1])==null?void 0:s.name,(l=u[h+1])==null?void 0:l.name]},C=function(u,d){d===void 0&&(d="");var s=(0,m.createSearch)(d,function(l){return l.name});return(0,t.flow)([(0,a.filter)(function(l){return l==null?void 0:l.name}),d&&(0,a.filter)(s),(0,a.sortBy)(function(l){return l.name})])(u)},i=r.CameraConsole=function(){function p(u,d){var s=(0,b.useBackend)(d),l=s.act,h=s.data,N=s.config,v=h.mapRef,f=h.activeCamera,g=C(h.cameras),V=k(g,f),S=V[0],I=V[1];return(0,e.createComponentVNode)(2,B.Window,{width:870,height:708,children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,c)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),f&&f.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!S,onClick:function(){function L(){return l("switch_camera",{name:S})}return L}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!I,onClick:function(){function L(){return l("switch_camera",{name:I})}return L}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:v,type:"map"}})],4)]})}return p}(),c=r.CameraConsoleContent=function(){function p(u,d){var s=(0,b.useBackend)(d),l=s.act,h=s.data,N=(0,b.useLocalState)(d,"searchText",""),v=N[0],f=N[1],g=h.activeCamera,V=C(h.cameras,v);return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function S(I,L){return f(L)}return S}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,children:V.map(function(S){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",g&&S.name===g.name&&"Button--selected"]),S.name.trimLongStr(23),0,{title:S.name,onClick:function(){function I(){return l("switch_camera",{name:S.name})}return I}()},S.name)})})})]})}return p}()},39222:function(T,r,n){"use strict";r.__esModule=!0,r.CameraConsoleOldContent=r.CameraConsoleMapContent=r.CameraConsole220=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(35840),m=n(25328),b=n(72253),y=n(36036),B=n(98595),k=function(d,s){var l,h;if(!s)return[];var N=d.findIndex(function(v){return v.name===s.name});return[(l=d[N-1])==null?void 0:l.name,(h=d[N+1])==null?void 0:h.name]},C=function(d,s){s===void 0&&(s="");var l=(0,m.createSearch)(s,function(h){return h.name});return(0,t.flow)([(0,a.filter)(function(h){return h==null?void 0:h.name}),s&&(0,a.filter)(l),(0,a.sortBy)(function(h){return h.name})])(d)},i=r.CameraConsole220=function(){function u(d,s){var l=(0,b.useLocalState)(s,"tabIndex",0),h=l[0],N=l[1],v=function(){function f(g){switch(g){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,p);default:return"WE SHOULDN'T BE HERE!"}}return f}();return(0,e.createComponentVNode)(2,B.Window,{width:1170,height:755,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{children:(0,e.createComponentVNode)(2,y.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{width:h===1?"222px":"475px",textAlign:"center",children:(0,e.createComponentVNode)(2,y.Tabs,{fluid:!0,ml:h===1?1:0,mt:h===1?1:0,children:[(0,e.createComponentVNode)(2,y.Tabs.Tab,{selected:h===0,onClick:function(){function f(){return N(0)}return f}(),children:[(0,e.createComponentVNode)(2,y.Icon,{name:"map-marked-alt"})," \u041A\u0430\u0440\u0442\u0430"]},"Map"),(0,e.createComponentVNode)(2,y.Tabs.Tab,{selected:h===1,onClick:function(){function f(){return N(1)}return f}(),children:[(0,e.createComponentVNode)(2,y.Icon,{name:"table"})," \u0421\u043F\u0438\u0441\u043E\u043A"]},"List")]})}),v(h)]})})})})}return u}(),c=r.CameraConsoleMapContent=function(){function u(d,s){var l=(0,b.useBackend)(s),h=l.act,N=l.data,v=C(N.cameras),f=(0,b.useLocalState)(s,"zoom",1),g=f[0],V=f[1],S=N.mapRef,I=N.activeCamera,L=N.stationLevel,w=N.mapUrl,A=N.selected_z_level,x=k(v,I),E=x[0],P=x[1];return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{height:"100%",style:{flex:"0 0 474px"},children:(0,e.createComponentVNode)(2,y.NanoMap,{onZoom:function(){function j(M){return V(M)}return j}(),mapUrl:w,children:v.filter(function(j){return j.z===(Number(A)||L)}).map(function(j){return(0,e.createComponentVNode)(2,y.NanoMap.NanoButton,{activeCamera:I,x:j.x,y:j.y,context:s,zoom:g,icon:"circle",tooltip:j.name,name:j.name,color:"blue",status:j.status},j.ref)})})}),(0,e.createComponentVNode)(2,y.Stack.Item,{height:"100%",m:.1,className:"CameraConsole__right_map",children:[(0,e.createVNode)(1,"div","CameraConsole__header",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),I&&I.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!E,onClick:function(){function j(){return h("switch_camera",{name:E})}return j}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!P,onClick:function(){function j(){return h("switch_camera",{name:P})}return j}()})],4)],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",overflow:"hidden",params:{id:S,type:"map"}})]})]})}return u}(),p=r.CameraConsoleOldContent=function(){function u(d,s){var l=(0,b.useBackend)(s),h=l.act,N=l.data,v=l.config,f=N.mapRef,g=N.activeCamera,V=(0,b.useLocalState)(s,"searchText",""),S=V[0],I=V[1],L=C(N.cameras,S),w=k(L,g),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Stack.Item,{children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Input,{width:"215px",placeholder:"\u041D\u0430\u0439\u0442\u0438 \u043A\u0430\u043C\u0435\u0440\u0443",onInput:function(){function E(P,j){return I(j)}return E}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,children:L.map(function(E){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid",E.status?"Button--color--transparent":"Button--color--danger","Button--ellipsis",g&&E.name===g.name&&"Button--selected"]),E.name,0,{title:E.name,onClick:function(){function P(){return h("switch_camera",{name:E.name})}return P}()},E.name)})})})]})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),g&&g.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!A,onClick:function(){function E(){return h("switch_camera",{name:A})}return E}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!x,onClick:function(){function E(){return h("switch_camera",{name:x})}return E}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:f,type:"map"}})],4)]})}return u}()},52927:function(T,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(49968),b=n(98595),y=r.Canister=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.act,p=i.data,u=p.portConnected,d=p.tankPressure,s=p.releasePressure,l=p.defaultReleasePressure,h=p.minReleasePressure,N=p.maxReleasePressure,v=p.valveOpen,f=p.name,g=p.canLabel,V=p.colorContainer,S=p.color_index,I=p.hasHoldingTank,L=p.holdingTank,w="";S.prim&&(w=V.prim.options[S.prim].name);var A="";S.sec&&(A=V.sec.options[S.sec].name);var x="";S.ter&&(x=V.ter.options[S.ter].name);var E="";S.quart&&(E=V.quart.options[S.quart].name);var P=[],j=[],M=[],O=[],D=0;for(D=0;Df.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:f.total_positions-f.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:l.cooldown_time||!f.can_close,onClick:function(){function g(){return s("make_job_unavailable",{job:f.title})}return g}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:l.cooldown_time||!f.can_open,onClick:function(){function g(){return s("make_job_available",{job:f.title})}return g}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:l.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l.priority_jobs.indexOf(f.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:f.is_priority?"Yes":"No",selected:f.is_priority,disabled:l.cooldown_time||!f.can_prioritize,onClick:function(){function g(){return s("prioritize_job",{job:f.title})}return g}()})})]},f.title)})]})})]}):v=(0,e.createComponentVNode)(2,B);break;case 2:!l.authenticated||!l.scan_name?v=(0,e.createComponentVNode)(2,B):l.modify_name?v=(0,e.createComponentVNode)(2,m.AccessList,{accesses:l.regions,selectedList:l.selectedAccess,accessMod:function(){function f(g){return s("set",{access:g})}return f}(),grantAll:function(){function f(){return s("grant_all")}return f}(),denyAll:function(){function f(){return s("clear_all")}return f}(),grantDep:function(){function f(g){return s("grant_region",{region:g})}return f}(),denyDep:function(){function f(g){return s("deny_region",{region:g})}return f}()}):v=(0,e.createComponentVNode)(2,k);break;case 3:l.authenticated?l.records.length?v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!l.authenticated||l.records.length===0||l.target_dept,onClick:function(){function f(){return s("wipe_all_logs")}return f}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!l.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),l.records.map(function(f){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.reason}),!!l.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.deletedby})]},f.timestamp)})]}),!!l.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!l.authenticated||l.records.length===0,onClick:function(){function f(){return s("wipe_my_logs")}return f}()})})]}):v=(0,e.createComponentVNode)(2,C):v=(0,e.createComponentVNode)(2,B);break;case 4:!l.authenticated||!l.scan_name?v=(0,e.createComponentVNode)(2,B):v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),l.people_dept.map(function(f){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:f.buttontext,disabled:!f.demotable,onClick:function(){function g(){return s("remote_demote",{remote_demote:f.name})}return g}()})})]},f.title)})]})});break;default:v=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:N}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:h}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v})]})})})}return c}()},64083:function(T,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),m=n(36036),b=n(98595),y=n(25328),B=r.CargoConsole=function(){function d(s,l){return(0,e.createComponentVNode)(2,b.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,u)]})})})}return d}(),k=function(s,l){var h=(0,o.useLocalState)(l,"contentsModal",null),N=h[0],v=h[1],f=(0,o.useLocalState)(l,"contentsModalTitle",null),g=f[0],V=f[1];if(N!==null&&g!==null)return(0,e.createComponentVNode)(2,m.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,m.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[g,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,m.Box,{children:N.map(function(S){return(0,e.createComponentVNode)(2,m.Box,{children:["- ",S]},S)})}),(0,e.createComponentVNode)(2,m.Box,{m:2,children:(0,e.createComponentVNode)(2,m.Button,{content:"Close",onClick:function(){function S(){v(null),V(null)}return S}()})})]})},C=function(s,l){var h=(0,o.useBackend)(l),N=h.act,v=h.data,f=v.is_public,g=v.timeleft,V=v.moving,S=v.at_station,I,L;return!V&&!S?(I="Docked off-station",L="Call Shuttle"):!V&&S?(I="Docked at the station",L="Return Shuttle"):V&&(L="In Transit...",g!==1?I="Shuttle is en route (ETA: "+g+" minutes)":I="Shuttle is en route (ETA: "+g+" minute)"),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Status",children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Shuttle Status",children:I}),f===0&&(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,m.Button,{content:L,disabled:V,onClick:function(){function w(){return N("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,m.Button,{content:"View Central Command Messages",onClick:function(){function w(){return N("showMessages")}return w}()})]})]})})})},i=function(s,l){var h,N=(0,o.useBackend)(l),v=N.act,f=N.data,g=f.accounts,V=(0,o.useLocalState)(l,"selectedAccount"),S=V[0],I=V[1],L=[];return g.map(function(w){return L[w.name]=w.account_UID}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,m.Dropdown,{width:"190px",options:g.map(function(w){return w.name}),selected:(h=g.filter(function(w){return w.account_UID===S})[0])==null?void 0:h.name,onSelected:function(){function w(A){return I(L[A])}return w}()}),g.filter(function(w){return w.account_UID===S}).map(function(w){return(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,m.Stack.Item,{mt:1,children:w.name})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:w.balance})})]},w.account_UID)})]})})},c=function(s,l){var h=(0,o.useBackend)(l),N=h.act,v=h.data,f=v.requests,g=v.categories,V=v.supply_packs,S=(0,o.useSharedState)(l,"category","Emergency"),I=S[0],L=S[1],w=(0,o.useSharedState)(l,"search_text",""),A=w[0],x=w[1],E=(0,o.useLocalState)(l,"contentsModal",null),P=E[0],j=E[1],M=(0,o.useLocalState)(l,"contentsModalTitle",null),O=M[0],D=M[1],F=(0,y.createSearch)(A,function(Q){return Q.name}),W=(0,o.useLocalState)(l,"selectedAccount"),U=W[0],K=W[1],G=(0,a.flow)([(0,t.filter)(function(Q){return Q.cat===g.filter(function(Z){return Z.name===I})[0].category||A}),A&&(0,t.filter)(F),(0,t.sortBy)(function(Q){return Q.name.toLowerCase()})])(V),$="Crate Catalogue";return A?$="Results for '"+A+"':":I&&($="Browsing "+I),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:$,buttons:(0,e.createComponentVNode)(2,m.Dropdown,{width:"190px",options:g.map(function(Q){return Q.name}),selected:I,onSelected:function(){function Q(Z){return L(Z)}return Q}()}),children:[(0,e.createComponentVNode)(2,m.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function Q(Z,ie){return x(ie)}return Q}(),mb:1}),(0,e.createComponentVNode)(2,m.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:G.map(function(Q){return(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{bold:!0,children:[Q.name," (",Q.cost," Credits)"]}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,m.Button,{content:"Order 1",icon:"shopping-cart",disabled:!U,onClick:function(){function Z(){return N("order",{crate:Q.ref,multiple:!1,account:U})}return Z}()}),(0,e.createComponentVNode)(2,m.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!U||Q.singleton,onClick:function(){function Z(){return N("order",{crate:Q.ref,multiple:!0,account:U})}return Z}()}),(0,e.createComponentVNode)(2,m.Button,{content:"View Contents",icon:"search",onClick:function(){function Z(){j(Q.contents),D(Q.name)}return Z}()})]})]},Q.name)})})})]})})},p=function(s,l){var h=s.request,N,v;switch(h.department){case"Engineering":v="CE",N="orange";break;case"Medical":v="CMO",N="teal";break;case"Science":v="RD",N="purple";break;case"Supply":v="CT",N="brown";break;case"Service":v="HOP",N="olive";break;case"Security":v="HOS",N="red";break;case"Command":v="CAP",N="blue";break;case"Assistant":v="Any Head",N="grey";break}return(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{mt:.5,children:"Approval Required:"}),!!h.req_cargo_approval&&(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!h.req_head_approval&&(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:N,content:v,disabled:h.req_cargo_approval,icon:"user-tie",tooltip:h.req_cargo_approval?"This Order first requires approval from the QM before the "+v+" can approve it":"This Order requires approval from the "+v+" still"})})]})},u=function(s,l){var h=(0,o.useBackend)(l),N=h.act,v=h.data,f=v.requests,g=v.orders,V=v.shipments;return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,m.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,m.Table,{children:f.map(function(S){return(0,e.createComponentVNode)(2,m.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,m.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,m.Box,{children:["Order #",S.ordernum,": ",S.supply_type," (",S.cost," credits) for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)," with"," ",S.department?"The "+S.department+" Department":"Their Personal"," Account"]}),(0,e.createComponentVNode)(2,m.Box,{italic:!0,children:["Reason: ",S.comment]}),(0,e.createComponentVNode)(2,p,{request:S})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,m.Button,{content:"Approve",color:"green",disabled:!S.can_approve,onClick:function(){function I(){return N("approve",{ordernum:S.ordernum})}return I}()}),(0,e.createComponentVNode)(2,m.Button,{content:"Deny",color:"red",disabled:!S.can_deny,onClick:function(){function I(){return N("deny",{ordernum:S.ordernum})}return I}()})]})]},S.ordernum)})}),(0,e.createComponentVNode)(2,m.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:g.map(function(S){return(0,e.createComponentVNode)(2,m.Table.Row,{children:(0,e.createComponentVNode)(2,m.Table.Cell,{children:[(0,e.createComponentVNode)(2,m.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,m.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})}),(0,e.createComponentVNode)(2,m.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:V.map(function(S){return(0,e.createComponentVNode)(2,m.Table.Row,{children:(0,e.createComponentVNode)(2,m.Table.Cell,{children:[(0,e.createComponentVNode)(2,m.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,m.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})})]})}},87331:function(T,r,n){"use strict";r.__esModule=!0,r.ChangelogView=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ChangelogView=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=(0,a.useLocalState)(B,"onlyRecent",0),p=c[0],u=c[1],d=i.cl_data,s=i.last_cl,l={FIX:(0,e.createComponentVNode)(2,t.Icon,{name:"tools",title:"Fix"}),WIP:(0,e.createComponentVNode)(2,t.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,e.createComponentVNode)(2,t.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,e.createComponentVNode)(2,t.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})},h=function(){function N(v){return v in l?l[v]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return N}();return(0,e.createComponentVNode)(2,o.Window,{width:750,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,e.createComponentVNode)(2,t.Button,{content:p?"Showing all changes":"Showing changes since last connection",onClick:function(){function N(){return u(!p)}return N}()}),children:d.map(function(N){return!p&&N.merge_ts<=s||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:N.author+" - Merged on "+N.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+N.num,onClick:function(){function v(){return C("open_pr",{pr_number:N.num})}return v}()}),children:N.entries.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[h(v.etype)," ",v.etext]},v)})},N)})})})})}return b}()},36108:function(T,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(85870),m=n(98595),b=[1,5,10,20,30,50],y=[1,5,10],B=r.ChemDispenser=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.chemicals;return(0,e.createComponentVNode)(2,m.Window,{width:400,height:400+h.length*8,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,i)]})})})}return c}(),k=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.amount,N=l.energy,v=l.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:N,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[N," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:b.map(function(f,g){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:h===f,content:f,onClick:function(){function V(){return s("amount",{amount:f})}return V}()})},g)})})})]})})})},C=function(p,u){for(var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.chemicals,N=h===void 0?[]:h,v=[],f=0;f<(N.length+1)%3;f++)v.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:l.glass?"Drink Dispenser":"Chemical Dispenser",children:[N.map(function(g,V){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:g.title,style:{"margin-left":"2px"},onClick:function(){function S(){return s("dispense",{reagent:g.id})}return S}()},V)}),v.map(function(g,V){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},V)})]})})},i=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.isBeakerLoaded,N=l.beakerCurrentVolume,v=l.beakerMaxVolume,f=l.beakerContents,g=f===void 0?[]:f;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:l.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!h&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[N," / ",v," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!h,onClick:function(){function V(){return s("ejectBeaker")}return V}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:h,beakerContents:g,buttons:function(){function V(S){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:-1})}return I}()}),y.map(function(I,L){return(0,e.createComponentVNode)(2,t.Button,{content:I,onClick:function(){function w(){return s("remove",{reagent:S.id,amount:I})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:S.volume})}return I}()})],0)}return V}()})})})}},13146:function(T,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(85870),b=n(98595),y=r.ChemHeater=function(){function C(i,c){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return C}(),B=function(i,c){var p=(0,t.useBackend)(c),u=p.act,d=p.data,s=d.targetTemp,l=d.targetTempReached,h=d.autoEject,N=d.isActive,v=d.currentTemp,f=d.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){function g(){return u("toggle_autoeject")}return g}()}),(0,e.createComponentVNode)(2,o.Button,{content:N?"On":"Off",icon:"power-off",selected:N,disabled:!f,onClick:function(){function g(){return u("toggle_on")}return g}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(s,0),minValue:0,maxValue:1e3,onDrag:function(){function g(V,S){return u("adjust_temperature",{target:S})}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:l?"good":"average",children:f&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:v,format:function(){function g(V){return(0,a.toFixed)(V)+" K"}return g}()})||"\u2014"})]})})})},k=function(i,c){var p=(0,t.useBackend)(c),u=p.act,d=p.data,s=d.isBeakerLoaded,l=d.beakerCurrentVolume,h=d.beakerMaxVolume,N=d.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!s&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[l," / ",h," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function v(){return u("eject_beaker")}return v}()})]}),children:(0,e.createComponentVNode)(2,m.BeakerContents,{beakerLoaded:s,beakerContents:N})})})}},56541:function(T,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(85870),b=n(3939),y=n(35840),B=["icon"];function k(I,L){if(I==null)return{};var w={};for(var A in I)if({}.hasOwnProperty.call(I,A)){if(L.includes(A))continue;w[A]=I[A]}return w}function C(I,L){I.prototype=Object.create(L.prototype),I.prototype.constructor=I,i(I,L)}function i(I,L){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},i(I,L)}var c=[1,5,10],p=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=L.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:E.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:P.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(P.desc||"").length>0?P.desc:"N/A"}),P.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:P.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:P.blood_dna})],4),!E.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:E.printing?"spinner":"print",disabled:E.printing,iconSpin:!!E.printing,ml:"0.5rem",content:"Print",onClick:function(){function j(){return x("print",{idx:P.idx,beaker:L.args.beaker})}return j}()})]})})})})},u=function(I){return I[I.ToDisposals=0]="ToDisposals",I[I.ToBeaker=1]="ToBeaker",I}(u||{}),d=r.ChemMaster=function(){function I(L,w){return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,s),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,S)]})})]})}return I}(),s=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.beaker,j=E.beaker_reagents,M=E.buffer_reagents,O=M.length>0;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:O?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function D(){return x("eject")}return D}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function D(){return x("eject")}return D}()}),children:P?(0,e.createComponentVNode)(2,m.BeakerContents,{beakerLoaded:!0,beakerContents:j,buttons:function(){function D(F,W){return(0,e.createComponentVNode)(2,t.Box,{mb:W0?(0,e.createComponentVNode)(2,m.BeakerContents,{beakerLoaded:!0,beakerContents:j,buttons:function(){function M(O,D){return(0,e.createComponentVNode)(2,t.Box,{mb:D0&&(O=M.map(function(D){var F=D.id,W=D.sprite;return(0,e.createComponentVNode)(2,g,{icon:W,translucent:!0,onClick:function(){function U(){return x("set_sprite_style",{production_mode:P,style:F})}return U}(),selected:j===F},F)})),(0,e.createComponentVNode)(2,f,{productionData:L.productionData,children:O&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:O})})},S=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.loaded_pill_bottle_style,j=E.containerstyles,M=E.loaded_pill_bottle,O={width:"20px",height:"20px"},D=j.map(function(F){var W=F.color,U=F.name,K=P===W;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:O.width,height:O.height},onClick:function(){function G(){return x("set_container_style",{style:W})}return G}(),icon:K&&"check",iconStyle:{position:"relative","z-index":1},tooltip:U,tooltipPosition:"top",children:[!K&&(0,e.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,e.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:O.width,height:O.height,"background-color":W,opacity:.6,filter:"alpha(opacity=60)"}})]},W)});return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Container Customization",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!M,content:"Eject Container",onClick:function(){function F(){return x("ejectp")}return F}()}),children:M?(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:[(0,e.createComponentVNode)(2,t.Button,{style:{width:O.width,height:O.height},icon:"tint-slash",onClick:function(){function F(){return x("clear_container_style")}return F}(),selected:!P,tooltip:"Default",tooltipPosition:"top"}),D]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,b.modalRegisterBodyOverride)("analyze",p)},37173:function(T,r,n){"use strict";r.__esModule=!0,r.CloningConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(79140),b=1,y=32,B=128,k=r.CloningConsole=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.tab,g=v.has_scanner,V=v.pod_amount;return(0,e.createComponentVNode)(2,o.Window,{width:640,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cloning Console",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected scanner",children:g?"Online":"Missing"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected pods",children:V})]})}),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:f===1,icon:"home",onClick:function(){function S(){return N("menu",{tab:1})}return S}(),children:"Main Menu"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:f===2,icon:"user",onClick:function(){function S(){return N("menu",{tab:2})}return S}(),children:"Damage Configuration"})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,C)})]})})}return d}(),C=function(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.tab,f;return v===1?f=(0,e.createComponentVNode)(2,i):v===2&&(f=(0,e.createComponentVNode)(2,c)),f},i=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.pods,g=v.pod_amount,V=v.selected_pod_UID;return(0,e.createComponentVNode)(2,t.Box,{children:[!g&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No pods connected."}),!!g&&f.map(function(S,I){return(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Pod "+(I+1),children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"96px",shrink:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,m.resolveAsset)("pod_"+(S.cloning?"cloning":"idle")+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{selected:V===S.uid,onClick:function(){function L(){return N("select_pod",{uid:S.uid})}return L}(),children:"Select"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Progress",children:[!S.cloning&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Pod is inactive."}),!!S.cloning&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.clone_progress,maxValue:100,color:"good"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.biomass,ranges:{good:[2*S.biomass_storage_capacity/3,S.biomass_storage_capacity],average:[S.biomass_storage_capacity/3,2*S.biomass_storage_capacity/3],bad:[0,S.biomass_storage_capacity/3]},minValue:0,maxValue:S.biomass_storage_capacity,children:[S.biomass,"/",S.biomass_storage_capacity+" ("+100*S.biomass/S.biomass_storage_capacity+"%)"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sanguine Reagent",children:S.sanguine_reagent}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Osseous Reagent",children:S.osseous_reagent})]})})]})},S)})]})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.selected_pod_data,g=v.has_scanned,V=v.scanner_has_patient,S=v.feedback,I=v.scan_successful,L=v.cloning_cost,w=v.has_scanner;return(0,e.createComponentVNode)(2,t.Box,{children:[!w&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No scanner connected."}),!!w&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Scanner Info",buttons:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hourglass-half",onClick:function(){function A(){return N("scan")}return A}(),children:"Scan"}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function A(){return N("eject")}return A}(),children:"Eject Patient"})]}),children:[!g&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:V?"No scan detected for current patient.":"No patient is in the scanner."}),!!g&&(0,e.createComponentVNode)(2,t.Box,{color:S.color,children:S.text})]}),(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Damages Breakdown",children:(0,e.createComponentVNode)(2,t.Box,{children:[(!I||!g)&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No valid scan detected."}),!!I&&!!g&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function A(){return N("fix_all")}return A}(),children:"Repair All Damages"}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function A(){return N("fix_none")}return A}(),children:"Repair No Damages"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function A(){return N("clone")}return A}(),children:"Clone"})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[0],maxValue:f.biomass_storage_capacity,ranges:{bad:[2*f.biomass_storage_capacity/3,f.biomass_storage_capacity],average:[f.biomass_storage_capacity/3,2*f.biomass_storage_capacity/3],good:[0,f.biomass_storage_capacity/3]},color:L[0]>f.biomass?"bad":null,children:["Biomass: ",L[0],"/",f.biomass,"/",f.biomass_storage_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[1],maxValue:f.max_reagent_capacity,ranges:{bad:[2*f.max_reagent_capacity/3,f.max_reagent_capacity],average:[f.max_reagent_capacity/3,2*f.max_reagent_capacity/3],good:[0,f.max_reagent_capacity/3]},color:L[1]>f.sanguine_reagent?"bad":"good",children:["Sanguine: ",L[1],"/",f.sanguine_reagent,"/",f.max_reagent_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[2],maxValue:f.max_reagent_capacity,ranges:{bad:[2*f.max_reagent_capacity/3,f.max_reagent_capacity],average:[f.max_reagent_capacity/3,2*f.max_reagent_capacity/3],good:[0,f.max_reagent_capacity/3]},color:L[2]>f.osseous_reagent?"bad":"good",children:["Osseous: ",L[2],"/",f.osseous_reagent,"/",f.max_reagent_capacity]})})]}),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,u)]})]})})]})]})},p=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.patient_limb_data,g=v.limb_list,V=v.desired_limb_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Limbs",children:g.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"15%",height:"20px",children:[f[S][4],":"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),f[S][3]===0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0]+V[S][1],maxValue:f[S][5],ranges:{good:[0,f[S][5]/3],average:[f[S][5]/3,2*f[S][5]/3],bad:[2*f[S][5]/3,f[S][5]]},children:["Post-Cloning Damage: ",(0,e.createComponentVNode)(2,t.Icon,{name:"bone"})," "+V[S][0]+" / ",(0,e.createComponentVNode)(2,t.Icon,{name:"fire"})," "+V[S][1]]})}),f[S][3]!==0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",f[S][4]," is missing!"]})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[!!f[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][3],onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"replace"})}return L}(),children:"Replace Limb"})}),!f[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][0]||f[S][1]),checked:!(V[S][0]||V[S][1]),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"damage"})}return L}(),children:"Repair Damages"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][2]&b),checked:!(V[S][2]&b),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"bone"})}return L}(),children:"Mend Bone"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][2]&y),checked:!(V[S][2]&y),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"ib"})}return L}(),children:"Mend IB"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][2]&B),checked:!(V[S][2]&B),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"critburn"})}return L}(),children:"Mend Critical Burn"})]})]})]},S)})})},u=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.patient_organ_data,g=v.organ_list,V=v.desired_organ_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Organs",children:g.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"20%",height:"20px",children:[f[S][3],":"," "]}),f[S][5]!=="heart"&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!!f[S][2]&&(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][2]&&!V[S][1],onClick:function(){function L(){return N("toggle_organ_repair",{organ:S,type:"replace"})}return L}(),children:"Replace Organ"}),!f[S][2]&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!f[S][0],checked:!V[S][0],onClick:function(){function L(){return N("toggle_organ_repair",{organ:S,type:"damage"})}return L}(),children:"Repair Damages"})})]})}),f[S][5]==="heart"&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Heart replacement is required for cloning."}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[!!f[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",f[S][3]," is missing!"]}),!f[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0],maxValue:f[S][4],ranges:{good:[0,f[S][4]/3],average:[f[S][4]/3,2*f[S][4]/3],bad:[2*f[S][4]/3,f[S][4]]},children:"Post-Cloning Damage: "+V[S][0]})]})]})},S)})})}},98723:function(T,r,n){"use strict";r.__esModule=!0,r.CloningPod=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.CloningPod=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.biomass,p=i.biomass_storage_capacity,u=i.sanguine_reagent,d=i.osseous_reagent,s=i.organs,l=i.currently_cloning;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Liquid Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:c,ranges:{good:[2*p/3,p],average:[p/3,2*p/3],bad:[0,p/3]},minValue:0,maxValue:p})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:u+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(){function h(N,v){return C("remove_reagent",{reagent:"sanguine_reagent",amount:v})}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function h(){return C("purge_reagent",{reagent:"sanguine_reagent"})}return h}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:d+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:d,step:1,unit:"units",onChange:function(){function h(N,v){return C("remove_reagent",{reagent:"osseous_reagent",amount:v})}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function h(){return C("purge_reagent",{reagent:"osseous_reagent"})}return h}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Organ Storage",children:[!l&&(0,e.createComponentVNode)(2,t.Box,{children:[!s&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No organs loaded."}),!!s&&s.map(function(h){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:h.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",onClick:function(){function N(){return C("eject_organ",{organ_ref:h.ref})}return N}()})})]},h)})]}),!!l&&(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Unable to access organ storage while cloning."]})})]})]})})}return b}()},18259:function(T,r,n){"use strict";r.__esModule=!0,r.CoinMint=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=r.CoinMint=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data,p=c.materials,u=c.moneyBag,d=c.moneyBagContent,s=c.moneyBagMaxContent,l=(u?210:138)+Math.ceil(p.length/4)*64;return(0,e.createComponentVNode)(2,m.Window,{width:210,height:l,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Coin Type",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",color:c.active&&"bad",tooltip:!u&&"Need a money bag",disabled:!u,onClick:function(){function h(){return i("activate")}return h}()}),children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",tooltip:"Eject selected material",onClick:function(){function h(){return i("ejectMat")}return h}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:p.map(function(h){return(0,e.createComponentVNode)(2,o.Button,{bold:!0,inline:!0,translucent:!0,m:.2,textAlign:"center",selected:h.id===c.chosenMaterial,tooltip:h.name,content:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",h.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:h.amount})]}),onClick:function(){function N(){return i("selectMaterial",{material:h.id})}return N}()},h.id)})})]})})}),!!u&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Money Bag",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){function h(){return i("ejectBag")}return h}()}),children:(0,e.createComponentVNode)(2,o.ProgressBar,{width:"100%",minValue:0,maxValue:s,value:d,children:[d," / ",s]})})})]})})})}return y}()},8444:function(T,r,n){"use strict";r.__esModule=!0,r.ColourMatrixTester=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ColourMatrixTester=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.colour_data,p=[[{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}]];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:190,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Matrix",children:p.map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",textColor:"label",children:u.map(function(d){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:1,children:[d.name,":\xA0",(0,e.createComponentVNode)(2,t.NumberInput,{width:4,value:c[d.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(){function s(l,h){return C("setvalue",{idx:d.idx+1,value:h})}return s}()})]},d.name)})},u)})})})})})}return b}()},63818:function(T,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(s){switch(s){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,i);case 3:return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,c)})});case 4:return(0,e.createComponentVNode)(2,u);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},b=r.CommunicationsComputer=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),m(f)]})})})}return d}(),y=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.authenticated,g=v.noauthbutton,V=v.esc_section,S=v.esc_callable,I=v.esc_recallable,L=v.esc_status,w=v.authhead,A=v.is_ai,x=v.lastCallLoc,E=!1,P;return f?f===1?P="Command":f===2?P="Captain":f===3?P="CentComm Officer":f===4?(P="CentComm Secure Connection",E=!0):P="ERROR: Report This Bug!":P="Not Logged In",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:P})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:f?"sign-out-alt":"id-card",selected:f,disabled:g,content:f?"Log Out ("+P+")":"Log In",onClick:function(){function j(){return N("auth")}return j}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:L}),!!S&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!w,onClick:function(){function j(){return N("callshuttle")}return j}()})}),!!I&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!w||A,onClick:function(){function j(){return N("cancelshuttle")}return j}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},B=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.is_admin;return f?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,C)},k=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.is_admin,g=v.gamma_armory_location,V=v.admin_levels,S=v.authenticated,I=v.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"CentComm Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,p,{levels:V,required_access:f,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!f,onClick:function(){function L(){return N("send_to_cc_announcement_page")}return L}()}),S===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!f,onClick:function(){function L(){return N("make_other_announcement")}return L}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Response Team",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!f,onClick:function(){function L(){return N("dispatch_ert")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:I,content:I?"ERT calling enabled":"ERT calling disabled",tooltip:I?"Command can request an ERT":"ERTs cannot be requested",disabled:!f,onClick:function(){function L(){return N("toggle_ert_allowed")}return L}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!f,onClick:function(){function L(){return N("send_nuke_codes")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gamma Armory",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:g?"Send Gamma Armory":"Recall Gamma Armory",disabled:!f,onClick:function(){function L(){return N("move_gamma_armory")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"coins",content:"View Economy",disabled:!f,onClick:function(){function L(){return N("view_econ")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!f,onClick:function(){function L(){return N("view_fax")}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,C)})]})},C=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.msg_cooldown,g=v.emagged,V=v.cc_cooldown,S=v.security_level_color,I=v.str_security_level,L=v.levels,w=v.authcapt,A=v.authhead,x=v.messages,E="Make Priority Announcement";f>0&&(E+=" ("+f+"s)");var P=g?"Message [UNKNOWN]":"Message CentComm",j="Request Authentication Codes";return V>0&&(P+=" ("+V+"s)",j+=" ("+V+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:S,children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,p,{levels:L,required_access:w})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:E,disabled:!w||f>0,onClick:function(){function M(){return N("announce")}return M}()})}),!!g&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:P,disabled:!w||V>0,onClick:function(){function M(){return N("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!w,onClick:function(){function M(){return N("RestoreBackup")}return M}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:P,disabled:!w||V>0,onClick:function(){function M(){return N("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:j,disabled:!w||V>0,onClick:function(){function M(){return N("nukerequest")}return M}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!A,onClick:function(){function M(){return N("status")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"View ("+x.length+")",disabled:!A,onClick:function(){function M(){return N("messagelist")}return M}()})})]})})})],4)},i=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.stat_display,g=v.authhead,V=v.current_message_title,S=f.presets.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.name===f.type,disabled:!g,onClick:function(){function w(){return N("setstat",{statdisp:L.name})}return w}()},L.name)}),I=f.alerts.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.alert===f.icon,disabled:!g,onClick:function(){function w(){return N("setstat",{statdisp:3,alert:L.alert})}return w}()},L.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function L(){return N("main")}return L}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:f.line_1,disabled:!g,onClick:function(){function L(){return N("setmsg1")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:f.line_2,disabled:!g,onClick:function(){function L(){return N("setmsg2")}return L}()})})]})})})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.authhead,g=v.current_message_title,V=v.current_message,S=v.messages,I=v.security_level,L;if(g)L=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:g,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!f,onClick:function(){function A(){return N("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:V})})});else{var w=S.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!f||g===A.title,onClick:function(){function x(){return N("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!f,onClick:function(){function x(){return N("delmessage",{msgid:A.id})}return x}()})]},A.id)});L=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function A(){return N("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w})})}return(0,e.createComponentVNode)(2,t.Box,{children:L})},p=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=s.levels,g=s.required_access,V=s.use_confirm,S=v.security_level;return V?f.map(function(I){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:I.icon,content:I.name,disabled:!g||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return N("newalertlevel",{level:I.id})}return L}()},I.name)}):f.map(function(I){return(0,e.createComponentVNode)(2,t.Button,{icon:I.icon,content:I.name,disabled:!g||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return N("newalertlevel",{level:I.id})}return L}()},I.name)})},u=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.is_admin,g=v.possible_cc_sounds;if(!f)return N("main");var V=(0,a.useLocalState)(l,"subtitle",""),S=V[0],I=V[1],L=(0,a.useLocalState)(l,"text",""),w=L[0],A=L[1],x=(0,a.useLocalState)(l,"classified",0),E=x[0],P=x[1],j=(0,a.useLocalState)(l,"beepsound","Beep"),M=j[0],O=j[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Central Command Report",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function D(){return N("main")}return D}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:S,onChange:function(){function D(F,W){return I(W)}return D}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:w,onChange:function(){function D(F,W){return A(W)}return D}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function D(){return N("make_cc_announcement",{subtitle:S,text:w,classified:E,beepsound:M})}return D}()}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"260px",height:"20px",options:g,selected:M,onSelected:function(){function D(F){return O(F)}return D}(),disabled:E})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"volume-up",mx:"5px",disabled:E,tooltip:"Test sound",onClick:function(){function D(){return N("test_sound",{sound:M})}return D}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:E,content:"Classified",fluid:!0,tooltip:E?"Sent to station communications consoles":"Publically announced",onClick:function(){function D(){return P(!E)}return D}()})})]})]})})}},20562:function(T,r,n){"use strict";r.__esModule=!0,r.CompostBin=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.CompostBin=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.biomass,p=i.compost,u=i.biomass_capacity,d=i.compost_capacity,s=i.potassium,l=i.potassium_capacity,h=i.potash,N=i.potash_capacity,v=(0,a.useSharedState)(B,"vendAmount",1),f=v[0],g=v[1];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:250,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{label:"Resources",children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:c,minValue:0,maxValue:u,ranges:{good:[u*.5,1/0],average:[u*.25,u*.5],bad:[-1/0,u*.25]},children:[c," / ",u," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:p,minValue:0,maxValue:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[p," / ",d," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potassium",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:s,minValue:0,maxValue:l,ranges:{good:[l*.5,1/0],average:[l*.25,l*.5],bad:[-1/0,l*.25]},children:[s," / ",l," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potash",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:h,minValue:0,maxValue:N,ranges:{good:[N*.5,1/0],average:[N*.25,N*.5],bad:[-1/0,N*.25]},children:[h," / ",N," Units"]})})]})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:f,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function V(S,I){return g(I)}return V}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,align:"center",content:"Make Soil",disabled:p<25*f,icon:"arrow-circle-down",onClick:function(){function V(){return C("create",{amount:f})}return V}()})})})]})})})}return b}()},21813:function(T,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(73379),b=n(98595);function y(N,v){N.prototype=Object.create(v.prototype),N.prototype.constructor=N,B(N,v)}function B(N,v){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,g){return f.__proto__=g,f},B(N,v)}var k={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},C=["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(Math.random()*2e4),"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"],i=r.Contractor=function(){function N(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I;S.unauthorized?I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,l,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):S.load_animation_completed?I=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,c)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:S.page===1?(0,e.createComponentVNode)(2,u,{height:"100%"}):(0,e.createComponentVNode)(2,s,{height:"100%"})})],4):I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,l,{height:"100%",allMessages:C,finishedTimeout:3e3,onFinished:function(){function x(){return V("complete_load_animation")}return x}()})});var L=(0,t.useLocalState)(f,"viewingPhoto",""),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,b.Window,{theme:"syndicate",width:500,height:600,children:[w&&(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,b.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:I})})]})}return N}(),c=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.tc_available,L=S.tc_paid_out,w=S.completed_contracts,A=S.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},v,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[I," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:I<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function x(){return V("claim")}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[L," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",inline:!0,children:w})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},v,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===1,onClick:function(){function L(){return V("page",{page:1})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===2,onClick:function(){function L(){return V("page",{page:2})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},u=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.contracts,L=S.contract_active,w=S.can_extract,A=!!L&&I.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(f,"viewingPhoto",""),P=E[0],j=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!w||x,icon:"parachute-box",content:["Call Extraction",x&&(0,e.createComponentVNode)(2,m.Countdown,{timeLeft:A.time_left,format:function(){function M(O,D){return" ("+D.substr(3)+")"}return M}()})],onClick:function(){function M(){return V("extract")}return M}()})},v,{children:I.slice().sort(function(M,O){return M.status===1?-1:O.status===1?1:M.status-O.status}).map(function(M){var O;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:M.status===1&&"good",children:M.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:M.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function D(){return j("target_photo_"+M.uid+".png")}return D}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!k[M.status]&&(0,e.createComponentVNode)(2,o.Box,{color:k[M.status][1],inline:!0,mt:M.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:k[M.status][0]}),M.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function D(){return V("abort")}return D}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[M.fluff_message,!!M.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",M.completed_time]}),!!M.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!M.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",M.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",d(M)]}),(O=M.difficulties)==null?void 0:O.map(function(D,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:D.name+" ("+D.reward+" TC)",onClick:function(){function W(){return V("activate",{uid:M.uid,difficulty:F+1})}return W}()},F)}),!!M.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[M.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(M.objective.rewards.tc||0)+" TC",",\xA0",(M.objective.rewards.credits||0)+" Credits",")"]})]})]})},M.uid)})})))},d=function(v){if(!(!v.objective||v.status>1)){var f=v.objective.locs.user_area_id,g=v.objective.locs.user_coords,V=v.objective.locs.target_area_id,S=v.objective.locs.target_coords,I=f===V;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:I?"dot-circle-o":"arrow-alt-circle-right-o",color:I?"green":"yellow",rotation:I?null:-(0,a.rad2deg)(Math.atan2(S[1]-g[1],S[0]-g[0])),lineHeight:I?null:"0.85",size:"1.5"})})}},s=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.rep,L=S.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},v,{children:L.map(function(w){return(0,e.createComponentVNode)(2,o.Section,{title:w.name,children:[w.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:I-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:w.stock===0?"bad":"good",ml:"0.5rem",children:[w.stock," in stock"]})]},w.uid)})})))},l=function(N){function v(g){var V;return V=N.call(this,g)||this,V.timer=null,V.state={currentIndex:0,currentDisplay:[]},V}y(v,N);var f=v.prototype;return f.tick=function(){function g(){var V=this.props,S=this.state;if(S.currentIndex<=V.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var I=S.currentDisplay;I.push(V.allMessages[S.currentIndex])}else clearTimeout(this.timer),setTimeout(V.onFinished,V.finishedTimeout)}return g}(),f.componentDidMount=function(){function g(){var V=this,S=this.props.linesPerSecond,I=S===void 0?2.5:S;this.timer=setInterval(function(){return V.tick()},1e3/I)}return g}(),f.componentWillUnmount=function(){function g(){clearTimeout(this.timer)}return g}(),f.render=function(){function g(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(V){return(0,e.createFragment)([V,(0,e.createVNode)(1,"br")],0,V)})})}return g}(),v}(e.Component),h=function(v,f){var g=(0,t.useLocalState)(f,"viewingPhoto",""),V=g[0],S=g[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:V}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function I(){return S("")}return I}()})]})}},54151:function(T,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ConveyorSwitch=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.slowFactor,p=i.oneWay,u=i.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!p,onClick:function(){function d(){return C("toggleOneWay")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function d(){return C("slowFactor",{value:c-5})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function d(){return C("slowFactor",{value:c-1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(){function d(s){return s+"x"}return d}(),onChange:function(){function d(s,l){return C("slowFactor",{value:l})}return d}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function d(){return C("slowFactor",{value:c+1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function d(){return C("slowFactor",{value:c+5})}return d}()})," "]})]})})]})})})})}return b}()},73169:function(T,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(89005),a=n(88510),t=n(25328),o=n(72253),m=n(36036),b=n(36352),y=n(76910),B=n(98595),k=n(96184),C=["color"];function i(h,N){if(h==null)return{};var v={};for(var f in h)if({}.hasOwnProperty.call(h,f)){if(N.includes(f))continue;v[f]=h[f]}return v}var c=function(N,v){return N.dead?"Deceased":parseInt(N.health,10)<=v?"Critical":parseInt(N.stat,10)===1?"Unconscious":"Living"},p=function(N,v){return N.dead?"red":parseInt(N.health,10)<=v?"orange":parseInt(N.stat,10)===1?"blue":"green"},u=r.CrewMonitor=function(){function h(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=(0,o.useLocalState)(v,"tabIndex",V.tabIndex),I=S[0],L=S[1],w=function(){function x(E){L(E),g("set_tab_index",{tab_index:E})}return x}(),A=function(){function x(E){switch(E){case 0:return(0,e.createComponentVNode)(2,d);case 1:return(0,e.createComponentVNode)(2,l);default:return"WE SHOULDN'T BE HERE!"}}return x}();return(0,e.createComponentVNode)(2,B.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Tabs,{children:[(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"table",selected:I===0,onClick:function(){function x(){return w(0)}return x}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"map-marked-alt",selected:I===1,onClick:function(){function x(){return w(1)}return x}(),children:"Map View"},"MapView")]})}),A(I)]})})})}return h}(),d=function(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=(0,a.sortBy)(function(M){return M.name})(V.crewmembers||[]),I=V.possible_levels,L=V.viewing_current_z_level,w=V.is_advanced,A=V.highlightedNames,x=(0,o.useLocalState)(v,"search",""),E=x[0],P=x[1],j=(0,t.createSearch)(E,function(M){return M.name+"|"+M.assignment+"|"+M.area});return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,m.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function M(O,D){return P(D)}return M}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:w?(0,e.createComponentVNode)(2,m.Dropdown,{mr:"5px",width:"50px",options:I,selected:L,onSelected:function(){function M(O){return g("switch_level",{new_level:O})}return M}()}):null})]}),(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,m.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:(0,e.createComponentVNode)(2,m.Button,{tooltip:"Clear highlights",icon:"square-xmark",onClick:function(){function M(){return g("clear_highlighted_names")}return M}()})}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Location"})]}),S.filter(j).map(function(M){var O=A.includes(M.name);return(0,e.createComponentVNode)(2,m.Table.Row,{bold:!!M.is_command,children:[(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,k.ButtonCheckbox,{checked:O,tooltip:"Mark on map",onClick:function(){function D(){return g(O?"remove_highlighted_name":"add_highlighted_name",{name:M.name})}return D}()})}),(0,e.createComponentVNode)(2,b.TableCell,{children:[M.name," (",M.assignment,")"]}),(0,e.createComponentVNode)(2,b.TableCell,{children:[(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:p(M,V.critThreshold),children:c(M,V.critThreshold)}),M.sensor_type>=2||V.ignoreSensors?(0,e.createComponentVNode)(2,m.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:M.oxy}),"|",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:M.tox}),"|",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.burn,children:M.fire}),"|",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.brute,children:M.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,b.TableCell,{children:M.sensor_type===3||V.ignoreSensors?V.isAI||V.isObserver?(0,e.createComponentVNode)(2,m.Button,{fluid:!0,icon:"location-arrow",content:M.area+" ("+M.x+", "+M.y+")",onClick:function(){function D(){return g("track",{track:M.ref})}return D}()}):M.area+" ("+M.x+", "+M.y+")":(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:"grey",children:"Not Available"})})]},M.name)})]})]})},s=function(N,v){var f=N.color,g=i(N,C);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m.NanoMap.Marker,Object.assign({},g,{children:(0,e.createVNode)(1,"span","highlighted-marker color-border-"+f)})))},l=function(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=V.highlightedNames;return(0,e.createComponentVNode)(2,m.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,m.NanoMap,{zoom:V.zoom,offsetX:V.offsetX,offsetY:V.offsetY,onZoom:function(){function I(L){return g("set_zoom",{zoom:L})}return I}(),onOffsetChange:function(){function I(L,w){return g("set_offset",{offset_x:w.offsetX,offset_y:w.offsetY})}return I}(),children:V.crewmembers.filter(function(I){return I.sensor_type===3||V.ignoreSensors}).map(function(I){var L=p(I,V.critThreshold),w=S.includes(I.name),A=function(){return V.isObserver?g("track",{track:I.ref}):null},x=function(){return g(w?"remove_highlighted_name":"add_highlighted_name",{name:I.name})},E=I.name+" ("+I.assignment+")";return w?(0,e.createComponentVNode)(2,s,{x:I.x,y:I.y,tooltip:E,color:L,onClick:A,onDblClick:x},I.ref):(0,e.createComponentVNode)(2,m.NanoMap.MarkerIcon,{x:I.x,y:I.y,icon:"circle",tooltip:E,color:L,onClick:A,onDblClick:x},I.ref)})})})}},63987:function(T,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=r.Cryo=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:520,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B)})})})}return C}(),B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.isOperating,l=d.hasOccupant,h=d.occupant,N=h===void 0?[]:h,v=d.cellTemperature,f=d.cellTemperatureStatus,g=d.isBeakerLoaded,V=d.cooldownProgress,S=d.auto_eject_healthy,I=d.auto_eject_dead;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",onClick:function(){function L(){return u("ejectOccupant")}return L}(),disabled:!l,children:"Eject"}),children:l?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:N.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:N.health,max:N.maxHealth,value:N.health/N.maxHealth,color:N.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(N.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[N.stat][0],children:b[N.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(N.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),m.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:N[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(N[L.type])})})},L.id)})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Cell",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function L(){return u("ejectBeaker")}return L}(),disabled:!g,children:"Eject Beaker"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",onClick:function(){function L(){return u(s?"switchOff":"switchOn")}return L}(),selected:s,children:s?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:f,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dosage interval",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!g&&"average",value:V,minValue:0,maxValue:100})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:S?"toggle-on":"toggle-off",selected:S,onClick:function(){function L(){return u(S?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:S?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"toggle-on":"toggle-off",selected:I,onClick:function(){function L(){return u(I?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:I?"On":"Off"})})]})})})],4)},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.isBeakerLoaded,l=d.beakerLabel,h=d.beakerVolume;return s?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!l&&"average",children:[l||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!h&&"bad",ml:1,children:h?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h,format:function(){function N(v){return Math.round(v)+" units remaining"}return N}()}):"Beaker is empty"})],4):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"bad",children:"No beaker loaded"})}},86099:function(T,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(25328),b=r.CryopodConsole=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.account_name,d=p.allow_items;return(0,e.createComponentVNode)(2,o.Window,{title:"Cryopod Console",width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(u||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!d&&(0,e.createComponentVNode)(2,B)]})})}return k}(),y=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:u.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(d,s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:d.rank},s)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.frozen_items,s=function(h){var N=h.toString();return N.startsWith("the ")&&(N=N.slice(4,N.length)),(0,m.toTitleCase)(N)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:d.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s(l.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function h(){return p("one_item",{item:l.uid})}return h}()})},l)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function l(){return p("all_items")}return l}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},12692:function(T,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],B=[5,10,20,30,50],k=r.DNAModifier=function(){function f(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.irradiating,A=L.dnaBlockSize,x=L.occupant;V.dnaBlockSize=A,V.isDNAInvalid=!x.isViableSubject||!x.uniqueIdentity||!x.structuralEnzymes;var E;return w&&(E=(0,e.createComponentVNode)(2,N,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,m.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})})]})}return f}(),C=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.locked,A=L.hasOccupant,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Engaged":"Disengaged",onClick:function(){function E(){return I("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||w,icon:"user-slash",content:"Eject",onClick:function(){function E(){return I("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:x.minHealth,max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[x.stat][0],children:b[x.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),V.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:x.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:L.occupant.uniqueEnzymes?L.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},i=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedMenuKey,A=L.hasOccupant,x=L.occupant;if(A){if(V.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return w==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,u)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,u)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,d):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,h)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(P,j){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:P[2],selected:w===P[0],onClick:function(){function M(){return I("selectMenuKey",{key:P[0]})}return M}(),children:P[1]},j)})}),E]})},c=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedUIBlock,A=L.selectedUISubBlock,x=L.selectedUITarget,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,v,{dnaString:E.uniqueIdentity,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:x,format:function(){function P(j){return j.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(j,M){return I("changeUITarget",{value:M})}return P}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function P(){return I("pulseUIRadiation")}return P}()})]})},p=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedSEBlock,A=L.selectedSESubBlock,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,v,{dnaString:x.structuralEnzymes,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return I("pulseSERadiation")}return E}()})]})},u=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:w,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationIntensity",{value:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationDuration",{value:P})}return x}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function x(){return I("pulseRadiation")}return x}()})]})},d=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.buffers,A=w.map(function(x,E){return(0,e.createComponentVNode)(2,s,{id:E+1,name:"Buffer "+(E+1),buffer:x},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,l)})]})},s=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=g.id,A=g.name,x=g.buffer,E=L.isInjectorReady,P=A+(x.data?" - "+x.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:P,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!x.data,icon:"trash",content:"Clear",onClick:function(){function j(){return I("bufferOption",{option:"clear",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function j(){return I("bufferOption",{option:"changeLabel",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data||!L.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function j(){return I("bufferOption",{option:"saveDisk",id:w})}return j}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"saveUI",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"saveUIAndUE",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"saveSE",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"loadDisk",id:w})}return j}()})]}),!!x.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:x.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[x.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!x.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"createInjector",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"createInjector",id:w,block:1})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"transfer",id:w})}return j}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},l=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!w||!A.data,icon:"trash",content:"Wipe",onClick:function(){function x(){return I("wipeDisk")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function x(){return I("ejectDisk")}return x}()})],4),children:w?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},h=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.isBeakerLoaded,A=L.beakerVolume,x=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function E(){return I("ejectBeaker")}return E}()}),children:w?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[B.map(function(E,P){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function j(){return I("injectRejuvenators",{amount:E})}return j}()},P)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return I("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:x||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},N=function(g,V){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),g.duration,(0,e.createTextVNode)(" second"),g.duration===1?"":"s"],0)})]})},v=function(g,V){for(var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=g.dnaString,A=g.selectedBlock,x=g.selectedSubblock,E=g.blockSize,P=g.action,j=w.split(""),M=0,O=[],D=function(){for(var U=F/E+1,K=[],G=function(){var Z=$+1;K.push((0,e.createComponentVNode)(2,t.Button,{selected:A===U&&x===Z,content:j[F+$],mb:"0",onClick:function(){function ie(){return I(P,{block:U,subblock:Z})}return ie}()}))},$=0;$l.spawnpoints?"red":"green",children:[l.total," total, versus ",l.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{width:10.5,textAlign:"center",icon:"ambulance",content:"Send ERT",onClick:function(){function g(){return s("dispatch_ert",{silent:v})}return g}()})})]})})})},C=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:h&&h.length?h.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:N.sender_real_name,onClick:function(){function v(){return s("view_player_panel",{uid:N.sender_uid})}return v}(),tooltip:"View player panel"}),children:N.message},(0,m.decodeHtmlEntities)(N.time))}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"broadcast-tower",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No ERT requests."]})})})})},i=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=(0,a.useLocalState)(u,"text",""),N=h[0],v=h[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:19,fluid:!0,multiline:1,value:N,onChange:function(){function f(g,V){return v(V)}return f}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function f(){return s("deny_ert",{reason:N})}return f}()})]})})}},90217:function(T,r,n){"use strict";r.__esModule=!0,r.EconomyManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=r.EconomyManager=function(){function B(k,C){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:325,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return B}(),y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.next_payroll_time;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Global",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"global"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Members",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department_members"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Single Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"crew_member"})}return d}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",u," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function d(){return c("delay_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function d(){return c("set_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function d(){return c("accelerate_payroll")}return d}()})]}),(0,e.createComponentVNode)(2,t.NoticeBox,{children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons!"]})],4)}},82565:function(T,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.Electropack=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data,p=c.power,u=c.code,d=c.frequency,s=c.minFrequency,l=c.maxFrequency;return(0,e.createComponentVNode)(2,m.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,onClick:function(){function h(){return i("power")}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return i("reset",{reset:"freq"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:s/10,maxValue:l/10,value:d/10,format:function(){function h(N){return(0,a.toFixed)(N,1)}return h}(),width:"80px",onChange:function(){function h(N,v){return i("freq",{freq:v})}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return i("reset",{reset:"code"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(){function h(N,v){return i("code",{code:v})}return h}()})})]})})})})}return y}()},11243:function(T,r,n){"use strict";r.__esModule=!0,r.Emojipedia=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=r.Emojipedia=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.data,p=c.emoji_list,u=(0,t.useLocalState)(C,"searchText",""),d=u[0],s=u[1],l=p.filter(function(h){return h.name.toLowerCase().includes(d.toLowerCase())});return(0,e.createComponentVNode)(2,m.Window,{width:325,height:400,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Emojipedia v1.0.1",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by name",value:d,onInput:function(){function h(N,v){return s(v)}return h}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Click on an emoji to copy its tag!",tooltipPosition:"bottom",icon:"circle-question"})],4),children:l.map(function(h){return(0,e.createComponentVNode)(2,o.Button,{m:1,color:"transparent",className:(0,a.classes)(["emoji16x16","emoji-"+h.name]),style:{transform:"scale(1.5)"},tooltip:h.name,onClick:function(){function N(){y(h.name)}return N}()},h.name)})})})})}return B}(),y=function(k){var C=document.createElement("input"),i=":"+k+":";C.value=i,document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C)}},69784:function(T,r,n){"use strict";r.__esModule=!0,r.EmotePanelContent=r.EmotePanel=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),m=n(25328),b=r.EmotePanel=function(){function B(k,C){return(0,e.createComponentVNode)(2,t.Window,{width:500,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,y)})})})}return B}(),y=r.EmotePanelContent=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.emotes,d=(0,a.useLocalState)(C,"searchText",""),s=d[0],l=d[1],h=(0,a.useLocalState)(C,"filterVisible",""),N=h[0],v=h[1],f=(0,a.useLocalState)(C,"filterAudible",""),g=f[0],V=f[1],S=(0,a.useLocalState)(C,"filterSound",""),I=S[0],L=S[1],w=(0,a.useLocalState)(C,"filterHands",""),A=w[0],x=w[1],E=(0,a.useLocalState)(C,"filterTargettable",""),P=E[0],j=E[1],M=(0,a.useLocalState)(C,"useTarget",""),O=M[0],D=M[1],F=(0,e.createComponentVNode)(2,o.Input,{placeholder:"\u0418\u0441\u043A\u0430\u0442\u044C \u044D\u043C\u043E\u0446\u0438\u044E...",fluid:!0,onInput:function(){function W(U,K){return l(K)}return W}()});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Button,{icon:"eye",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043C\u044B\u0439",selected:N,onClick:function(){function W(){return v(!N)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",align:"center",tooltip:"\u0421\u043B\u044B\u0448\u0438\u043C\u044B\u0439",selected:g,onClick:function(){function W(){return V(!g)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"volume-up",align:"center",tooltip:"\u0417\u0432\u0443\u043A",selected:I,onClick:function(){function W(){return L(!I)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"hand-paper",align:"center",tooltip:"\u0420\u0443\u043A\u0438",selected:A,onClick:function(){function W(){return x(!A)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",height:"100%",align:"center",tooltip:"\u0426\u0435\u043B\u044C",selected:P,onClick:function(){function W(){return j(!P)}return W}()})]}),children:F})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:s.length>0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+s+'"':"\u0412\u0441\u0435 \u044D\u043C\u043E\u0446\u0438\u0438",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",selected:O,onClick:function(){function W(){return D(!O)}return W}(),children:"\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u0446\u0435\u043B\u044C"}),children:(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:u.filter(function(W){return W.key&&(s.length>0?W.key.toLowerCase().includes(s.toLowerCase())||W.name.toLowerCase().includes(s.toLowerCase()):!0)&&(N?W.visible:!0)&&(g?W.audible:!0)&&(I?W.sound:!0)&&(A?W.hands:!0)&&(P?W.targettable:!0)}).map(function(W){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function U(){return c("play_emote",{emote_key:W.key,useTarget:O})}return U}(),children:[W.visible?(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}):"",W.audible?(0,e.createComponentVNode)(2,o.Icon,{name:"comment"}):"",W.sound?(0,e.createComponentVNode)(2,o.Icon,{name:"volume-up"}):"",W.hands?(0,e.createComponentVNode)(2,o.Icon,{name:"hand-paper"}):"",W.targettable?(0,e.createComponentVNode)(2,o.Icon,{name:"crosshairs"}):"",W.name]},W.name)})})})})})],4)}return B}()},36730:function(T,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(64795),y=n(88510),B=r.EvolutionMenu=function(){function i(c,p){return(0,e.createComponentVNode)(2,m.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C)]})})})}return i}(),k=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.evo_points,h=s.can_respec;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!h,content:"Readapt",icon:"sync",onClick:function(){function N(){return d("readapt")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})})},C=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.evo_points,h=s.ability_tabs,N=s.purchased_abilities,v=s.view_mode,f=(0,t.useLocalState)(p,"selectedTab",h[0]),g=f[0],V=f[1],S=(0,t.useLocalState)(p,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(p,"ability_tabs",h[0].abilities),A=w[0],x=w[1],E=function(O,D){if(D===void 0&&(D=""),!O||O.length===0)return[];var F=(0,a.createSearch)(D,function(W){return W.name+"|"+W.description});return(0,b.flow)([(0,y.filter)(function(W){return W==null?void 0:W.name}),(0,y.filter)(F),(0,y.sortBy)(function(W){return W==null?void 0:W.name})])(O)},P=function(O){if(L(O),O==="")return x(g.abilities);x(E(h.map(function(D){return D.abilities}).flat(),O))},j=function(O){V(O),x(O.abilities),L("")};return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function M(O,D){P(D)}return M}(),value:I}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"square-o":"check-square-o",selected:!v,content:"Compact",onClick:function(){function M(){return d("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"check-square-o":"square-o",selected:v,content:"Expanded",onClick:function(){function M(){return d("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:h.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===""&&g===M,onClick:function(){function O(){j(M)}return O}(),children:M.category},M)})}),A.map(function(M,O){return(0,e.createComponentVNode)(2,o.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{ml:.5,color:"#dedede",children:M.name}),N.includes(M.power_path)&&(0,e.createComponentVNode)(2,o.Stack.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,o.Box,{as:"span",bold:!0,color:"#1b945c",children:M.cost})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,o.Button,{mr:.5,disabled:M.cost>l||N.includes(M.power_path),content:"Evolve",onClick:function(){function D(){return d("purchase",{power_path:M.power_path})}return D}()})})]}),!!v&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},O)})]})})}},17370:function(T,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(89005),a=n(35840),t=n(25328),o=n(72253),m=n(36036),b=n(73379),y=n(98595),B=["id","amount","lineDisplay","onClick"];function k(f,g){if(f==null)return{};var V={};for(var S in f)if({}.hasOwnProperty.call(f,S)){if(g.includes(S))continue;V[S]=f[S]}return V}var C=2e3,i={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function f(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.linked;return A?(0,e.createComponentVNode)(2,y.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,y.Window.Content,{className:"Exofab",children:[(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,u)}),w&&(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,d)})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,s)})]})})]})]})}):(0,e.createComponentVNode)(2,N)}return f}(),p=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.materials,A=L.capacity,x=Object.values(w).reduce(function(E,P){return E+P},0);return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,m.Box,{color:"label",mt:"0.25rem",children:[(x/A*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(E){return(0,e.createComponentVNode)(2,l,{mt:-2,id:E,bold:E==="metal"||E==="glass",onClick:function(){function P(){return I("withdraw",{id:E})}return P}()},E)})})},u=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.curCategory,A=L.categories,x=L.designs,E=L.syncing,P=(0,o.useLocalState)(V,"searchText",""),j=P[0],M=P[1],O=(0,t.createSearch)(j,function(K){return K.name}),D=x.filter(O),F=(0,o.useLocalState)(V,"levelsModal",!1),W=F[0],U=F[1];return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,m.Dropdown,{className:"Exofab__dropdown",selected:w,options:A,onSelected:function(){function K(G){return I("category",{cat:G})}return K}()}),buttons:(0,e.createComponentVNode)(2,m.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,m.Button,{icon:"plus",content:"Queue all",onClick:function(){function K(){return I("queueall")}return K}()}),(0,e.createComponentVNode)(2,m.Button,{icon:"info",content:"Show current tech levels",onClick:function(){function K(){return U(!0)}return K}()}),(0,e.createComponentVNode)(2,m.Button,{icon:"unlink",color:"red",tooltip:"Disconnect from R&D network",onClick:function(){function K(){return I("unlink")}return K}()})]}),children:[(0,e.createComponentVNode)(2,m.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function K(G,$){return M($)}return K}()}),D.map(function(K){return(0,e.createComponentVNode)(2,h,{design:K},K.id)}),D.length===0&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"No designs found."})]})},d=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.buildStart,x=L.buildEnd,E=L.worldTime;return(0,e.createComponentVNode)(2,m.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,m.ProgressBar.Countdown,{start:A,current:E,end:x,children:(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:["Building ",w,"\xA0(",(0,e.createComponentVNode)(2,b.Countdown,{current:E,timeLeft:x-E,format:function(){function P(j,M){return M.substr(3)}return P}()}),")"]})]})})})},s=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.queue,A=L.processingQueue,x=Object.entries(L.queueDeficit).filter(function(P){return P[1]<0}),E=w.reduce(function(P,j){return P+j.time},0);return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,m.Box,{children:[(0,e.createComponentVNode)(2,m.Button,{selected:A,icon:A?"toggle-on":"toggle-off",content:"Process",onClick:function(){function P(){return I("process")}return P}()}),(0,e.createComponentVNode)(2,m.Button,{disabled:w.length===0,icon:"eraser",content:"Clear",onClick:function(){function P(){return I("unqueueall")}return P}()})]}),children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:w.length===0?(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:w.map(function(P,j){return(0,e.createComponentVNode)(2,m.Box,{color:P.notEnough&&"bad",children:[j+1,". ",P.name,j>0&&(0,e.createComponentVNode)(2,m.Button,{icon:"arrow-up",onClick:function(){function M(){return I("queueswap",{from:j+1,to:j})}return M}()}),j0&&(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,m.Divider),"Processing time:",(0,e.createComponentVNode)(2,m.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,m.Box,{inline:!0,bold:!0,children:new Date(E/10*1e3).toISOString().substr(14,5)})]}),Object.keys(x).length>0&&(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,m.Divider),"Lacking materials to complete:",x.map(function(P){return(0,e.createComponentVNode)(2,m.Box,{children:(0,e.createComponentVNode)(2,l,{id:P[0],amount:-P[1],lineDisplay:!0})},P[0])})]})],0)})})},l=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=g.id,A=g.amount,x=g.lineDisplay,E=g.onClick,P=k(g,B),j=L.materials[w]||0,M=A||j;if(!(M<=0&&!(w==="metal"||w==="glass"))){var O=A&&A>j;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",x&&"Exofab__material--line"])},P,{children:x?(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Stack.Item,{className:(0,a.classes)(["materials32x32",w])}),(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__material--amount",color:O&&"bad",ml:0,mr:1,children:M.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,m.Button,{width:"85%",color:"transparent",onClick:E,children:(0,e.createComponentVNode)(2,m.Box,{mt:1,className:(0,a.classes)(["materials32x32",w])})})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__material--name",children:w}),(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__material--amount",children:[M.toLocaleString("en-US")," cm\xB3 (",Math.round(M/C*10)/10," ","sheets)"]})]})],4)})))}},h=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=g.design;return(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,m.Button,{disabled:w.notEnough||L.building,icon:"cog",content:w.name,onClick:function(){function A(){return I("build",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,m.Button,{icon:"plus-circle",onClick:function(){function A(){return I("queue",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__design--cost",children:Object.entries(w.cost).map(function(A){return(0,e.createComponentVNode)(2,m.Box,{children:(0,e.createComponentVNode)(2,l,{id:A[0],amount:A[1],lineDisplay:!0})},A[0])})}),(0,e.createComponentVNode)(2,m.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:[(0,e.createComponentVNode)(2,m.Icon,{name:"clock"}),w.time>0?(0,e.createFragment)([w.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})},N=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.controllers;return(0,e.createComponentVNode)(2,y.Window,{children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,m.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Link"})]}),w.map(function(A){return(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:A.addr}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:A.net_id}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:(0,e.createComponentVNode)(2,m.Button,{content:"Link",icon:"link",onClick:function(){function x(){return I("linktonetworkcontroller",{target_controller:A.addr})}return x}()})})]},A.addr)})]})})})})},v=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.tech_levels,A=(0,o.useLocalState)(V,"levelsModal",!1),x=A[0],E=A[1];return x?(0,e.createComponentVNode)(2,m.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:(0,e.createComponentVNode)(2,m.Section,{title:"Current tech levels",buttons:(0,e.createComponentVNode)(2,m.Button,{content:"Close",onClick:function(){function P(){E(!1)}return P}()}),children:(0,e.createComponentVNode)(2,m.LabeledList,{children:w.map(function(P){var j=P.name,M=P.level;return(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:j,children:M},j)})})})}):null}},59128:function(T,r,n){"use strict";r.__esModule=!0,r.ExperimentConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),b=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),y=r.ExperimentConsole=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.open,d=p.feedback,s=p.occupant,l=p.occupant_name,h=p.occupant_status,N=function(){function f(){if(!s)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var g=function(){function S(){return m.get(h)}return S}(),V=g();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V.color,children:V.text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Experiments",children:[0,1,2].map(function(S){return(0,e.createComponentVNode)(2,t.Button,{icon:b.get(S).icon,content:b.get(S).label,onClick:function(){function I(){return c("experiment",{experiment_type:S})}return I}()},S)})})]})}return f}(),v=N();return(0,e.createComponentVNode)(2,o.Window,{theme:"abductor",width:350,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){function f(){return c("door")}return f}()}),children:v})]})})}return B}()},97086:function(T,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=0,b=1013,y=function(C){var i="good",c=80,p=95,u=110,d=120;return Cu?i="average":C>d&&(i="bad"),i},B=r.ExternalAirlockController=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.chamber_pressure,s=u.exterior_status,l=u.interior_status,h=u.processing;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:205,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:y(d),value:d,minValue:m,maxValue:b,children:[d," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!h,onClick:function(){function N(){return p("abort")}return N}()}),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:h,onClick:function(){function N(){return p("cycle_ext")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:h,onClick:function(){function N(){return p("cycle_int")}return N}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:l==="open"?"red":h?"yellow":null,onClick:function(){function N(){return p("force_ext")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:l==="open"?"red":h?"yellow":null,onClick:function(){function N(){return p("force_int")}return N}()})]})]})]})})}return k}()},96142:function(T,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.FaxMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:295,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.scan_name?"eject":"id-card",selected:i.scan_name,content:i.scan_name?i.scan_name:"-----",tooltip:i.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return C("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,disabled:i.nologin,content:i.realauth?"Log Out":"Log In",onClick:function(){function c(){return C("auth")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:i.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i.paper?"eject":"paperclip",disabled:!i.authenticated&&!i.paper,content:i.paper?i.paper:"-----",onClick:function(){function c(){return C("paper")}return c}()}),!!i.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return C("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:i.destination?i.destination:"-----",disabled:!i.authenticated,onClick:function(){function c(){return C("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:i.sendError?i.sendError:"Send",disabled:!i.paper||!i.destination||!i.authenticated||i.sendError,onClick:function(){function c(){return C("send")}return c}()})})]})})]})})}return b}()},74123:function(T,r,n){"use strict";r.__esModule=!0,r.FilingCabinet=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.FilingCabinet=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=k.config,p=i.contents,u=c.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Contents",children:[!p&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"folder-open",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"The ",u," is empty."]})}),!!p&&p.slice().map(function(d){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:d.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){function s(){return C("retrieve",{index:d.index})}return s}()})})]},d)})]})})})})}return b}()},83767:function(T,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=B.image,u=B.isSelected,d=B.onSelect;return(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+p,style:{"border-style":u&&"solid"||"none","border-width":"2px","border-color":"orange",padding:u&&"2px"||"4px"},onClick:d})},b=r.FloorPainter=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.availableStyles,u=c.selectedStyle,d=c.selectedDir,s=c.directionsPreview,l=c.allStylesPreview;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function h(){return i("cycle_style",{offset:-1})}return h}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:p,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function h(N){return i("select_style",{style:N})}return h}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function h(){return i("cycle_style",{offset:1})}return h}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:p.map(function(h){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,m,{image:l[h],isSelected:u===h,onSelect:function(){function N(){return i("select_style",{style:h})}return N}()})},"{style}")})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:["north","","south"].map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[h+"west",h,h+"east"].map(function(N){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:N===""?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,m,{image:s[N],isSelected:N===d,onSelect:function(){function v(){return i("select_direction",{direction:N})}return v}()})},N)})},h)})})})})]})})})}return y}()},53424:function(T,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=function(u){return u?"("+u.join(", ")+")":"ERROR"},y=function(u,d){if(!(!u||!d)){if(u[2]!==d[2])return null;var s=Math.atan2(d[1]-u[1],d[0]-u[0]),l=Math.sqrt(Math.pow(d[1]-u[1],2)+Math.pow(d[0]-u[0],2));return{angle:(0,a.rad2deg)(s),distance:l}}},B=r.GPS=function(){function p(u,d){var s=(0,t.useBackend)(d),l=s.data,h=l.emped,N=l.active,v=l.area,f=l.position,g=l.saved;return(0,e.createComponentVNode)(2,m.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:h?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,k,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),N?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{area:v,position:f})}),g&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{title:"Saved Position",position:g})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,c,{height:"100%"})})],0):(0,e.createComponentVNode)(2,k)],0)})})})}return p}(),k=function(u,d){var s=u.emp;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:s?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),s?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},C=function(u,d){var s=(0,t.useBackend)(d),l=s.act,h=s.data,N=h.active,v=h.tag,f=h.same_z,g=(0,t.useLocalState)(d,"newTag",v),V=g[0],S=g[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:N,icon:N?"toggle-on":"toggle-off",content:N?"On":"Off",onClick:function(){function I(){return l("toggle")}return I}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:v,onEnter:function(){function I(){return l("tag",{newtag:V})}return I}(),onInput:function(){function I(L,w){return S(w)}return I}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:v===V,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function I(){return l("tag",{newtag:V})}return I}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!f,icon:f?"compress":"expand",content:f?"Local Sector":"Global",onClick:function(){function I(){return l("same_z")}return I}()})})]})})},i=function(u,d){var s=u.title,l=u.area,h=u.position;return(0,e.createComponentVNode)(2,o.Section,{title:s||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[l&&(0,e.createFragment)([l,(0,e.createVNode)(1,"br")],0),b(h)]})})},c=function(u,d){var s=(0,t.useBackend)(d),l=s.data,h=l.position,N=l.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},u,{children:(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(v){return Object.assign({},v,y(h,v.position))}).map(function(v,f){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:f%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:v.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:v.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:v.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(v.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:v.distance>0?"arrow-right":"circle",rotation:-v.angle}),"\xA0",Math.floor(v.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:b(v.position)})]},f)})})})))}},89124:function(T,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(3939),m=n(98595),b=r.GeneModder=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.has_seed;return(0,e.createComponentVNode)(2,m.Window,{width:950,height:650,children:[(0,e.createVNode)(1,"div","GeneModder__left",(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,u,{scrollable:!0})}),2),(0,e.createVNode)(1,"div","GeneModder__right",(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,o.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),v===0?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})}),2)]})}return d}(),y=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})},B=function(s,l){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},k=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.has_seed,g=v.seed,V=v.has_disk,S=v.disk,I,L;return f?I=(0,e.createComponentVNode)(2,t.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+g.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:g.name,onClick:function(){function w(){return N("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return N("variant_name")}return w}()})]}):I=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:"None",onClick:function(){function w(){return N("eject_seed")}return w}()})}),V?L=S.name:L="None",(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plant Sample",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:L,tooltip:"Select Empty Disk",onClick:function(){function w(){return N("select_empty_disk")}return w}()})})})]})})},C=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.disk,g=v.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:[g.map(function(V){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:V.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(f!=null&&f.can_extract),icon:"save",onClick:function(){function S(){return N("extract",{id:V.id})}return S}()})})]},V)})," ",(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract All",disabled:!(f!=null&&f.can_extract),icon:"save",onClick:function(){function V(){return N("bulk_extract_core")}return V}()})})})]},"Core Genes")},i=function(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.reagent_genes,f=N.has_reagent;return(0,e.createComponentVNode)(2,p,{title:"Reagent Genes",gene_set:v,do_we_show:f})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.trait_genes,f=N.has_trait;return(0,e.createComponentVNode)(2,p,{title:"Trait Genes",gene_set:v,do_we_show:f})},p=function(s,l){var h=s.title,N=s.gene_set,v=s.do_we_show,f=(0,a.useBackend)(l),g=f.act,V=f.data,S=V.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:h,open:!0,children:v?N.map(function(I){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:I.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(S!=null&&S.can_extract),icon:"save",onClick:function(){function L(){return g("extract",{id:I.id})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return g("remove",{id:I.id})}return L}()})})]},I)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},h)},u=function(s,l){var h=s.title,N=s.gene_set,v=s.do_we_show,f=(0,a.useBackend)(l),g=f.act,V=f.data,S=V.has_seed,I=V.empty_disks,L=V.stat_disks,w=V.trait_disks,A=V.reagent_disks;return(0,e.createComponentVNode)(2,t.Section,{title:"Disks",children:[(0,e.createVNode)(1,"br"),"Empty Disks: ",I,(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){function x(){return g("eject_empty_disk")}return x}()}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stats",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[L.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[x.stat==="All"?(0,e.createComponentVNode)(2,t.Button,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(x!=null&&x.ready)||!S,icon:"arrow-circle-down",onClick:function(){function E(){return g("bulk_replace_core",{index:x.index})}return E}()}):(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!x||!S,content:"Replace",onClick:function(){function E(){return g("replace",{index:x.index,stat:x.stat})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return g("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Traits",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[w.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){function E(){return g("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return g("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Reagents",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[A.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){function E(){return g("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return g("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})})]})]})}},73053:function(T,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(89005),a=n(36036),t=n(98595),o=n(41874),m=r.GenericCrewManifest=function(){function b(y,B){return(0,e.createComponentVNode)(2,t.Window,{theme:"nologo",width:588,height:510,children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return b}()},42914:function(T,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.GhostHudPanel=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.data,c=i.security,p=i.medical,u=i.diagnostic,d=i.radioactivity,s=i.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,b,{label:"Medical",type:"medical",is_active:p}),(0,e.createComponentVNode)(2,b,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,b,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Antag HUD",is_active:s,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=B.label,p=B.type,u=p===void 0?null:p,d=B.is_active,s=B.act_on,l=s===void 0?"hud_on":s,h=B.act_off,N=h===void 0?"hud_off":h;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){function v(){return i(d?N:l,{hud_type:u})}return v}()})})]})}},25825:function(T,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.GlandDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.glands,p=c===void 0?[]:c;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:p.map(function(u){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:u.color,content:u.amount||"0",disabled:!u.amount,onClick:function(){function d(){return C("dispense",{gland_id:u.id})}return d}()},u.id)})})})})}return b}()},10270:function(T,r,n){"use strict";r.__esModule=!0,r.GravityGen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.GravityGen=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.charging_state,p=i.charge_count,u=i.breaker,d=i.ext_power,s=function(){function h(N){return N>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",N===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}return h}(),l=function(){function h(N){if(N>0)return(0,e.createComponentVNode)(2,t.NoticeBox,{danger:!0,p:1.5,children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[l(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u?"power-off":"times",content:u?"Online":"Offline",color:u?"green":"red",px:1.5,onClick:function(){function h(){return C("breaker")}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:d?"good":"bad",children:s(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}return b}()},48657:function(T,r,n){"use strict";r.__esModule=!0,r.GuestPass=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(49148),b=r.GuestPass=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:690,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){function p(){return i("mode",{mode:0})}return p}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function p(){return i("mode",{mode:1})}return p}(),children:["Records (",c.issue_log.length,")"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function p(){return i("scan")}return p}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!c.showlogs&&(0,e.createComponentVNode)(2,t.Section,{title:"Issue Guest Pass",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Issue To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){function p(){return i("giv_name")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reason",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){function p(){return i("reason")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){function p(){return i("duration")}return p}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function p(){return i("issue")}return p}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function p(u){return i("access",{access:u})}return p}(),grantAll:function(){function p(){return i("grant_all")}return p}(),denyAll:function(){function p(){return i("clear_all")}return p}(),grantDep:function(){function p(u){return i("grant_region",{region:u})}return p}(),denyDep:function(){function p(u){return i("deny_region",{region:u})}return p}()})}):(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card",size:5,color:"gray",mb:5}),(0,e.createVNode)(1,"br"),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){function p(){return i("print")}return p}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(p,u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:p},u)})})||(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No logs"]})})})})]})})})}return y}()},67834:function(T,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=[1,5,10,20,30,50],b=null,y=r.HandheldChemDispenser=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:390,height:430,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return C}(),B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.amount,l=d.energy,h=d.maxEnergy,N=d.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[l," / ",h," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:m.map(function(v,f){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:s===v,content:v,onClick:function(){function g(){return u("amount",{amount:v})}return g}()})},f)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:N==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function v(){return u("mode",{mode:"dispense"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:N==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function v(){return u("mode",{mode:"remove"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:N==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function v(){return u("mode",{mode:"isolate"})}return v}()})]})})]})})})},k=function(i,c){for(var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.chemicals,l=s===void 0?[]:s,h=d.current_reagent,N=[],v=0;v<(l.length+1)%3;v++)N.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d.glass?"Drink Selector":"Chemical Selector",children:[l.map(function(f,g){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:h===f.id,content:f.title,style:{"margin-left":"2px"},onClick:function(){function V(){return u("dispense",{reagent:f.id})}return V}()},g)}),N.map(function(f,g){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},g)})]})})}},46098:function(T,r,n){"use strict";r.__esModule=!0,r.HealthSensor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.HealthSensor=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.act,p=i.data,u=p.on,d=p.user_health,s=p.minHealth,l=p.maxHealth,h=p.alarm_health;return(0,e.createComponentVNode)(2,m.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanning",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){function N(){return c("scan_toggle")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health activation",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:s,maxValue:l,value:h,format:function(){function N(v){return(0,a.toFixed)(v,1)}return N}(),width:"80px",onDrag:function(){function N(v,f){return c("alarm_health",{alarm_health:f})}return N}()})}),d!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:y(d),bold:d>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:d})})})]})})})})}return B}(),y=function(k){return k>50?"green":k>0?"orange":"red"}},36771:function(T,r,n){"use strict";r.__esModule=!0,r.Holodeck=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Holodeck=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=(0,a.useLocalState)(k,"currentDeck",""),u=p[0],d=p[1],s=(0,a.useLocalState)(k,"showReload",!1),l=s[0],h=s[1],N=c.decks,v=c.ai_override,f=c.emagged,g=function(){function V(S){i("select_deck",{deck:S}),d(S),h(!0),setTimeout(function(){h(!1)},3e3)}return V}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[l&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Holodeck Control System",children:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",u]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[N.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:V,selected:V===u,onClick:function(){function S(){return g(V)}return S}()},V)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!v&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:f?"Turn On":"Turn Off",color:f?"good":"bad",onClick:function(){function V(){return i("ai_override")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:f?"bad":"good",children:[f?"Off":"On",!!f&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function V(){return i("wildlifecarp")}return V}()})]})})]})]})})]})})]})}return y}(),b=function(B,k){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"white",children:(0,e.createVNode)(1,"h1",null,"\xA0Recalibrating projection apparatus.\xA0",16)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,"Please, wait for 3 seconds.",16)})]})}},25471:function(T,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.Instrument=function(){function i(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data;return(0,e.createComponentVNode)(2,m.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,C)]})})]})}return i}(),y=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.help;if(l)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function h(){return d("help")}return h}()})]})})})},B=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.lines,h=s.playing,N=s.repeat,v=s.maxRepeats,f=s.tempo,g=s.minTempo,V=s.maxTempo,S=s.tickLag,I=s.volume,L=s.minVolume,w=s.maxVolume,A=s.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function x(){return d("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return d("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return d("import")}return x}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:h,disabled:l.length===0||N<0,icon:"play",content:"Play",onClick:function(){function x(){return d("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!h,icon:"stop",content:"Stop",onClick:function(){function x(){return d("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:v,value:N,stepPixelSize:59,onChange:function(){function x(E,P){return d("repeat",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:f>=V,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return d("tempo",{new:f+S})}return x}()}),(0,a.round)(600/f)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:f<=g,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return d("tempo",{new:f-S})}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:w,value:I,stepPixelSize:6,onDrag:function(){function x(E,P){return d("setvolume",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,k)]})},k=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.allowedInstrumentNames,h=s.instrumentLoaded,N=s.instrument,v=s.canNoteShift,f=s.noteShift,g=s.noteShiftMin,V=s.noteShiftMax,S=s.sustainMode,I=s.sustainLinearDuration,L=s.sustainExponentialDropoff,w=s.legacy,A=s.sustainDropoffVolume,x=s.sustainHeldNote,E,P;return S===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:I,step:.5,stepPixelSize:85,format:function(){function j(M){return(0,a.round)(M*100)/100+" seconds"}return j}(),onChange:function(){function j(M,O){return d("setlinearfalloff",{new:O/10})}return j}()})):S===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function j(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return j}(),onChange:function(){function j(M,O){return d("setexpfalloff",{new:O})}return j}()})),l.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:w?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:h?(0,e.createComponentVNode)(2,o.Dropdown,{options:l,selected:N,width:"50%",onSelected:function(){function j(M){return d("switchinstrument",{name:M})}return j}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&v)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:g,maxValue:V,value:f,stepPixelSize:2,format:function(){function j(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return j}(),onChange:function(){function j(M,O){return d("setnoteshift",{new:O})}return j}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,onSelected:function(){function j(M){return d("setsustainmode",{new:M})}return j}()}),P]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function j(M,O){return d("setdropoffvolume",{new:O})}return j}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){function j(){return d("togglesustainhold")}return j}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function j(){return d("reset")}return j}()})]})})})},C=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.playing,h=s.lines,N=s.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!N||l,icon:"plus",content:"Add Line",onClick:function(){function v(){return d("newline",{line:h.length+1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!N,icon:N?"chevron-up":"chevron-down",onClick:function(){function v(){return d("edit")}return v}()})],4),children:!!N&&(h.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:h.map(function(v,f){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:f+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:l,icon:"pen",onClick:function(){function g(){return d("modifyline",{line:f+1})}return g}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:l,icon:"trash",onClick:function(){function g(){return d("deleteline",{line:f+1})}return g}()})],4),children:v},f)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},52736:function(T,r,n){"use strict";r.__esModule=!0,r.Jukebox=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(72253),m=n(36036),b=n(98595),y=r.Jukebox=function(){function C(i,c){var p=(0,o.useBackend)(c),u=p.act,d=p.data,s=d.active,l=d.looping,h=d.track_selected,N=d.volume,v=d.max_volume,f=d.songs,g=d.startTime,V=d.endTime,S=d.worldTime,I=d.need_coin,L=d.payment,w=d.advanced_admin,A=35,x=!L&&I&&!w,E=(0,t.flow)([(0,a.sortBy)(function(F){return F.name})])(f),P=f.find(function(F){return F.name===h}),j=E.length,M=P?E.findIndex(function(F){return F.name===P.name})+1:0,O=function(){function F(W){var U=Math.floor(W/60),K=W%60,G=String(U).padStart(2,"0")+":"+String(K).padStart(2,"0");return G}return F}(),D=(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:[s?l?"\u221E":O(Math.round((S-g)/10)):l?"\u221E":O(P.length)," ","/ ",l?"\u221E":O(P.length)]});return(0,e.createComponentVNode)(2,b.Window,{width:350,height:435,title:"\u041C\u0443\u0437\u044B\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442",children:[x?(0,e.createComponentVNode)(2,k):null,(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,title:"\u041F\u0440\u043E\u0438\u0433\u0440\u044B\u0432\u0430\u0442\u0435\u043B\u044C",children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{bold:!0,maxWidth:"240px",children:P.name.length>A?(0,e.createVNode)(1,"marquee",null,P.name,0):P.name}),(0,e.createComponentVNode)(2,m.Stack,{fill:!0,mt:1.5,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,m.Button,{fluid:!0,icon:s?"pause":"play",color:"transparent",content:s?"\u0421\u0442\u043E\u043F":"\u0421\u0442\u0430\u0440\u0442",selected:s,onClick:function(){function F(){return u("toggle")}return F}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,m.Button.Checkbox,{fluid:!0,icon:"undo",content:"\u041F\u043E\u0432\u0442\u043E\u0440",disabled:s||I&&!w,tooltip:I&&!w?"\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440 \u0437\u0430 \u043C\u043E\u043D\u0435\u0442\u043A\u0443":null,checked:l,onClick:function(){function F(){return u("loop",{looping:!l})}return F}()})})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.ProgressBar.Countdown,{start:g,current:l?V:S,end:V,children:D})})]})})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{children:[s?(0,e.createComponentVNode)(2,B):null,(0,e.createComponentVNode)(2,m.Stack,{fill:!0,mb:1.5,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,m.Button,{color:"transparent",icon:"fast-backward",onClick:function(){function F(){return u("set_volume",{volume:"min"})}return F}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,m.Button,{color:"transparent",icon:"undo",onClick:function(){function F(){return u("set_volume",{volume:"reset"})}return F}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,m:0,textAlign:"right",children:(0,e.createComponentVNode)(2,m.Button,{color:"transparent",icon:"fast-forward",onClick:function(){function F(){return u("set_volume",{volume:"max"})}return F}()})})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{textAlign:"center",textColor:"label",children:[(0,e.createComponentVNode)(2,m.Knob,{size:2,color:N<=25?"green":N<=50?"":N<=75?"orange":"red",value:N,unit:"%",minValue:0,maxValue:v,step:1,stepPixelSize:5,onDrag:function(){function F(W,U){return u("set_volume",{volume:U})}return F}()}),"Volume"]})]})})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0442\u0440\u0435\u043A\u0438",buttons:(0,e.createComponentVNode)(2,m.Button,{bold:!0,icon:"random",color:"transparent",content:M+"/"+j,tooltip:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0442\u0440\u0435\u043A",tooltipPosition:"top-end",onClick:function(){function F(){var W=Math.floor(Math.random()*j),U=E[W];u("select_track",{track:U.name})}return F}()}),children:E.map(function(F){return(0,e.createComponentVNode)(2,m.Stack.Item,{mb:.5,textAlign:"left",children:(0,e.createComponentVNode)(2,m.Button,{fluid:!0,selected:P.name===F.name,color:"translucent",content:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:F.name}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:O(F.length)})]}),onClick:function(){function W(){u("select_track",{track:F.name})}return W}()})},F.name)})})})]})})]})}return C}(),B=function(){return(0,e.createComponentVNode)(2,m.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"music",size:"3",color:"gray",mb:1}),(0,e.createComponentVNode)(2,m.Box,{color:"label",bold:!0,children:"\u0418\u0433\u0440\u0430\u0435\u0442 \u043C\u0443\u0437\u044B\u043A\u0430"})]})},k=function(){return(0,e.createComponentVNode)(2,m.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"coins",size:"6",color:"gold",mr:1}),(0,e.createComponentVNode)(2,m.Box,{color:"label",bold:!0,mt:5,fontSize:2,children:"\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043C\u043E\u043D\u0435\u0442\u043A\u0443"})]})}},13618:function(T,r,n){"use strict";r.__esModule=!0,r.KeyComboModal=void 0;var e=n(89005),a=n(70611),t=n(72253),o=n(36036),m=n(98595),b=n(19203),y=n(51057),B=function(u){return u.key!==a.KEY.Alt&&u.key!==a.KEY.Control&&u.key!==a.KEY.Shift&&u.key!==a.KEY.Escape},k={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},C=3,i=function(u){var d="";if(u.altKey&&(d+="Alt"),u.ctrlKey&&(d+="Ctrl"),u.shiftKey&&!(u.keyCode>=48&&u.keyCode<=57)&&(d+="Shift"),u.location===C&&(d+="Numpad"),B(u))if(u.shiftKey&&u.keyCode>=48&&u.keyCode<=57){var s=u.keyCode-48;d+="Shift"+s}else{var l=u.key.toUpperCase();d+=k[l]||l}return d},c=r.KeyComboModal=function(){function p(u,d){var s=(0,t.useBackend)(d),l=s.act,h=s.data,N=h.init_value,v=h.large_buttons,f=h.message,g=f===void 0?"":f,V=h.title,S=h.timeout,I=(0,t.useLocalState)(d,"input",N),L=I[0],w=I[1],A=(0,t.useLocalState)(d,"binding",!0),x=A[0],E=A[1],P=function(){function O(D){if(!x){D.key===a.KEY.Enter&&l("submit",{entry:L}),D.key===a.KEY.Escape&&l("cancel");return}if(D.preventDefault(),B(D)){j(i(D)),E(!1);return}else if(D.key===a.KEY.Escape){j(N),E(!1);return}}return O}(),j=function(){function O(D){D!==L&&w(D)}return O}(),M=130+(g.length>30?Math.ceil(g.length/3):0)+(g.length&&v?5:0);return(0,e.createComponentVNode)(2,m.Window,{title:V,width:240,height:M,children:[S&&(0,e.createComponentVNode)(2,y.Loader,{value:S}),(0,e.createComponentVNode)(2,m.Window.Content,{onKeyDown:function(){function O(D){P(D)}return O}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:g})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:x,content:x&&x!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function O(){j(N),E(!0)}return O}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,b.InputButtons,{input:L})})]})]})})]})}return p}()},35655:function(T,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.KeycardAuth=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!i.swiping&&!i.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!i.redAvailable,onClick:function(){function u(){return C("triggerevent",{triggerevent:"Red Alert"})}return u}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Emergency Response Team"})}return u}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return u}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return u}(),content:"Revoke"})]})]})})]})});var p=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!i.hasSwiped&&!i.ertreason&&i.event==="Emergency Response Team"?p=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):i.hasConfirm?p=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):i.isRemote?p=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):i.hasSwiped&&(p=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,i.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:i.ertreason?"":"red",icon:i.ertreason?"check":"pencil-alt",content:i.ertreason?i.ertreason:"-----",disabled:i.busy,onClick:function(){function u(){return C("ert")}return u}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:i.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:i.busy||i.hasConfirm,onClick:function(){function u(){return C("reset")}return u}()}),children:p})]})})}return b}()},62955:function(T,r,n){"use strict";r.__esModule=!0,r.KitchenMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(62411),b=r.KitchenMachine=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.data,p=i.config,u=c.ingredients,d=c.operating,s=p.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Operating,{operating:d,name:s}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,e.createComponentVNode)(2,t.Table,{className:"Ingredient__Table",children:u.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{tr:5,children:[(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:l.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[l.amount," ",l.units]}),2)]},l.name)})})})})]})})})}return B}(),y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.inactive,d=p.tooltip;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:u,tooltip:u?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){function s(){return c("cook")}return s}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:u,tooltip:u?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){function s(){return c("eject")}return s}()})})]})})}},9525:function(T,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.LawManager=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.isAdmin,s=u.isSlaved,l=u.isMalf,h=u.isAIMalf,N=u.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:l?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(d&&s)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",s,"."]}),!!(l||h)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:N===0,onClick:function(){function v(){return p("set_view",{set_view:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:N===1,onClick:function(){function v(){return p("set_view",{set_view:1})}return v}()})]}),N===0&&(0,e.createComponentVNode)(2,b),N===1&&(0,e.createComponentVNode)(2,y)]})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.has_zeroth_laws,s=u.zeroth_laws,l=u.has_ion_laws,h=u.ion_laws,N=u.ion_law_nr,v=u.has_inherent_laws,f=u.inherent_laws,g=u.has_supplied_laws,V=u.supplied_laws,S=u.channels,I=u.channel,L=u.isMalf,w=u.isAdmin,A=u.zeroth_law,x=u.ion_law,E=u.inherent_law,P=u.supplied_law,j=u.supplied_law_position;return(0,e.createFragment)([!!d&&(0,e.createComponentVNode)(2,B,{title:"ERR_NULL_VALUE",laws:s,ctx:i}),!!l&&(0,e.createComponentVNode)(2,B,{title:N,laws:h,ctx:i}),!!v&&(0,e.createComponentVNode)(2,B,{title:"Inherent",laws:f,ctx:i}),!!g&&(0,e.createComponentVNode)(2,B,{title:"Supplied",laws:V,ctx:i}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:S.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===I,onClick:function(){function O(){return p("law_channel",{law_channel:M.channel})}return O}()},M.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function M(){return p("state_laws")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function M(){return p("notify_laws")}return M}()})})]})}),!!L&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(w&&!d)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_zeroth_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_ion_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_inherent_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:P}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:j,onClick:function(){function M(){return p("change_supplied_law_position")}return M}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_supplied_law")}return M}()})]})]})]})})],0)},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name+" - "+s.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function l(){return p("transfer_laws",{transfer_laws:s.ref})}return l}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.laws.has_ion_laws>0&&s.laws.ion_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)}),s.laws.has_zeroth_laws>0&&s.laws.zeroth_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)}),s.laws.has_inherent_laws>0&&s.laws.inherent_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)}),s.laws.has_supplied_laws>0&&s.laws.inherent_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)})]})},s.name)})})},B=function(C,i){var c=(0,a.useBackend)(C.ctx),p=c.act,u=c.data,d=u.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:C.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),C.laws.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:s.state?"Yes":"No",selected:s.state,onClick:function(){function l(){return p("state_law",{ref:s.ref,state_law:s.state?0:1})}return l}()}),!!d&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function l(){return p("edit_law",{edit_law:s.ref})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function l(){return p("delete_law",{delete_law:s.ref})}return l}()})],4)]})]},s.law)})]})})}},85066:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=r.LibraryComputer=function(){function N(v,f){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return N}(),y=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:I.summary}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!I.isProgrammatic&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Categories",children:I.categories.join(", ")})]}),(0,e.createVNode)(1,"br"),L===I.ckey&&(0,e.createComponentVNode)(2,t.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return V("delete_book",{bookid:I.id,user_ckey:L})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Report Book",icon:"flag",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,m.modalOpen)(f,"report_book",{bookid:I.id})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,m.modalOpen)(f,"rate_info",{bookid:I.id})}return w}()})]})},B=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=v.args,L=S.selected_report,w=S.report_categories,A=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reasons",children:(0,e.createComponentVNode)(2,t.Box,{children:w.map(function(x,E){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:x.category_id===L,onClick:function(){function P(){return V("set_report",{report_type:x.category_id})}return P}()}),(0,e.createVNode)(1,"br")],4,E)})})})]}),(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){function x(){return V("submit_report",{bookid:I.id,user_ckey:A})}return x}()})]})},k=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.selected_rating,L=Array(10).fill().map(function(w,A){return 1+A});return(0,e.createComponentVNode)(2,t.Stack,{children:[L.map(function(w,A){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{bold:!0,icon:"star",color:I>=w?"caution":"default",onClick:function(){function x(){return V("set_rating",{rating_value:w})}return x}()})},A)}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,ml:2,fontSize:"150%",children:[I+"/10",(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},C=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.current_rating?I.current_rating:0,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Ratings",children:I.total_ratings?I.total_ratings:0})]}),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,t.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){function w(){return V("rate_book",{bookid:I.id,user_ckey:L})}return w}()})]})},i=function(v,f){var g=(0,a.useBackend)(f),V=g.data,S=(0,a.useLocalState)(f,"tabIndex",0),I=S[0],L=S[1],w=V.login_state;return(0,e.createComponentVNode)(2,t.Stack.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===0,onClick:function(){function A(){return L(0)}return A}(),children:"Book Archives"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===1,onClick:function(){function A(){return L(1)}return A}(),children:"Corporate Literature"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===2,onClick:function(){function A(){return L(2)}return A}(),children:"Upload Book"}),w===1&&(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===3,onClick:function(){function A(){return L(3)}return A}(),children:"Patron Manager"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===4,onClick:function(){function A(){return L(4)}return A}(),children:"Inventory"})]})})},c=function(v,f){var g=(0,a.useLocalState)(f,"tabIndex",0),V=g[0];switch(V){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,d);case 2:return(0,e.createComponentVNode)(2,s);case 3:return(0,e.createComponentVNode)(2,l);case 4:return(0,e.createComponentVNode)(2,h);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},p=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.searchcontent,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.title||"Input Title",onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.author||"Input Author",onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Ratings",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:1,width:"min-content",content:I.ratingmin,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_ratingmin")}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"To"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:1,width:"min-content",content:I.ratingmax,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_ratingmax")}return x}()})})]})})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Dropdown,{mt:.6,width:"190px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_search_category",{category_id:A[E]})}return x}()})})})}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_search_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Search",icon:"eraser",onClick:function(){function x(){return V("clear_search")}return x}()}),I.ckey?(0,e.createComponentVNode)(2,t.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){function x(){return V("clear_ckey_search")}return x}()}):(0,e.createComponentVNode)(2,t.Button,{content:"Find My Books",icon:"search",onClick:function(){function x(){return V("find_users_books",{user_ckey:w})}return x}()})]})]})},u=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.external_booklist,L=S.archive_pagenumber,w=S.num_pages,A=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpagemax")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{bold:!0,content:L,onClick:function(){function x(){return(0,m.modalOpen)(f,"setpagenumber")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",disabled:L===w,onClick:function(){function x(){return V("incrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",disabled:L===w,onClick:function(){function x(){return V("incrementpagemax")}return x}()})],4),children:[(0,e.createComponentVNode)(2,p),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ratings"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Category"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(x){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:.5}),x.title.length>45?x.title.substr(0,45)+"...":x.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:x.author.length>30?x.author.substr(0,30)+"...":x.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[x.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.categories.join(", ").substr(0,45)}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[A===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function E(){return V("order_external_book",{bookid:x.id})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function E(){return(0,m.modalOpen)(f,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},d=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.programmatic_booklist,L=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(w,A){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:2}),w.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[L===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function x(){return V("order_programmatic_book",{bookid:w.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function x(){return(0,m.modalOpen)(f,"expand_info",{bookid:w.id})}return x}()})]})]},A)})]})})},s=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.selectedbook,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:I.copyright,content:"Upload Book",onClick:function(){function x(){return V("uploadbook",{user_ckey:w})}return x}()}),children:[I.copyright?(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.title,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_selected_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.author,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_selected_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"240px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_upload_category",{category_id:A[E]})}return x}()})})})]}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,disabled:I.copyright,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_upload_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:75,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",disabled:I.copyright,content:"Edit Summary",onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:I.summary})]})})]})]})},l=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.checkout_data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Patron"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-tag"}),L.patron_name]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.timeleft>=0?L.timeleft:"LATE"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:(0,e.createComponentVNode)(2,t.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:L.timeleft>=0,onClick:function(){function A(){return V("reportlost",{libraryid:L.libraryid})}return A}()})})]},w)})]})})},h=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.inventory_list;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"LIB ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.libraryid}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"})," ",L.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.checked_out?"Checked Out":"Available"})]},w)})]})})};(0,m.modalRegisterBodyOverride)("expand_info",y),(0,m.modalRegisterBodyOverride)("report_book",B),(0,m.modalRegisterBodyOverride)("rate_info",C)},9516:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=r.LibraryManager=function(){function i(c,p){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return i}(),y=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.pagestate;switch(l){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,C);case 3:return(0,e.createComponentVNode)(2,k);default:return"WE SHOULDN'T BE HERE!"}},B=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){function l(){return(0,m.modalOpen)(p,"specify_ssid_delete")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function l(){return(0,m.modalOpen)(p,"specify_ckey_delete")}return l}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function l(){return(0,m.modalOpen)(p,"specify_ckey_search")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function l(){return d("view_reported_books")}return l}()})]})},k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.reports;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"All Reported Books",(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function h(){return d("return")}return h}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Uploader CKEY"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Report Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reporter Ckey"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),l.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:h.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),h.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:h.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:h.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:h.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function N(){return d("delete_book",{bookid:h.id})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function N(){return d("unflag_book",{bookid:h.id})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function N(){return d("view_book",{bookid:h.id})}return N}()})]})]},h.id)})]})})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.ckey,h=s.booklist;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"Books uploaded by ",l,(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function N(){return d("return")}return N}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),N.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:N.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function v(){return d("delete_book",{bookid:N.id})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function v(){return d("view_book",{bookid:N.id})}return v}()})]})]},N.id)})]})})}},90447:function(T,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),m=n(72253),b=n(92986),y=n(98595),B=r.ListInputModal=function(){function i(c,p){var u=(0,m.useBackend)(p),d=u.act,s=u.data,l=s.items,h=l===void 0?[]:l,N=s.message,v=N===void 0?"":N,f=s.init_value,g=s.timeout,V=s.title,S=(0,m.useLocalState)(p,"selected",h.indexOf(f)),I=S[0],L=S[1],w=(0,m.useLocalState)(p,"searchBarVisible",h.length>10),A=w[0],x=w[1],E=(0,m.useLocalState)(p,"searchQuery",""),P=E[0],j=E[1],M=function(){function $(Q){var Z=K.length-1;if(Q===b.KEY_DOWN)if(I===null||I===Z){var ie;L(0),(ie=document.getElementById("0"))==null||ie.scrollIntoView()}else{var ne;L(I+1),(ne=document.getElementById((I+1).toString()))==null||ne.scrollIntoView()}else if(Q===b.KEY_UP)if(I===null||I===0){var se;L(Z),(se=document.getElementById(Z.toString()))==null||se.scrollIntoView()}else{var ve;L(I-1),(ve=document.getElementById((I-1).toString()))==null||ve.scrollIntoView()}}return $}(),O=function(){function $(Q){Q!==I&&L(Q)}return $}(),D=function(){function $(){x(!1),x(!0)}return $}(),F=function(){function $(Q){var Z=String.fromCharCode(Q),ie=h.find(function(ve){return ve==null?void 0:ve.toLowerCase().startsWith(Z==null?void 0:Z.toLowerCase())});if(ie){var ne,se=h.indexOf(ie);L(se),(ne=document.getElementById(se.toString()))==null||ne.scrollIntoView()}}return $}(),W=function(){function $(Q){var Z;Q!==P&&(j(Q),L(0),(Z=document.getElementById("0"))==null||Z.scrollIntoView())}return $}(),U=function(){function $(){x(!A),j("")}return $}(),K=h.filter(function($){return $==null?void 0:$.toLowerCase().includes(P.toLowerCase())}),G=330+Math.ceil(v.length/3);return A||setTimeout(function(){var $;return($=document.getElementById(I.toString()))==null?void 0:$.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:V,width:325,height:G,children:[g&&(0,e.createComponentVNode)(2,a.Loader,{value:g}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function $(Q){var Z=window.event?Q.which:Q.keyCode;(Z===b.KEY_DOWN||Z===b.KEY_UP)&&(Q.preventDefault(),M(Z)),Z===b.KEY_ENTER&&(Q.preventDefault(),d("submit",{entry:K[I]})),!A&&Z>=b.KEY_A&&Z<=b.KEY_Z&&(Q.preventDefault(),F(Z)),Z===b.KEY_ESCAPE&&(Q.preventDefault(),d("cancel"))}return $}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function $(){return U()}return $}()}),className:"ListInput__Section",fill:!0,title:v,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k,{filteredItems:K,onClick:O,onFocusSearch:D,searchBarVisible:A,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,C,{filteredItems:K,onSearch:W,searchQuery:P,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:K[I]})})]})})})]})}return i}(),k=function(c,p){var u=(0,m.useBackend)(p),d=u.act,s=c.filteredItems,l=c.onClick,h=c.onFocusSearch,N=c.searchBarVisible,v=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:s.map(function(f,g){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:g,onClick:function(){function V(){return l(g)}return V}(),onDblClick:function(){function V(S){S.preventDefault(),d("submit",{entry:s[v]})}return V}(),onKeyDown:function(){function V(S){var I=window.event?S.which:S.keyCode;N&&I>=b.KEY_A&&I<=b.KEY_Z&&(S.preventDefault(),h())}return V}(),selected:g===v,style:{animation:"none",transition:"none"},children:f.replace(/^\w/,function(V){return V.toUpperCase()})},g)})})},C=function(c,p){var u=(0,m.useBackend)(p),d=u.act,s=c.filteredItems,l=c.onSearch,h=c.searchQuery,N=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function v(f){f.preventDefault(),d("submit",{entry:s[N]})}return v}(),onInput:function(){function v(f,g){return l(g)}return v}(),placeholder:"Search...",value:h})}},77613:function(T,r,n){"use strict";r.__esModule=!0,r.MODsuitContent=r.MODsuit=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:A,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(){function j(M,O){return P("configure",{key:w,value:O,ref:x})}return j}()})},b=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:A,onClick:function(){function j(){return P("configure",{key:w,value:!A,ref:x})}return j}()})},y=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"paint-brush",onClick:function(){function j(){return P("configure",{key:w,ref:x})}return j}()}),(0,e.createComponentVNode)(2,t.ColorBox,{color:A,mr:.5})],4)},B=function(I,L){var w=I.name,A=I.value,x=I.values,E=I.module_ref,P=(0,a.useBackend)(L),j=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(O){return j("configure",{key:w,value:O,ref:E})}return M}()})},k=function(I,L){var w=I.name,A=I.display_name,x=I.type,E=I.value,P=I.values,j=I.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,m,Object.assign({},I))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,b,Object.assign({},I))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,y,Object.assign({},I))),list:(0,e.normalizeProps)((0,e.createComponentVNode)(2,B,Object.assign({},I)))};return(0,e.createComponentVNode)(2,t.Box,{children:[A,": ",M[x]]})},C=function(I,L){var w=I.active,A=I.userradiated,x=I.usertoxins,E=I.usermaxtoxins,P=I.threatlevel;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Level",color:w&&A?"bad":"good",children:w&&A?"IRRADIATED!":"RADIATION-FREE"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxins Level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?x/E:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:x})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Hazard Level",color:w&&P?"bad":"good",bold:!0,children:w&&P?P:0})})]})},i=function(I,L){var w=I.active,A=I.userhealth,x=I.usermaxhealth,E=I.userbrute,P=I.userburn,j=I.usertoxin,M=I.useroxy;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?A/x:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?A:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?P/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?P:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?j/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?j:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})})]})],4)},c=function(I,L){var w=I.active,A=I.statustime,x=I.statusid,E=I.statushealth,P=I.statusmaxhealth,j=I.statusbrute,M=I.statusburn,O=I.statustoxin,D=I.statusoxy,F=I.statustemp,W=I.statusnutrition,U=I.statusfingerprints,K=I.statusdna,G=I.statusviruses;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Time",children:w?A:"00:00:00"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Number",children:w?x||"0":"???"})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/P:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?j/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?j:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?O/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:O})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:D})})})})]}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Body Temperature",children:w?F:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Nutrition Status",children:w?W:0})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"DNA",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:w?U:"???"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:w?K:"???"})]})}),!!w&&!!G&&(0,e.createComponentVNode)(2,t.Section,{title:"Diseases",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),G.map(function($){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:$.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:$.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[$.stage,"/",$.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:$.cure})]},$.name)})]})})],0)},p={rad_counter:C,health_analyzer:i,status_readout:c},u=function(){return(0,e.createComponentVNode)(2,t.Section,{align:"center",fill:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,e.createComponentVNode)(2,t.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},d=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data;return(0,e.createComponentVNode)(2,t.Dimmer,{children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},s=function(I,L){var w=I.configuration_data,A=I.module_ref,x=Object.keys(w);return(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[x.map(function(E){var P=w[E];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{name:E,display_name:P.display_name,type:P.type,value:P.value,values:P.values,module_ref:A})},P.key)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:I.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},l=function(I){switch(I){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},h=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.malfunctioning,j=x.locked,M=x.open,O=x.selected_module,D=x.complexity,F=x.complexity_max,W=x.wearer_name,U=x.wearer_job,K=P?"Malfunctioning":E?"Active":"Inactive";return(0,e.createComponentVNode)(2,t.Section,{title:"Parameters",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:E?"Deactivate":"Activate",onClick:function(){function G(){return A("activate")}return G}()}),children:K}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:j?"lock-open":"lock",content:j?"Unlock":"Lock",onClick:function(){function G(){return A("lock")}return G}()}),children:j?"Locked":"Unlocked"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover",children:M?"Open":"Closed"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Selected Module",children:O||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[D," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[W,", ",U]})]})})},N=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.control,j=x.helmet,M=x.chestplate,O=x.gauntlets,D=x.boots,F=x.core,W=x.charge;return(0,e.createComponentVNode)(2,t.Section,{title:"Hardware",children:[(0,e.createComponentVNode)(2,t.Collapsible,{title:"Parts",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Control Unit",children:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Helmet",children:j||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:O||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:D||"None"})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core",children:F&&(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Type",children:F}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:W/100,content:W+"%",ranges:{good:[.6,1/0],average:[.3,.6],bad:[-1/0,.3]}})})]})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},v=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.modules,j=P.filter(function(M){return!!M.id});return(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:j.length!==0&&j.map(function(M){var O=p[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,d),(0,e.normalizeProps)((0,e.createComponentVNode)(2,O,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},f=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.complexity_max,P=x.modules,j=(0,a.useLocalState)(L,"module_configuration",null),M=j[0],O=j[1];return(0,e.createComponentVNode)(2,t.Section,{title:"Modules",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:P.length!==0&&P.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:D.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===D.ref&&(0,e.createComponentVNode)(2,s,{configuration_data:D.configuration_data,module_ref:D.ref,onExit:function(){function F(){return O(null)}return F}()}),(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[D.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:D.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:D.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:D.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[D.cooldown>0&&D.cooldown/10||"0","/",D.cooldown_time/10,"s"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("select",{ref:D.ref})}return F}(),icon:"bullseye",selected:D.module_active,tooltip:l(D.module_type),tooltipPosition:"left",disabled:!D.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return O(D.ref)}return F}(),icon:"cog",selected:M===D.ref,tooltip:"Configure",tooltipPosition:"left",disabled:D.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:D.ref})}return F}(),icon:"thumbtack",selected:D.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!D.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:D.description})]})})},D.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},g=r.MODsuitContent=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!P,children:!!P&&(0,e.createComponentVNode)(2,u)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,h)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,N)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f)})]})})}return S}(),V=r.MODsuit=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,o.Window,{theme:E,width:400,height:620,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,g)})})})}return S}()},78624:function(T,r,n){"use strict";r.__esModule=!0,r.MagnetController=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=n(3939),y=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]),B=r.MagnetController=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.autolink,s=u.code,l=u.frequency,h=u.linkedMagnets,N=u.magnetConfiguration,v=u.path,f=u.pathPosition,g=u.probing,V=u.powerState,S=u.speed;return(0,e.createComponentVNode)(2,m.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:[!d&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:g?"spinner":"sync",iconSpin:!!g,disabled:g,onClick:function(){function I(){return p("probe_magnets")}return I}()}),title:"Magnet Linking",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,a.toFixed)(l/10,1)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:s})]})}),(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{icon:V?"power-off":"times",content:V?"On":"Off",selected:V,onClick:function(){function I(){return p("toggle_power")}return I}()}),title:"Controller Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:S.value,minValue:S.min,maxValue:S.max,onChange:function(){function I(L,w){return p("set_speed",{speed:w})}return I}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(y.entries()).map(function(I){var L=I[0],w=I[1],A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button,{icon:A,tooltip:x,onClick:function(){function E(){return p("path_add",{code:L})}return E}()},L)}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){function I(){return p("path_clear")}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){function I(){return(0,b.modalOpen)(i,"path_custom_input")}return I}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:v.map(function(I,L){var w=y.get(I)||{icon:"question"},A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:L+2===f,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return p("path_remove",{index:L+1,code:I})}return E}()},L)})})]})]})}),h.map(function(I,L){var w=I.uid,A=I.powerState,x=I.electricityLevel,E=I.magneticField;return(0,e.createComponentVNode)(2,o.Section,{title:"Magnet #"+(L+1)+" Configuration",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:A?"power-off":"times",content:A?"On":"Off",selected:A,onClick:function(){function P(){return p("toggle_magnet_power",{id:w})}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Move Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:x,minValue:N.electricityLevel.min,maxValue:N.electricityLevel.max,onChange:function(){function P(j,M){return p("set_electricity_level",{id:w,electricityLevel:M})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Field Size",children:(0,e.createComponentVNode)(2,o.Slider,{value:E,minValue:N.magneticField.min,maxValue:N.magneticField.max,onChange:function(){function P(j,M){return p("set_magnetic_field",{id:w,magneticField:M})}return P}()})})]})},w)})]})]})}return k}()},72106:function(T,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.MechBayConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.recharge_port,p=c&&c.mech,u=p&&p.cell,d=p&&p.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:155,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d?"Mech status: "+d:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function s(){return C("reconnect")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!p&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.health/p.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!p&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!u&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}return b}()},7466:function(T,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=n(25328),y=r.MechaControlConsole=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.act,p=i.data,u=p.beacons,d=p.stored_data;return d.length?(0,e.createComponentVNode)(2,m.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function s(){return c("clear_log")}return s}()}),children:d.map(function(s){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",s.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,b.decodeHtmlEntities)(s.message)})]},s.time)})})})}):(0,e.createComponentVNode)(2,m.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:u.length&&u.map(function(s){return(0,e.createComponentVNode)(2,o.Section,{title:s.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function l(){return c("send_message",{mt:s.uid})}return l}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function l(){return c("get_log",{mt:s.uid})}return l}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function l(){return c("shock",{mt:s.uid})}return l}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.maxHealth*.75,1/0],average:[s.maxHealth*.5,s.maxHealth*.75],bad:[-1/0,s.maxHealth*.5]},value:s.health,maxValue:s.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:s.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.cellMaxCharge*.75,1/0],average:[s.cellMaxCharge*.5,s.cellMaxCharge*.75],bad:[-1/0,s.cellMaxCharge*.5]},value:s.cellCharge,maxValue:s.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[s.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:s.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,b.toTitleCase)(s.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:s.active||"None"}),s.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[s.cargoMax*.75,1/0],average:[s.cargoMax*.5,s.cargoMax*.75],good:[-1/0,s.cargoMax*.5]},value:s.cargoUsed,maxValue:s.cargoMax})})||null]})},s.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return B}()},79625:function(T,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(3939),b=n(98595),y=n(321),B=n(5485),k=n(22091),C={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},i={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(A,x){(0,m.modalOpen)(A,"edit",{field:x.edit,value:x.value})},p=function(A,x){var E=A.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:E.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:E.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[E.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:E.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:E.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:C[E.severity],children:E.severity})]})})})},u=r.MedicalRecords=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,j=P.loginState,M=P.screen;if(!j.logged_in)return(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});var O;return M===2?O=(0,e.createComponentVNode)(2,d):M===3?O=(0,e.createComponentVNode)(2,s):M===4?O=(0,e.createComponentVNode)(2,l):M===5?O=(0,e.createComponentVNode)(2,f):M===6?O=(0,e.createComponentVNode)(2,g):M===7&&(O=(0,e.createComponentVNode)(2,V)),(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,L),O]})})]})}return w}(),d=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.records,O=(0,t.useLocalState)(x,"searchText",""),D=O[0],F=O[1],W=(0,t.useLocalState)(x,"sortId","name"),U=W[0],K=W[1],G=(0,t.useLocalState)(x,"sortOrder",!0),$=G[0],Q=G[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function Z(){return P("screen",{screen:3})}return Z}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function Z(ie,ne){return F(ne)}return Z}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,S,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,S,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,S,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,S,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,S,{id:"m_stat",children:"Mental Status"})]}),M.filter((0,a.createSearch)(D,function(Z){return Z.name+"|"+Z.id+"|"+Z.rank+"|"+Z.p_stat+"|"+Z.m_stat})).sort(function(Z,ie){var ne=$?1:-1;return Z[U].localeCompare(ie[U])*ne}).map(function(Z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+i[Z.p_stat],onClick:function(){function ie(){return P("view_record",{view_record:Z.ref})}return ie}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",Z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.m_stat})]},Z.id)})]})})})],4)},s=function(A,x){var E=(0,t.useBackend)(x),P=E.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,translucent:!0,lineHeight:3,icon:"trash",content:"Delete All Medical Records",onClick:function(){function j(){return P("del_all_med_records")}return j}()})})]})})},l=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medical,O=j.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:O?"spinner":"print",disabled:O,iconSpin:!!O,content:"Print Record",ml:"0.5rem",onClick:function(){function D(){return P("print_record")}return D}()}),children:(0,e.createComponentVNode)(2,h)})}),!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function D(){return P("new_med_record")}return D}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!M.empty,content:"Delete Medical Record",onClick:function(){function D(){return P("del_med_record")}return D}()}),children:(0,e.createComponentVNode)(2,N)})}),(0,e.createComponentVNode)(2,v)],4)],0)},h=function(A,x){var E=(0,t.useBackend)(x),P=E.data,j=P.general;return!j||!j.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:j.fields.map(function(M,O){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:M.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:M.value}),!!M.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function D(){return c(x,M)}return D}()})]},O)})})}),!!j.has_photos&&j.photos.map(function(M,O){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:M,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",O+1]},O)})]})},N=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medical;return!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"Medical records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:M.fields.map(function(O,D){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:O.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(O.value),!!O.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:O.line_break?"1rem":"initial",onClick:function(){function F(){return c(x,O)}return F}()})]},D)})})})})},v=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function O(){return(0,m.modalOpen)(x,"add_comment")}return O}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):M.comments.map(function(O,D){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:O.header}),(0,e.createVNode)(1,"br"),O.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function F(){return P("del_comment",{del_comment:D+1})}return F}()})]},D)})})})},f=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.virus,O=(0,t.useLocalState)(x,"searchText",""),D=O[0],F=O[1],W=(0,t.useLocalState)(x,"sortId2","name"),U=W[0],K=W[1],G=(0,t.useLocalState)(x,"sortOrder2",!0),$=G[0],Q=G[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function Z(ie,ne){return F(ne)}return Z}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,I,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,I,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,I,{id:"severity",children:"Severity"})]}),M.filter((0,a.createSearch)(D,function(Z){return Z.name+"|"+Z.max_stages+"|"+Z.severity})).sort(function(Z,ie){var ne=$?1:-1;return Z[U].localeCompare(ie[U])*ne}).map(function(Z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+Z.severity,onClick:function(){function ie(){return P("vir",{vir:Z.D})}return ie}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",Z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:C[Z.severity],children:Z.severity})]},Z.id)})]})})})})],4)},g=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.goals;return(0,e.createComponentVNode)(2,o.Section,{title:"Virology Goals",fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:M.length!==0&&M.map(function(O){return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:O.name,children:[(0,e.createComponentVNode)(2,o.Table,{children:(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:O.delivered,minValue:0,maxValue:O.deliverygoal,ranges:{good:[O.deliverygoal*.5,1/0],average:[O.deliverygoal*.25,O.deliverygoal*.5],bad:[-1/0,O.deliverygoal*.25]},children:[O.delivered," / ",O.deliverygoal," Units"]})})})}),(0,e.createComponentVNode)(2,o.Box,{children:O.report})]})},O.id)})||(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:"No Goals Detected"})})})})},V=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medbots;return M.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),M.map(function(O){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+O.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",O.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[O.area||"Unknown"," (",O.x,", ",O.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.use_beaker?"Reservoir: "+O.total_volume+"/"+O.maximum_volume:"Using internal synthesizer"})]},O.id)})]})})})},S=function(A,x){var E=(0,t.useLocalState)(x,"sortId","name"),P=E[0],j=E[1],M=(0,t.useLocalState)(x,"sortOrder",!0),O=M[0],D=M[1],F=A.id,W=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?D(!O):(j(F),D(!0))}return U}(),children:[W,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:O?"sort-up":"sort-down",ml:"0.25rem;"})]})})},I=function(A,x){var E=(0,t.useLocalState)(x,"sortId2","name"),P=E[0],j=E[1],M=(0,t.useLocalState)(x,"sortOrder2",!0),O=M[0],D=M[1],F=A.id,W=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?D(!O):(j(F),D(!0))}return U}(),children:[W,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:O?"sort-up":"sort-down",ml:"0.25rem;"})]})})},L=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.screen,O=j.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:M===2,onClick:function(){function D(){P("screen",{screen:2})}return D}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function D(){P("screen",{screen:5})}return D}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"vial",selected:M===6,onClick:function(){function D(){P("screen",{screen:6})}return D}(),children:"Virology Goals"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===7,onClick:function(){function D(){return P("screen",{screen:7})}return D}(),children:"Medibot Tracking"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"Record Maintenance"}),M===4&&O&&!O.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["Record: ",O.fields[0].value]})]})})};(0,m.modalRegisterBodyOverride)("virus",p)},54989:function(T,r,n){"use strict";r.__esModule=!0,r.MerchVendor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=C.product,s=C.productImage,l=C.productCategory,h=u.user_money;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:d.price>h,icon:"shopping-cart",content:d.price,textAlign:"left",onClick:function(){function N(){return p("purchase",{name:d.name,category:l})}return N}()})})]})},b=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=(0,a.useLocalState)(i,"tabIndex",1),d=u[0],s=p.products,l=p.imagelist,h=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:s[h[d]].map(function(N){return(0,e.createComponentVNode)(2,m,{product:N,productImage:l[N.path],productCategory:h[d]},N.name)})})},y=r.MerchVendor=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.user_cash,s=u.inserted_cash;return(0,e.createComponentVNode)(2,o.Window,{title:"Merch Computer",width:450,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,e.createVNode)(1,"b",null,s,0)," credits inserted."]}),(0,e.createComponentVNode)(2,t.Button,{disabled:!s,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){function l(){return p("change")}return l}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{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.",d!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[d||0,(0,e.createTextVNode)(" credits")],0),"."]})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,b)]})})]})})})}return k}(),B=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=(0,a.useLocalState)(i,"tabIndex",1),d=u[0],s=u[1],l=p.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:d===1,onClick:function(){function h(){return s(1)}return h}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:d===2,onClick:function(){function h(){return s(2)}return h}(),children:"Decorations"})]})}},87684:function(T,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=["title","items"];function y(u,d){if(u==null)return{};var s={};for(var l in u)if({}.hasOwnProperty.call(u,l)){if(d.includes(l))continue;s[l]=u[l]}return s}var B={Alphabetical:function(){function u(d,s){return d-s}return u}(),Availability:function(){function u(d,s){return-(d.affordable-s.affordable)}return u}(),Price:function(){function u(d,s){return d.price-s.price}return u}()},k=r.MiningVendor=function(){function u(d,s){return(0,e.createComponentVNode)(2,m.Window,{width:400,height:455,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)]})})})}return u}(),C=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.has_id,f=N.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:v,children:v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",f.name,".",(0,e.createVNode)(1,"br"),"You have ",f.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function g(){return h("logoff")}return g}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},i=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.has_id,f=N.id,g=N.items,V=(0,t.useLocalState)(s,"search",""),S=V[0],I=V[1],L=(0,t.useLocalState)(s,"sort","Alphabetical"),w=L[0],A=L[1],x=(0,t.useLocalState)(s,"descending",!1),E=x[0],P=x[1],j=(0,a.createSearch)(S,function(D){return D[0]}),M=!1,O=Object.entries(g).map(function(D,F){var W=Object.entries(D[1]).filter(j).map(function(U){return U[1].affordable=v&&f.points>=U[1].price,U[1]}).sort(B[w]);if(W.length!==0)return E&&(W=W.reverse()),M=!0,(0,e.createComponentVNode)(2,p,{title:D[0],items:W},D[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:M?O:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(d,s){var l=(0,t.useLocalState)(s,"search",""),h=l[0],N=l[1],v=(0,t.useLocalState)(s,"sort",""),f=v[0],g=v[1],V=(0,t.useLocalState)(s,"descending",!1),S=V[0],I=V[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{mt:.2,placeholder:"Search by item name..",width:"100%",onInput:function(){function L(w,A){return N(A)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(B),width:"100%",onSelected:function(){function L(w){return g(w)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:S?"arrow-down":"arrow-up",height:"21px",tooltip:S?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function L(){return I(!S)}return L}()})})]})})},p=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=d.title,f=d.items,g=y(d,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:v},g,{children:f.map(function(V){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:V.name}),(0,e.createComponentVNode)(2,o.Button,{disabled:!N.has_id||N.id.points0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+d+'"':"\u0412\u0441\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 - "+p.length,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:p.filter(function(h){return h.name&&(d.length>0?h.name.toLowerCase().includes(d.toLowerCase())||h.desc.toLowerCase().includes(d.toLowerCase())||h.author.toLowerCase().includes(d.toLowerCase()):!0)}).map(function(h){return(0,e.createComponentVNode)(2,o.Collapsible,{title:h.name,children:[(0,e.createComponentVNode)(2,o.Section,{title:"\u0410\u0432\u0442\u043E\u0440\u044B",children:h.author}),(0,e.createComponentVNode)(2,o.Section,{title:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",children:h.desc})]},h.name)})})})})})],4)}return y}()},59783:function(T,r,n){"use strict";r.__esModule=!0,r.NTRecruiter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.NTRecruiter=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.gamestatus,p=i.cand_name,u=i.cand_birth,d=i.cand_age,s=i.cand_species,l=i.cand_planet,h=i.cand_job,N=i.cand_records,v=i.cand_curriculum,f=i.total_curriculums,g=i.reason;if(c===0)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){function V(){return C("start_game")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){function V(){return C("instructions")}return V}()})]})]})})});if(c===1)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,color:"grey",title:"Guide",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){function V(){return C("back_to_menu")}return V}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss ",(0,e.createVNode)(1,"b",null,f,0)," candidates, one wrongly made choice leads to a game over."]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"3#",color:"silver",children:[(0,e.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{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,e.createComponentVNode)(2,t.LabeledList.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,e.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{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,e.createComponentVNode)(2,t.LabeledList.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,e.createVNode)(1,"b",null,"typos",16)," and ",(0,e.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for"," ",(0,e.createVNode)(1,"b",null,"jobs",16)," that they ",(0,e.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,e.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10#",color:"silver",children:["For some unknown reason ",(0,e.createVNode)(1,"b",null,"clowns",16)," are never denied by the company, no matter what."]})]})})})})});if(c===2)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",v]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",color:"silver",children:(0,e.createVNode)(1,"b",null,p,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",color:"silver",children:(0,e.createVNode)(1,"b",null,s,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",color:"silver",children:(0,e.createVNode)(1,"b",null,d,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Date of Birth",color:"silver",children:(0,e.createVNode)(1,"b",null,u,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Planet of Origin",color:"silver",children:(0,e.createVNode)(1,"b",null,l,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requested Job",color:"silver",children:(0,e.createVNode)(1,"b",null,h,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Employment Records",color:"silver",children:(0,e.createVNode)(1,"b",null,N,0)})]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){function V(){return C("dismiss")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){function V(){return C("hire")}return V}()})})]})})})]})})});if(c===3)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{pt:"40%",fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"15px",color:"label",textAlign:"center",children:g}),(0,e.createComponentVNode)(2,t.Stack.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",v-1,"/",f]})]})}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){function V(){return C("back_to_menu")}return V}()})})]})})})}return b}()},64713:function(T,r,n){"use strict";r.__esModule=!0,r.Newscaster=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(76910),b=n(98595),y=n(3939),B=n(22091),k=["icon","iconSpin","selected","security","onClick","title","children"],C=["name"];function i(I,L){if(I==null)return{};var w={};for(var A in I)if({}.hasOwnProperty.call(I,A)){if(L.includes(A))continue;w[A]=I[A]}return w}var c=128,p=["security","engineering","medical","science","service","supply"],u={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"}},d=r.Newscaster=function(){function I(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.is_security,j=E.is_admin,M=E.is_silent,O=E.is_printing,D=E.screen,F=E.channels,W=E.channel_idx,U=W===void 0?-1:W,K=(0,t.useLocalState)(w,"menuOpen",!1),G=K[0],$=K[1],Q=(0,t.useLocalState)(w,"viewingPhoto",""),Z=Q[0],ie=Q[1],ne=(0,t.useLocalState)(w,"censorMode",!1),se=ne[0],ve=ne[1],Ve;D===0||D===2?Ve=(0,e.createComponentVNode)(2,l):D===1&&(Ve=(0,e.createComponentVNode)(2,h));var ge=F.reduce(function(Ce,oe){return Ce+oe.unread},0);return(0,e.createComponentVNode)(2,b.Window,{theme:P&&"security",width:800,height:600,children:[Z?(0,e.createComponentVNode)(2,f):(0,e.createComponentVNode)(2,y.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Section,{fill:!0,className:(0,a.classes)(["Newscaster__menu",G&&"Newscaster__menu--open"]),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,s,{icon:"bars",title:"Toggle Menu",onClick:function(){function Ce(){return $(!G)}return Ce}()}),(0,e.createComponentVNode)(2,s,{icon:"newspaper",title:"Headlines",selected:D===0,onClick:function(){function Ce(){return x("headlines")}return Ce}(),children:ge>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:ge>=10?"9+":ge})}),(0,e.createComponentVNode)(2,s,{icon:"briefcase",title:"Job Openings",selected:D===1,onClick:function(){function Ce(){return x("jobs")}return Ce}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(Ce){return(0,e.createComponentVNode)(2,s,{icon:Ce.icon,title:Ce.name,selected:D===2&&F[U-1]===Ce,onClick:function(){function oe(){return x("channel",{uid:Ce.uid})}return oe}(),children:Ce.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:Ce.unread>=10?"9+":Ce.unread})},Ce)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!j)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function Ce(){return(0,y.modalOpen)(w,"wanted_notice")}return Ce}()}),(0,e.createComponentVNode)(2,s,{security:!0,icon:se?"minus-square":"minus-square-o",title:"Censor Mode: "+(se?"On":"Off"),mb:"0.5rem",onClick:function(){function Ce(){return ve(!se)}return Ce}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,s,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function Ce(){return(0,y.modalOpen)(w,"create_story")}return Ce}()}),(0,e.createComponentVNode)(2,s,{icon:"plus-circle",title:"New Channel",onClick:function(){function Ce(){return(0,y.modalOpen)(w,"create_channel")}return Ce}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,s,{icon:O?"spinner":"print",iconSpin:O,title:O?"Printing...":"Print Newspaper",onClick:function(){function Ce(){return x("print_newspaper")}return Ce}()}),(0,e.createComponentVNode)(2,s,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function Ce(){return x("toggle_mute")}return Ce}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,B.TemporaryNotice),Ve]})]})})]})}return I}(),s=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=L.icon,P=E===void 0?"":E,j=L.iconSpin,M=L.selected,O=M===void 0?!1:M,D=L.security,F=D===void 0?!1:D,W=L.onClick,U=L.title,K=L.children,G=i(L,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",O&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:W},G,{children:[O&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:j,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:U}),K]})))},l=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.screen,j=E.is_admin,M=E.channel_idx,O=E.channel_can_manage,D=E.channels,F=E.stories,W=E.wanted,U=(0,t.useLocalState)(w,"fullStories",[]),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"censorMode",!1),Q=$[0],Z=$[1],ie=P===2&&M>-1?D[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!W&&(0,e.createComponentVNode)(2,N,{story:W,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:ie?ie.icon:"newspaper",mr:"0.5rem"}),ie?ie.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ne){return!K.includes(ne.uid)&&ne.body.length+3>c?Object.assign({},ne,{body_short:ne.body.substr(0,c-4)+"..."}):ne}).map(function(ne,se){return(0,e.createComponentVNode)(2,N,{story:ne},se)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!ie&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([Q&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!ie.admin&&!j,selected:ie.censored,icon:ie.censored?"comment-slash":"comment",content:ie.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ne(){return x("censor_channel",{uid:ie.uid})}return ne}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!O,icon:"cog",content:"Manage",onClick:function(){function ne(){return(0,y.modalOpen)(w,"manage_channel",{uid:ie.uid})}return ne}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:ie.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:ie.author||"N/A"}),!!j&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:ie.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:ie.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),F.reduce(function(ne,se){return ne+se.view_count},0).toLocaleString()]})]})})]})},h=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.jobs,j=E.wanted,M=Object.entries(P).reduce(function(O,D){var F=D[0],W=D[1];return O+W.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!j&&(0,e.createComponentVNode)(2,N,{story:j,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:M>0?p.map(function(O){return Object.assign({},u[O],{id:O,jobs:P[O]})}).filter(function(O){return!!O&&O.jobs.length>0}).map(function(O){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+O.id]),title:O.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:O.fluff_text}),children:O.jobs.map(function(D){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!D.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",D.title]},D.title)})},O.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.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."})]})]})},N=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=L.story,j=L.wanted,M=j===void 0?!1:j,O=E.is_admin,D=(0,t.useLocalState)(w,"fullStories",[]),F=D[0],W=D[1],U=(0,t.useLocalState)(w,"censorMode",!1),K=U[0],G=U[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",M&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([M&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),P.censor_flags&2&&"[REDACTED]"||P.title||"News from "+P.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!M&&K&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:P.censor_flags&2,icon:P.censor_flags&2?"comment-slash":"comment",content:P.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function $(){return x("censor_story",{uid:P.uid})}return $}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!O&&(0,e.createFragment)([(0,e.createTextVNode)("ckey: "),P.author_ckey,(0,e.createTextVNode)(" |\xA0")],0),!M&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),P.view_count.toLocaleString(),(0,e.createTextVNode)(" |\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,m.timeAgo)(P.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:P.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!P.has_photo&&(0,e.createComponentVNode)(2,v,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function($,Q){return(0,e.createComponentVNode)(2,o.Box,{children:$||(0,e.createVNode)(1,"br")},Q)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function $(){return W([].concat(F,[P.uid]))}return $}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},v=function(L,w){var A=L.name,x=i(L,C),E=(0,t.useLocalState)(w,"viewingPhoto",""),P=E[0],j=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function M(){return j(A)}return M}()},x)))},f=function(L,w){var A=(0,t.useLocalState)(w,"viewingPhoto",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:x}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function P(){return E("")}return P}()})]})},g=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=!!L.args.uid&&E.channels.filter(function(te){return te.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!P){(0,y.modalClose)(w);return}var j=L.id==="manage_channel",M=!!L.args.is_admin,O=L.args.scanned_user,D=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||O||"Unknown"),F=D[0],W=D[1],U=(0,t.useLocalState)(w,"name",(P==null?void 0:P.name)||""),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"description",(P==null?void 0:P.description)||""),Q=$[0],Z=$[1],ie=(0,t.useLocalState)(w,"icon",(P==null?void 0:P.icon)||"newspaper"),ne=ie[0],se=ie[1],ve=(0,t.useLocalState)(w,"isPublic",j?!!(P!=null&&P.public):!1),Ve=ve[0],ge=ve[1],Ce=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin)===1||!1),oe=Ce[0],ce=Ce[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:j?"Manage "+P.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function te(fe,ue){return W(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:K,onInput:function(){function te(fe,ue){return G(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Q,onInput:function(){function te(fe,ue){return Z(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ne,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,ue){return se(ue)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ne,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:Ve,icon:Ve?"toggle-on":"toggle-off",content:Ve?"Yes":"No",onClick:function(){function te(){return ge(!Ve)}return te}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ce(!oe)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||K.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:K.substr(0,49),description:Q.substr(0,128),icon:ne,public:Ve?1:0,admin_locked:oe?1:0})}return te}()})]})},V=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,j=E.channels,M=E.channel_idx,O=M===void 0?-1:M,D=!!L.args.is_admin,F=L.args.scanned_user,W=j.slice().sort(function(te,fe){if(O<0)return 0;var ue=j[O-1];if(ue.uid===te.uid)return-1;if(ue.uid===fe.uid)return 1}).filter(function(te){return D||!te.frozen&&(te.author===F||!!te.public)}),U=(0,t.useLocalState)(w,"author",F||"Unknown"),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"channel",W.length>0?W[0].name:""),Q=$[0],Z=$[1],ie=(0,t.useLocalState)(w,"title",""),ne=ie[0],se=ie[1],ve=(0,t.useLocalState)(w,"body",""),Ve=ve[0],ge=ve[1],Ce=(0,t.useLocalState)(w,"adminLocked",!1),oe=Ce[0],ce=Ce[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!D,width:"100%",value:K,onInput:function(){function te(fe,ue){return G(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Q,options:W.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return Z(fe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:ne,onInput:function(){function te(fe,ue){return se(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:Ve,onInput:function(){function te(fe,ue){return ge(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function te(){return x(P?"eject_photo":"attach_photo")}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:ne,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"}),Ve.split("\n").map(function(te,fe){return(0,e.createComponentVNode)(2,o.Box,{children:te||(0,e.createVNode)(1,"br")},fe)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),D&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ce(!oe)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:K.trim().length===0||Q.trim().length===0||ne.trim().length===0||Ve.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,"create_story","",{author:K,channel:Q,title:ne.substr(0,127),body:Ve.substr(0,1023),admin_locked:oe?1:0})}return te}()})]})},S=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,j=E.wanted,M=!!L.args.is_admin,O=L.args.scanned_user,D=(0,t.useLocalState)(w,"author",(j==null?void 0:j.author)||O||"Unknown"),F=D[0],W=D[1],U=(0,t.useLocalState)(w,"name",(j==null?void 0:j.title.substr(8))||""),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"description",(j==null?void 0:j.body)||""),Q=$[0],Z=$[1],ie=(0,t.useLocalState)(w,"adminLocked",(j==null?void 0:j.admin_locked)===1||!1),ne=ie[0],se=ie[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function ve(Ve,ge){return W(ge)}return ve}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:K,maxLength:"128",onInput:function(){function ve(Ve,ge){return G(ge)}return ve}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Q,maxLength:"512",rows:"4",onInput:function(){function ve(Ve,ge){return Z(ge)}return ve}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function ve(){return x(P?"eject_photo":"attach_photo")}return ve}()}),!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"})]}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:ne,icon:ne?"lock":"lock-open",content:ne?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function ve(){return se(!ne)}return ve}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!j,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function ve(){x("clear_wanted_notice"),(0,y.modalClose)(w)}return ve}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||K.trim().length===0||Q.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function ve(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:K.substr(0,127),description:Q.substr(0,511),admin_locked:ne?1:0})}return ve}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",g),(0,y.modalRegisterBodyOverride)("manage_channel",g),(0,y.modalRegisterBodyOverride)("create_story",V),(0,y.modalRegisterBodyOverride)("wanted_notice",S)},48286:function(T,r,n){"use strict";r.__esModule=!0,r.Noticeboard=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=r.Noticeboard=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data,p=c.papers;return(0,e.createComponentVNode)(2,m.Window,{width:600,height:300,theme:"noticeboard",children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:p.map(function(u){return(0,e.createComponentVNode)(2,o.Stack.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){function d(){return i("interact",{paper:u.ref})}return d}(),onContextMenu:function(){function d(s){s.preventDefault(),i("showFull",{paper:u.ref})}return d}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,fontSize:.75,title:u.name,children:(0,a.decodeHtmlEntities)(u.contents)})},u.ref)})})})})}return y}()},41166:function(T,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.NuclearBomb=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return i.extended?(0,e.createComponentVNode)(2,o.Window,{width:350,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authdisk?"eject":"id-card",selected:i.authdisk,content:i.diskname?i.diskname:"-----",tooltip:i.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return C("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!i.authdisk,selected:i.authcode,content:i.codemsg,onClick:function(){function c(){return C("code")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.anchored?"check":"times",selected:i.anchored,disabled:!i.authdisk,content:i.anchored?"YES":"NO",onClick:function(){function c(){return C("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:i.time,disabled:!i.authfull,tooltip:"Set Timer",onClick:function(){function c(){return C("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.safety?"check":"times",selected:i.safety,disabled:!i.authfull,content:i.safety?"ON":"OFF",tooltip:i.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return C("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(i.timer,"bomb"),disabled:i.safety||!i.authfull,color:"red",content:i.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return C("toggle_armed")}return c}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:350,height:115,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function c(){return C("deploy")}return c}()})})})})}return b}()},52416:function(T,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(92986),m=n(72253),b=n(36036),y=n(98595),B=r.NumberInputModal=function(){function C(i,c){var p=(0,m.useBackend)(c),u=p.act,d=p.data,s=d.init_value,l=d.large_buttons,h=d.message,N=h===void 0?"":h,v=d.timeout,f=d.title,g=(0,m.useLocalState)(c,"input",s),V=g[0],S=g[1],I=function(){function A(x){x!==V&&S(x)}return A}(),L=function(){function A(x){x!==V&&S(x)}return A}(),w=140+Math.max(Math.ceil(N.length/3),N.length>0&&l?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:f,width:270,height:w,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&u("submit",{entry:V}),E===o.KEY_ESCAPE&&u("cancel")}return A}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:N})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{input:V,onClick:L,onChange:I})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return C}(),k=function(i,c){var p=(0,m.useBackend)(c),u=p.act,d=p.data,s=d.min_value,l=d.max_value,h=d.init_value,N=d.round_value,v=i.input,f=i.onClick,g=i.onChange,V=Math.round(v!==s?Math.max(v/2,s):l/2),S=v===s&&s>0||v===1;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===s,icon:"angle-double-left",onClick:function(){function I(){return f(s)}return I}(),tooltip:v===s?"Min":"Min ("+s+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!N,minValue:s,maxValue:l,onChange:function(){function I(L,w){return g(w)}return I}(),onEnter:function(){function I(L,w){return u("submit",{entry:w})}return I}(),value:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===l,icon:"angle-double-right",onClick:function(){function I(){return f(l)}return I}(),tooltip:v===l?"Max":"Max ("+l+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:S,icon:"divide",onClick:function(){function I(){return f(V)}return I}(),tooltip:S?"Split":"Split ("+V+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===h,icon:"redo",onClick:function(){function I(){return f(h)}return I}(),tooltip:h?"Reset ("+h+")":"Reset"})})]})}},1218:function(T,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(98595),m=n(36036),b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],C=r.OperatingComputer=function(){function u(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.hasOccupant,f=N.choice,g;return f?g=(0,e.createComponentVNode)(2,p):g=v?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Tabs,{children:[(0,e.createComponentVNode)(2,m.Tabs.Tab,{selected:!f,icon:"user",onClick:function(){function V(){return h("choiceOff")}return V}(),children:"Patient"}),(0,e.createComponentVNode)(2,m.Tabs.Tab,{selected:!!f,icon:"cog",onClick:function(){function V(){return h("choiceOn")}return V}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,children:g})})]})})})}return u}(),i=function(d,s){var l=(0,t.useBackend)(s),h=l.data,N=h.occupant;return(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Name",children:N.name}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Status",color:b[N.stat][0],children:b[N.stat][1]}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:N.maxHealth,value:N.health/N.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(v,f){return(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:v[0]+" Damage",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:"100",value:N[v[1]]/100,ranges:B,children:(0,a.round)(N[v[1]])},f)},f)}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:N.maxTemp,value:N.bodyTemperature/N.maxTemp,color:k[N.temperatureSuitability+3],children:[(0,a.round)(N.btCelsius),"\xB0C, ",(0,a.round)(N.btFaren),"\xB0F"]})}),!!N.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:N.bloodMax,value:N.bloodLevel/N.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[N.bloodPercent,"%, ",N.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Pulse",children:[N.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Current Procedure",level:"2",children:N.inSurgery?(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Procedure",children:N.surgeryName}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Next Step",children:N.stepName})]}):(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},p=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.verbose,f=N.health,g=N.healthAlarm,V=N.oxy,S=N.oxyAlarm,I=N.crit;return(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,m.Button,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"On":"Off",onClick:function(){function L(){return h(v?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,m.Button,{selected:f,icon:f?"toggle-on":"toggle-off",content:f?"On":"Off",onClick:function(){function L(){return h(f?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,m.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:g,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return h("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,m.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function L(){return h(V?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,m.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:S,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return h("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,m.Button,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"On":"Off",onClick:function(){function L(){return h(I?"critOff":"critOn")}return L}()})})]})}},46892:function(T,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(35840);function y(l,h){var N=typeof Symbol!="undefined"&&l[Symbol.iterator]||l["@@iterator"];if(N)return(N=N.call(l)).next.bind(N);if(Array.isArray(l)||(N=B(l))||h&&l&&typeof l.length=="number"){N&&(l=N);var v=0;return function(){return v>=l.length?{done:!0}:{done:!1,value:l[v++]}}}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 B(l,h){if(l){if(typeof l=="string")return k(l,h);var N={}.toString.call(l).slice(8,-1);return N==="Object"&&l.constructor&&(N=l.constructor.name),N==="Map"||N==="Set"?Array.from(l):N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?k(l,h):void 0}}function k(l,h){(h==null||h>l.length)&&(h=l.length);for(var N=0,v=Array(h);NN},p=function(h,N){var v=h.name,f=N.name;if(!v||!f)return 0;var g=v.match(C),V=f.match(C);if(g&&V&&v.replace(C,"")===f.replace(C,"")){var S=parseInt(g[1],10),I=parseInt(V[1],10);return S-I}return c(v,f)},u=function(h,N){var v=h.searchText,f=h.source,g=h.title,V=h.color,S=h.sorted,I=f.filter(i(v));return S&&I.sort(p),f.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:g+" - ("+f.length+")",children:I.map(function(L){return(0,e.createComponentVNode)(2,d,{thing:L,color:V},L.name)})})},d=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=h.color,V=h.thing;return(0,e.createComponentVNode)(2,o.Button,{color:g,tooltip:V.assigned_role?(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",mr:"0.5em",className:(0,b.classes)(["orbit_job16x16",V.assigned_role_sprite])})," ",V.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){function S(){return f("orbit",{ref:V.ref})}return S}(),children:[V.name,V.orbiters&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,children:["(",V.orbiters," ",(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),")"]})]})},s=r.Orbit=function(){function l(h,N){for(var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.alive,S=g.antagonists,I=g.highlights,L=g.response_teams,w=g.tourist,A=g.auto_observe,x=g.dead,E=g.ssd,P=g.ghosts,j=g.misc,M=g.npcs,O=(0,t.useLocalState)(N,"searchText",""),D=O[0],F=O[1],W={},U=y(S),K;!(K=U()).done;){var G=K.value;W[G.antag]===void 0&&(W[G.antag]=[]),W[G.antag].push(G)}var $=Object.entries(W);$.sort(function(Z,ie){return c(Z[0],ie[0])});var Q=function(){function Z(ie){for(var ne=0,se=[$.map(function(ge){var Ce=ge[0],oe=ge[1];return oe}),w,I,V,P,E,x,M,j];ne0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:$.map(function(Z){var ie=Z[0],ne=Z[1];return(0,e.createComponentVNode)(2,o.Section,{title:ie+" - ("+ne.length+")",level:2,children:ne.filter(i(D)).sort(p).map(function(se){return(0,e.createComponentVNode)(2,d,{color:"bad",thing:se},se.name)})},ie)})}),I.length>0&&(0,e.createComponentVNode)(2,u,{title:"Highlights",source:I,searchText:D,color:"teal"}),(0,e.createComponentVNode)(2,u,{title:"Response Teams",source:L,searchText:D,color:"purple"}),(0,e.createComponentVNode)(2,u,{title:"Tourists",source:w,searchText:D,color:"violet"}),(0,e.createComponentVNode)(2,u,{title:"Alive",source:V,searchText:D,color:"good"}),(0,e.createComponentVNode)(2,u,{title:"Ghosts",source:P,searchText:D,color:"grey"}),(0,e.createComponentVNode)(2,u,{title:"SSD",source:E,searchText:D,color:"grey"}),(0,e.createComponentVNode)(2,u,{title:"Dead",source:x,searchText:D,sorted:!1}),(0,e.createComponentVNode)(2,u,{title:"NPCs",source:M,searchText:D,sorted:!1}),(0,e.createComponentVNode)(2,u,{title:"Misc",source:j,searchText:D,sorted:!1})]})})}return l}()},15421:function(T,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=n(9394);function y(l){if(l==null)throw new TypeError("Cannot destructure "+l)}var B=(0,b.createLogger)("OreRedemption"),k=function(h){return h.toLocaleString("en-US")+" pts"},C=r.OreRedemption=function(){function l(h,N){return(0,e.createComponentVNode)(2,m.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,p)]})})})}return l}(),i=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.id,S=g.points,I=g.disk,L=Object.assign({},(y(h),h));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:S>0?"good":"grey",bold:S>0&&"good",children:k(S)})}),(0,e.createComponentVNode)(2,o.Divider),I?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:I.name,tooltip:"Ejects the design disk.",onClick:function(){function w(){return f("eject_disk")}return w}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!I.design||!I.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function w(){return f("download")}return w}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:I.design&&(I.compatible?"good":"bad"),children:I.design||"N/A"})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},c=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.sheets,S=Object.assign({},(y(h),h));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,u,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,d,{ore:I},I.id)})]})))})},p=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.alloys,S=Object.assign({},(y(h),h));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,u,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,s,{ore:I},I.id)})]})))})},u=function(h,N){var v;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:h.title}),(v=h.columns)==null?void 0:v.map(function(f){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:f[1],textAlign:"center",color:"label",bold:!0,children:f[0]},f)})]})})},d=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=h.ore;if(!(g.value&&g.amount<=0&&!(["metal","glass"].indexOf(g.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",g.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:g.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:g.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(g.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return f(g.value?"sheet":"alloy",{id:g.id,amount:I})}return V}()})})]})})},s=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=h.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",g.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:g.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:g.amount>=1?"good":"gray",align:"center",children:g.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(g.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return f(g.value?"sheet":"alloy",{id:g.id,amount:I})}return V}()})})]})})}},52754:function(T,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(71253),b=n(70752),y=function(C){var i;try{i=b("./"+C+".js")}catch(p){if(p.code==="MODULE_NOT_FOUND")return(0,m.routingError)("notFound",C);throw p}var c=i[C];return c||(0,m.routingError)("missingExport",C)},B=r.PAI=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.app_template,s=u.app_icon,l=u.app_title,h=y(d);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{p:1,fill:!0,scrollable:!0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s,mr:1}),l,d!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function N(){return p("Back")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function N(){return p("MASTER_back")}return N}()})],4)]}),children:(0,e.createComponentVNode)(2,h)})})})})})}return k}()},85175:function(T,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(71253),b=n(59395),y=function(c){var p;try{p=b("./"+c+".js")}catch(d){if(d.code==="MODULE_NOT_FOUND")return(0,m.routingError)("notFound",c);throw d}var u=p[c];return u||(0,m.routingError)("missingExport",c)},B=r.PDA=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.app,h=s.owner;if(!h)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var N=y(l.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:l.icon,mr:1}),l.name]}),children:(0,e.createComponentVNode)(2,N)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,C)})]})})})}return i}(),k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.idInserted,h=s.idLink,N=s.stationTime,v=s.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function f(){return d("Authenticate")}return f}(),content:l?h:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function f(){return d("Eject")}return f}(),content:v?["Eject "+v]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:N})]})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!l.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function h(){return d("Back")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:l.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.is_home?"disabled":"white",icon:"home",onClick:function(){function h(){d("Home")}return h}()})})]})})}},68654:function(T,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(49968),b=r.Pacman=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.active,u=c.anchored,d=c.broken,s=c.emagged,l=c.fuel_type,h=c.fuel_usage,N=c.fuel_stored,v=c.fuel_cap,f=c.is_ai,g=c.tmp_current,V=c.tmp_max,S=c.tmp_overheat,I=c.output_max,L=c.power_gen,w=c.output_set,A=c.has_fuel,x=N/v,E=g/V,P=w*L,j=Math.round(N/h),M=Math.round(j/60),O=j>120?M+" minutes":j+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(d||!u)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!d&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!d&&!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!d&&!!u&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:p?"power-off":"times",content:p?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:p,onClick:function(){function D(){return i("toggle_power")}return D}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:w,minValue:1,maxValue:I*(s?2.5:1),step:1,className:"mt-1",onDrag:function(){function D(F,W){return i("change_power",{change_power:W})}return D}()}),"(",(0,m.formatPower)(P),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[g," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[S>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),S>20&&S<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),S>1&&S<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),S===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:p||f||!A,onClick:function(){function D(){return i("eject_fuel")}return D}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(N/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[h/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(h?O:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return y}()},1701:function(T,r,n){"use strict";r.__esModule=!0,r.PanDEMIC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.PanDEMIC=function(){function u(d,s){var l=(0,a.useBackend)(s),h=l.data,N=h.beakerLoaded,v=h.beakerContainsBlood,f=h.beakerContainsVirus,g=h.resistances,V=g===void 0?[]:g,S;return N?v?v&&!f&&(S=(0,e.createFragment)([(0,e.createTextVNode)("No disease detected in provided blood sample.")],4)):S=(0,e.createFragment)([(0,e.createTextVNode)("No blood sample found in the loaded container.")],4):S=(0,e.createFragment)([(0,e.createTextVNode)("No container loaded.")],4),(0,e.createComponentVNode)(2,o.Window,{width:575,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[S&&!f?(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b,{fill:!0,vertical:!0}),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:S})}):(0,e.createComponentVNode)(2,k),(V==null?void 0:V.length)>0&&(0,e.createComponentVNode)(2,p,{align:"bottom"})]})})})}return u}(),b=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.beakerLoaded;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function f(){return h("eject_beaker")}return f}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!v,onClick:function(){function f(){return h("destroy_eject_beaker")}return f}()})],4)},y=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.beakerContainsVirus,f=d.strain,g=f.commonName,V=f.description,S=f.diseaseAgent,I=f.bloodDNA,L=f.bloodType,w=f.possibleTreatments,A=f.transmissionRoute,x=f.isAdvanced,E=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",children:I?(0,e.createVNode)(1,"span",null,I,0,{style:{"font-family":"'Courier New', monospace"}}):"Undetectable"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:L!=null?L:"Undetectable"}})})],4);if(!v)return(0,e.createComponentVNode)(2,t.LabeledList,{children:E});var P;return x&&(g!=null&&g!=="Unknown"?P=(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print Release Forms",onClick:function(){function j(){return h("print_release_forms",{strain_index:d.strainIndex})}return j}(),style:{"margin-left":"auto"}}):P=(0,e.createComponentVNode)(2,t.Button,{icon:"pen",content:"Name Disease",onClick:function(){function j(){return h("name_strain",{strain_index:d.strainIndex})}return j}(),style:{"margin-left":"auto"}})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Common Name",className:"common-name-label",children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,align:"center",children:[g!=null?g:"Unknown",P]})}),V&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:V}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Disease Agent",children:S}),E,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Spread Vector",children:A!=null?A:"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Possible Cures",children:w!=null?w:"None"})]})},B=function(d,s){var l,h=(0,a.useBackend)(s),N=h.act,v=h.data,f=!!v.synthesisCooldown,g=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:f?"spinner":"clone",iconSpin:f,content:"Clone",disabled:f,onClick:function(){function V(){return N("clone_strain",{strain_index:d.strainIndex})}return V}()}),d.sectionButtons],0);return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:(l=d.sectionTitle)!=null?l:"Strain Information",buttons:g,children:(0,e.createComponentVNode)(2,y,{strain:d.strain,strainIndex:d.strainIndex})})})},k=function(d,s){var l,h=(0,a.useBackend)(s),N=h.act,v=h.data,f=v.selectedStrainIndex,g=v.strains,V=g[f-1];if(g.length===0)return(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No disease detected in provided blood sample."})});if(g.length===1){var S;return(0,e.createFragment)([(0,e.createComponentVNode)(2,B,{strain:g[0],strainIndex:1,sectionButtons:(0,e.createComponentVNode)(2,b)}),((S=g[0].symptoms)==null?void 0:S.length)>0&&(0,e.createComponentVNode)(2,i,{strain:g[0]})],0)}var I=(0,e.createComponentVNode)(2,b);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Culture Information",fill:!0,buttons:I,children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",style:{height:"100%"},children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:g.map(function(L,w){var A;return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"virus",selected:f-1===w,onClick:function(){function x(){return N("switch_strain",{strain_index:w+1})}return x}(),children:(A=L.commonName)!=null?A:"Unknown"},w)})})}),(0,e.createComponentVNode)(2,B,{strain:V,strainIndex:f}),((l=V.symptoms)==null?void 0:l.length)>0&&(0,e.createComponentVNode)(2,i,{className:"remove-section-bottom-padding",strain:V})]})})})},C=function(d){return d.reduce(function(s,l){return s+l},0)},i=function(d){var s=d.strain.symptoms;return(0,e.createComponentVNode)(2,t.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Infection Symptoms",fill:!0,className:d.className,children:(0,e.createComponentVNode)(2,t.Table,{className:"symptoms-table",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stealth"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Resistance"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stage Speed"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Transmissibility"})]}),s.map(function(l,h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.stealth}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.resistance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.stageSpeed}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.transmissibility})]},h)}),(0,e.createComponentVNode)(2,t.Table.Row,{className:"table-spacer"}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"font-weight":"bold"},children:"Total"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.stealth}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.resistance}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.stageSpeed}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.transmissibility}))})]})]})})})},c=["flask","vial","eye-dropper"],p=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.synthesisCooldown,f=N.beakerContainsVirus,g=N.resistances;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Antibodies",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,wrap:!0,children:g.map(function(V,S){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:c[S%c.length],disabled:!!v,onClick:function(){function I(){return h("clone_vaccine",{resistance_index:S+1})}return I}(),mr:"0.5em"}),V]},S)})})})})}},67921:function(T,r,n){"use strict";r.__esModule=!0,r.ParticleAccelerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ParticleAccelerator=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.assembled,p=i.power,u=i.strength,d=i.max_strength;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:160,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Connect",onClick:function(){function s(){return C("scan")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",mb:"5px",children:(0,e.createComponentVNode)(2,t.Box,{color:c?"good":"bad",children:c?"Operational":"Error: Verify Configuration"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:!c,onClick:function(){function s(){return C("power")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!c||u===0,onClick:function(){function s(){return C("remove_strength")}return s}(),mr:"4px"}),u,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!c||u===d,onClick:function(){function s(){return C("add_strength")}return s}(),ml:"4px"})]})]})})})})}return b}()},71432:function(T,r,n){"use strict";r.__esModule=!0,r.PdaPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.PdaPainter=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:u?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,b)})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"download",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){function u(){return p("insert_pda")}return u}()})]})})})},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.pda_colors;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,B)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Table,{className:"PdaPainter__list",children:Object.keys(d).map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function l(){return p("choose_pda",{selectedPda:s})}return l}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+d[s][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s})]},s)})})})})]})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.current_appearance,s=u.preview_appearance;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Current PDA",children:[(0,e.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","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){function l(){return p("eject_pda")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function l(){return p("paint_pda")}return l}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Preview",children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})})]})}},33388:function(T,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.PersonalCrafting=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.busy,d=p.category,s=p.display_craftable_only,l=p.display_compact,h=p.prev_cat,N=p.next_cat,v=p.subcategory,f=p.prev_subcat,g=p.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:d,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:s?"check-square-o":"square-o",selected:s,onClick:function(){function V(){return c("toggle_recipes")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:l?"check-square-o":"square-o",selected:l,onClick:function(){function V(){return c("toggle_compact")}return V}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function V(){return c("backwardCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function V(){return c("forwardCat")}return V}()})]}),v&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:f,icon:"arrow-left",onClick:function(){function V(){return c("backwardSubCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:g,icon:"arrow-right",onClick:function(){function V(){return c("forwardSubCat")}return V}()})]}),l?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})]})})}return B}(),b=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.display_craftable_only,d=p.can_craft,s=p.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return c("make",{make:l.ref})}return h}()}),l.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:l.req_text,content:"Requirements",color:"transparent"}),l.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.tool_text,content:"Tools",color:"transparent"})]},l.name)}),!u&&s.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),l.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:l.req_text,content:"Requirements",color:"transparent"}),l.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.tool_text,content:"Tools",color:"transparent"})]},l.name)})]})})},y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.display_craftable_only,d=p.can_craft,s=p.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[d.map(function(l){return(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return c("make",{make:l.ref})}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[l.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:l.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:l.req_text}),l.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:l.tool_text})]})},l.name)}),!u&&s.map(function(l){return(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[l.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:l.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:l.req_text}),l.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:l.tool_text})]})},l.name)})]})}},56150:function(T,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Photocopier=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:440,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Photocopier",color:"silver",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Copies:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"2em",bold:!0,children:p.copynumber}),(0,e.createComponentVNode)(2,t.Stack.Item,{float:"right",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"minus",textAlign:"center",content:"",onClick:function(){function u(){return c("minus")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function u(){return c("add")}return u}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Toner:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,children:p.toner})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Document:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!p.copyitem&&!p.mob,content:p.copyitem?p.copyitem:p.mob?p.mob+"'s ass!":"document",onClick:function(){function u(){return c("removedocument")}return u}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Folder:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!p.folder,content:p.folder?p.folder:"folder",onClick:function(){function u(){return c("removefolder")}return u}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,y)]})})})}return B}(),b=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function d(){return c("copy")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function d(){return c("scandocument")}return d}()}),!!u&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){function d(){return c("ai_text")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function d(){return c("ai_pic")}return d}()})],4)],0)},y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:p.files.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:p.toner<=0,onClick:function(){function d(){return c("filecopy",{uid:u.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function d(){return c("deletefile",{uid:u.uid})}return d}()})]})},u.name)})})}},8340:function(T,r,n){"use strict";r.__esModule=!0,r.Photocopier220=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(88510),b=n(64795),y=n(25328);function B(p,u){var d=typeof Symbol!="undefined"&&p[Symbol.iterator]||p["@@iterator"];if(d)return(d=d.call(p)).next.bind(d);if(Array.isArray(p)||(d=k(p))||u&&p&&typeof p.length=="number"){d&&(p=d);var s=0;return function(){return s>=p.length?{done:!0}:{done:!1,value:p[s++]}}}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 k(p,u){if(p){if(typeof p=="string")return C(p,u);var d={}.toString.call(p).slice(8,-1);return d==="Object"&&p.constructor&&(d=p.constructor.name),d==="Map"||d==="Set"?Array.from(p):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?C(p,u):void 0}}function C(p,u){(u==null||u>p.length)&&(u=p.length);for(var d=0,s=Array(u);dp?this.substring(0,p)+"...":this};var i=function(u,d){d===void 0&&(d="");var s=(0,y.createSearch)(d,function(l){return l.altername});return(0,b.flow)([(0,m.filter)(function(l){return l==null?void 0:l.altername}),d&&(0,m.filter)(s),(0,m.sortBy)(function(l){return l.id})])(u)},c=r.Photocopier220=function(){function p(u,d){for(var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.copies,v=h.maxcopies,f=(0,a.useLocalState)(d,"searchText",""),g=f[0],V=f[1],S=i((0,m.sortBy)(function(M){return M.category})(h.forms||[]),g),I=[],L=B(S),w;!(w=L()).done;){var A=w.value;I.includes(A.category)||I.push(A.category)}var x=(0,a.useLocalState)(d,"number",0),E=x[0],P=x[1],j;return h.category===""?j=S:j=S.filter(function(M){return M.category===h.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:h.ui_theme,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"40%",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mt:.3,color:"grey",children:"\u0417\u0430\u0440\u044F\u0434 \u0442\u043E\u043D\u0435\u0440\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{minValue:0,maxValue:30,value:h.toner})})]}),(0,e.createComponentVNode)(2,t.Stack,{mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mb:.3,color:"grey",children:"\u0424\u043E\u0440\u043C\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",textAlign:"center",bold:!0,children:h.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":h.form_id})]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!h.copyitem&&!h.mob,icon:h.copyitem||h.mob?"eject":"times",content:h.copyitem?h.copyitem:h.mob?"\u0416\u043E\u043F\u0430 "+h.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function M(){return l("removedocument")}return M}()})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!h.folder,icon:h.folder?"eject":"times",content:h.folder?h.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function M(){return l("removefolder")}return M}()})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:h.toner===0||h.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function M(){return l("print_form")}return M}()})}),!!h.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:h.toner<5,content:"\u0424\u043E\u0442\u043E",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0444\u043E\u0442\u043E \u0441 \u0411\u0430\u0437\u044B \u0414\u0430\u043D\u043D\u044B\u0445",onClick:function(){function M(){return l("ai_pic")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041A\u043E\u043F\u0438\u044F",disabled:h.toner===0||!h.copyitem&&!h.mob,onClick:function(){function M(){return l("copy")}return M}()})}),!!h.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043A\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0442\u0435\u043A\u0441\u0442",disabled:h.toner===0,onClick:function(){function M(){return l("ai_text")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:1.5,mt:1.2,width:"50%",color:"grey",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"}),(0,e.createComponentVNode)(2,t.Slider,{mt:.75,width:"50%",animated:!0,minValue:1,maxValue:v,value:N,stepPixelSize:10,onChange:function(){function M(O,D){return l("copies",{new:D})}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0411\u044E\u0440\u043E\u043A\u0440\u0430\u0442\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:-.5,icon:"chevron-right",color:"transparent",content:"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",selected:!h.category,onClick:function(){function M(){return l("choose_category",{category:""})}return M}()})}),I.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"chevron-right",mb:-.5,color:"transparent",content:M,selected:h.category===M,onClick:function(){function O(){return l("choose_category",{category:M})}return O}()},M)},M)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:h.category||"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",buttons:(0,e.createComponentVNode)(2,t.Input,{mr:18.5,width:"100%",placeholder:"\u041F\u043E\u0438\u0441\u043A \u0444\u043E\u0440\u043C\u044B",onInput:function(){function M(O,D){return V(D)}return M}()}),children:j.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:M.altername.trimLongStr(37),tooltip:M.altername,selected:h.form_id===M.id,onClick:function(){function O(){return l("choose_form",{path:M.path,id:M.id})}return O}()})},M.path)})})})]})})})}return p}()},84676:function(T,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=["tempKey"];function b(C,i){if(C==null)return{};var c={};for(var p in C)if({}.hasOwnProperty.call(C,p)){if(i.includes(p))continue;c[p]=C[p]}return c}var y={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}},B=function(i,c){var p=i.tempKey,u=b(i,m),d=y[p];if(!d)return null;var s=(0,a.useBackend)(c),l=s.data,h=s.act,N=l.currentTemp,v=d.label,f=d.icon,g=p===N,V=function(){h("setTemp",{temp:p})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:g,onClick:V},u,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:f}),v]})))},k=r.PoolController=function(){function C(i,c){for(var p=(0,a.useBackend)(c),u=p.data,d=u.emagged,s=u.currentTemp,l=y[s]||y.normal,h=l.label,N=l.color,v=[],f=0,g=Object.entries(y);f50?"battery-half":"battery-quarter")||N==="C"&&"bolt"||N==="F"&&"battery-full"||N==="M"&&"slash",color:N==="N"&&(v>50?"yellow":"red")||N==="C"&&"yellow"||N==="F"&&"green"||N==="M"&&"orange"}),(0,e.createComponentVNode)(2,B.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(v)+"%"})],4)};d.defaultHooks=m.pureComponentHooks;var s=function(h){var N,v,f=h.status;switch(f){case"AOn":N=!0,v=!0;break;case"AOff":N=!0,v=!1;break;case"On":N=!1,v=!0;break;case"Off":N=!1,v=!1;break}var g=(v?"On":"Off")+(" ["+(N?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,B.ColorBox,{color:v?"good":"bad",content:N?void 0:"M",title:g})};s.defaultHooks=m.pureComponentHooks},50992:function(T,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(29319),m=n(3939),b=n(321),y=n(5485),B=n(98595),k=r.PrisonerImplantManager=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.loginState,l=d.prisonerInfo,h=d.chemicalInfo,N=d.trackingInfo,v;if(!s.logged_in)return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.LoginScreen)})});var f=[1,5,10];return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.name?"eject":"id-card",selected:l.name,content:l.name?l.name:"-----",tooltip:l.name?"Eject ID":"Insert ID",onClick:function(){function g(){return u("id_card")}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[l.points!==null?l.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:l.points===null,content:"Reset",onClick:function(){function g(){return u("reset_points")}return g}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[l.goal!==null?l.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:l.goal===null,content:"Edit",onClick:function(){function g(){return(0,m.modalOpen)(c,"set_points")}return g}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:l.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:N.map(function(g){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",g.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:g.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:g.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function V(){return(0,m.modalOpen)(c,"warn",{uid:g.uid})}return V}()})})]})]},g.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:h.map(function(g){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",g.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:g.volume})}),f.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:g.volumec;return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:!0,asset:["prize_counter64x64",g.imageID],title:g.name,buttonsAlt:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{bold:!0,translucent:!0,fontSize:1.5,tooltip:V&&"Not enough tickets",disabled:V,onClick:function(){function S(){return C("purchase",{purchase:g.itemID})}return S}(),children:[g.cost,(0,e.createComponentVNode)(2,t.Icon,{m:0,mt:.25,name:"ticket",color:V?"bad":"good",size:1.6})]}),children:g.desc},g.name)})})})})})})}return b}()},94813:function(T,r,n){"use strict";r.__esModule=!0,r.RCD=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=n(49148),y=r.RCD=function(){function u(d,s){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:670,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return u}(),B=function(d,s){var l=(0,a.useBackend)(s),h=l.data,N=h.matter,v=h.max_matter,f=v*.7,g=v*.25;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Matter Storage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[f,1/0],average:[g,f],bad:[-1/0,g]},value:N,maxValue:v,children:(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:N+" / "+v+" units"})})})})},k=function(){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Construction Type",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,C,{mode_type:"Floors and Walls"}),(0,e.createComponentVNode)(2,C,{mode_type:"Airlocks"}),(0,e.createComponentVNode)(2,C,{mode_type:"Windows"}),(0,e.createComponentVNode)(2,C,{mode_type:"Deconstruction"})]})})})},C=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=d.mode_type,f=N.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",content:v,selected:f===v?1:0,onClick:function(){function g(){return h("mode",{mode:v})}return g}()})})},i=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.door_name,f=N.electrochromic,g=N.airlock_glass;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Airlock Settings",children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,e.createFragment)([(0,e.createTextVNode)("Rename: "),(0,e.createVNode)(1,"b",null,v,0)],0),onClick:function(){function V(){return(0,m.modalOpen)(s,"renameAirlock")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:g===1&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:f?"toggle-on":"toggle-off",content:"Electrochromic",selected:f,onClick:function(){function V(){return h("electrochromic")}return V}()})})]})})})},c=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.tab,f=N.locked,g=N.one_access,V=N.selected_accesses,S=N.regions;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"cog",selected:v===1,onClick:function(){function I(){return h("set_tab",{tab:1})}return I}(),children:"Airlock Types"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===2,icon:"list",onClick:function(){function I(){return h("set_tab",{tab:2})}return I}(),children:"Airlock Access"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v===1?(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Types",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p,{check_number:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p,{check_number:1})})]})}):v===2&&f?(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Access",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock-open",content:"Unlock",onClick:function(){function I(){return h("set_lock",{new_lock:"unlock"})}return I}()}),children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Airlock access selection is currently locked."]})})}):(0,e.createComponentVNode)(2,b.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock",content:"Lock",onClick:function(){function I(){return h("set_lock",{new_lock:"lock"})}return I}()}),usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:g,content:"One",onClick:function(){function I(){return h("set_one_access",{access:"one"})}return I}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!g,width:4,content:"All",onClick:function(){function I(){return h("set_one_access",{access:"all"})}return I}()})],4),accesses:S,selectedList:V,accessMod:function(){function I(L){return h("set",{access:L})}return I}(),grantAll:function(){function I(){return h("grant_all")}return I}(),denyAll:function(){function I(){return h("clear_all")}return I}(),grantDep:function(){function I(L){return h("grant_region",{region:L})}return I}(),denyDep:function(){function I(L){return h("deny_region",{region:L})}return I}()})})],4)},p=function(d,s){for(var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.door_types_ui_list,f=N.door_type,g=d.check_number,V=[],S=0;S=m?w=(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"There are new messages"}):S===B?w=(0,e.createComponentVNode)(2,t.Blink,{children:(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"NEW PRIORITY MESSAGES"})}):w=(0,e.createComponentVNode)(2,t.Box,{color:"label",mb:1,children:"There are no new messages"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,e.createComponentVNode)(2,t.Button,{width:9,content:L?"Speaker Off":"Speaker On",selected:!L,icon:L?"volume-mute":"volume-up",onClick:function(){function A(){return g("toggleSilent")}return A}()}),children:[w,(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Messages",icon:S>m?"envelope-open-text":"envelope",onClick:function(){function A(){return g("setScreen",{setScreen:6})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Assistance",icon:"hand-paper",onClick:function(){function A(){return g("setScreen",{setScreen:1})}return A}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Supplies",icon:"box",onClick:function(){function A(){return g("setScreen",{setScreen:2})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Secondary Goal",icon:"clipboard-list",onClick:function(){function A(){return g("setScreen",{setScreen:11})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Relay Anonymous Information",icon:"comment",onClick:function(){function A(){return g("setScreen",{setScreen:3})}return A}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Print Shipping Label",icon:"tag",onClick:function(){function A(){return g("setScreen",{setScreen:9})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function A(){return g("setScreen",{setScreen:10})}return A}()})]})}),!!I&&(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function A(){return g("setScreen",{setScreen:8})}return A}()})})]})})},i=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.department,I=[],L;switch(N.purpose){case"ASSISTANCE":I=V.assist_dept,L="Request assistance from another department";break;case"SUPPLIES":I=V.supply_dept,L="Request supplies from another department";break;case"INFO":I=V.info_dept,L="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:L,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return g("setScreen",{setScreen:0})}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:I.filter(function(w){return w!==S}).map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function A(){return g("writeInput",{write:w,priority:y})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function A(){return g("writeInput",{write:w,priority:B})}return A}()})]},w)})})})})},c=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S;switch(N.type){case"SUCCESS":S="Message sent successfully";break;case"FAIL":S="Unable to contact messaging server";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:S,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function I(){return g("setScreen",{setScreen:0})}return I}()})})},p=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S,I;switch(N.type){case"MESSAGES":S=V.message_log,I="Message Log";break;case"SHIPPING":S=V.shipping_log,I="Shipping label print log";break}return S.reverse(),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:I,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return g("setScreen",{setScreen:0})}return L}()}),children:S.map(function(L){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"left",children:[L.map(function(w,A){return(0,e.createVNode)(1,"div",null,w,0,null,A)}),(0,e.createVNode)(1,"hr")]},L)})})})},u=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.recipient,I=V.message,L=V.msgVerified,w=V.msgStamped;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function A(){return g("setScreen",{setScreen:0})}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:w})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function A(){return g("department",{department:S})}return A}()})})})],4)},d=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.message,I=V.announceAuth;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return g("setScreen",{setScreen:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function L(){return g("writeAnnouncement")}return L}()})],4),children:S})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(I&&S),onClick:function(){function L(){return g("sendAnnouncement")}return L}()})]})})],4)},s=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.shipDest,I=V.msgVerified,L=V.ship_dept;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return g("setScreen",{setScreen:0})}return w}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:I})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(S&&I),onClick:function(){function w(){return g("printLabel")}return w}()})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Destinations",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:L.map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:(0,e.createComponentVNode)(2,t.Button,{content:S===w?"Selected":"Select",selected:S===w,onClick:function(){function A(){return g("shipSelect",{shipSelect:w})}return A}()})},w)})})})})],4)},l=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.secondaryGoalAuth,I=V.secondaryGoalEnabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return g("setScreen",{setScreen:0})}return L}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?S?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Request Secondary Goal",icon:"clipboard-list",disabled:!(S&&I),onClick:function(){function L(){return g("requestSecondaryGoal")}return L}()})]})})],4)}},9861:function(T,r,n){"use strict";r.__esModule=!0,r.RndBackupConsole=r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.RndBackupConsole=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.network_name,u=c.has_disk,d=c.disk_name,s=c.linked,l=c.techs,h=c.last_timestamp;return(0,e.createComponentVNode)(2,o.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Device Info",children:[(0,e.createComponentVNode)(2,t.Box,{mb:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Network",children:s?(0,e.createComponentVNode)(2,t.Button,{content:p,icon:"unlink",selected:1,onClick:function(){function N(){return i("unlink")}return N}()}):"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Loaded Disk",children:u?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:d+" (Last backup: "+h+")",icon:"save",selected:1,onClick:function(){function N(){return i("eject_disk")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Save all",onClick:function(){function N(){return i("saveall2disk")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load all",onClick:function(){function N(){return i("saveall2network")}return N}()})],4):"None"})]})}),!!s||(0,e.createComponentVNode)(2,b)]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Section,{title:"Tech Info",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Tech Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Disk Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),Object.keys(l).map(function(N){return!(l[N].network_level>0||l[N].disk_level>0)||(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l[N].name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l[N].network_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l[N].disk_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Load to network",disabled:!u||!s,onClick:function(){function v(){return i("savetech2network",{tech:N})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load to disk",disabled:!u||!s,onClick:function(){function v(){return i("savetech2disk",{tech:N})}return v}()})]})]},N)})]})})})]})})}return y}(),b=r.LinkMenu=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.controllers;return(0,e.createComponentVNode)(2,t.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),p.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function d(){return i("linktonetworkcontroller",{target_controller:u.addr})}return d}()})})]},u.addr)})]})})}return y}()},37556:function(T,r,n){"use strict";r.__esModule=!0,r.DataDiskMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o="design",m="tech",b=function(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.act,l=d.disk_data;return l?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:l.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:l.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function h(){return s("updt_tech")}return h}()})})]}):null},y=function(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.act,l=d.disk_data;if(!l)return null;var h=l.name,N=l.lathe_types,v=l.materials,f=N.join(", ");return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:h}),f?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:f}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),v.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,g.name,0,{style:{"text-transform":"capitalize"}})," x ",g.amount]},g.name)}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function g(){return s("updt_design")}return g}()})})]})},B=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.disk_data;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Section,Object.assign({buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Erase",icon:"eraser",disabled:!l,onClick:function(){function h(){return d("erase_disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",icon:"eject",onClick:function(){function h(){d("eject_disk")}return h}()})],4)},c)))},k=function(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.act,l=d.disk_type,h=d.to_copy,N=c.title;return(0,e.createComponentVNode)(2,B,{title:N,children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:h.sort(function(v,f){return v.name.localeCompare(f.name)}).map(function(v){var f=v.name,g=v.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:f,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function V(){l===m?s("copy_tech",{id:g}):s("copy_design",{id:g})}return V}()})},g)})})})})},C=r.DataDiskMenu=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.data,s=d.disk_type,l=d.disk_data;if(!s)return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",children:"No disk loaded."});switch(s){case o:return l?(0,e.createComponentVNode)(2,B,{title:"Design Disk",children:(0,e.createComponentVNode)(2,y)}):(0,e.createComponentVNode)(2,k,{title:"Design Disk"});case m:return l?(0,e.createComponentVNode)(2,B,{title:"Technology Disk",children:(0,e.createComponentVNode)(2,b)}):(0,e.createComponentVNode)(2,k,{title:"Technology Disk"});default:return(0,e.createFragment)([(0,e.createTextVNode)("UNRECOGNIZED DISK TYPE")],4)}}return i}()},58147:function(T,r,n){"use strict";r.__esModule=!0,r.DeconstructionMenu=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=r.DeconstructionMenu=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.data,c=C.act,p=i.tech_levels,u=i.loaded_item,d=i.linked_destroy;return d?u?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Object Analysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Deconstruct",icon:"microscope",onClick:function(){function s(){c("deconstruct")}return s}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Eject",icon:"eject",onClick:function(){function s(){c("eject_item")}return s}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:u.name})})}),(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Current Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Object Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"New Level"})]}),p.map(function(s){return(0,e.createComponentVNode)(2,b,{techLevel:s},s.id)})]})})],4):(0,e.createComponentVNode)(2,o.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,o.Section,{title:"Deconstruction Menu",children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}return y}(),b=function(B,k){var C=B.techLevel,i=C.name,c=C.desc,p=C.level,u=C.object_level,d=C.ui_icon,s=u!=null,l=s&&u>=p?Math.max(u,p+1):p;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:c})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:d})," ",i]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:p}),s?(0,e.createComponentVNode)(2,o.Table.Cell,{children:u}):(0,e.createComponentVNode)(2,o.Table.Cell,{className:"research-level-no-effect",children:"-"}),(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)([l!==p&&"upgraded-level"]),children:l})]})}},16830:function(T,r,n){"use strict";r.__esModule=!0,r.LatheCategory=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),m=r.LatheCategory=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.data,i=k.act,c=C.category,p=C.matching_designs,u=C.menu,d=u===4,s=d?"build":"imprint";return(0,e.createComponentVNode)(2,t.Section,{title:c,children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,t.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:p.map(function(l){var h=l.id,N=l.name,v=l.can_build,f=l.materials;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:N,disabled:v<1,onClick:function(){function g(){return i(s,{id:h,amount:1})}return g}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function g(){return i(s,{id:h,amount:5})}return g}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function g(){return i(s,{id:h,amount:10})}return g}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.map(function(g){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",g.is_red?"color-red":null,[g.amount,(0,e.createTextVNode)(" "),g.name],0)],0)})})]},h)})})]})}return b}()},70497:function(T,r,n){"use strict";r.__esModule=!0,r.LatheChemicalStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheChemicalStorage=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data,C=B.act,i=k.loaded_chemicals,c=k.menu===4;return(0,e.createComponentVNode)(2,t.Section,{title:"Chemical Storage",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Purge All",icon:"trash",onClick:function(){function p(){var u=c?"disposeallP":"disposeallI";C(u)}return p}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(p){var u=p.volume,d=p.name,s=p.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+u+" of "+d,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function l(){var h=c?"disposeP":"disposeI";C(h,{id:s})}return l}()})},s)})})]})}return m}()},70864:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMainMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),m=n(68198),b=r.LatheMainMenu=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.data,c=C.act,p=i.menu,u=i.categories,d=p===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:d+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,m.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:s,onClick:function(){function l(){c("setCategory",{category:s})}return l}()})},s)})})]})}return y}()},42878:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterialStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterialStorage=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data,C=B.act,i=k.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:i.map(function(c){var p=c.id,u=c.amount,d=c.name,s=function(){function v(f){var g=k.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";C(g,{id:p,amount:f})}return v}(),l=Math.floor(u/2e3),h=u<1,N=l===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:h?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",u," of ",d]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",l," sheet",N,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function v(){return s(1)}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function v(){return s("custom")}return v}()}),u>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function v(){return s(5)}return v}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function v(){return s(50)}return v}()})],0):null})]},p)})})})}return m}()},52662:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterials=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterials=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data,C=k.total_materials,i=k.max_materials,c=k.max_chemicals,p=k.total_chemicals;return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,e.createComponentVNode)(2,t.Table,{width:"auto",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C}),i?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+i}):null]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return m}()},9681:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(12644),m=n(70864),b=n(16830),y=n(42878),B=n(70497),k=["menu"];function C(d,s){if(d==null)return{};var l={};for(var h in d)if({}.hasOwnProperty.call(d,h)){if(s.includes(h))continue;l[h]=d[h]}return l}var i=t.Tabs.Tab,c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.menu===o.MENU.LATHE?["nav_protolathe",v.submenu_protolathe]:["nav_imprinter",v.submenu_imprinter],g=f[0],V=f[1],S=s.menu,I=C(s,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,i,Object.assign({selected:V===S,onClick:function(){function L(){return N(g,{menu:S})}return L}()},I)))},p=function(s){switch(s){case o.PRINTER_MENU.MAIN:return(0,e.createComponentVNode)(2,m.LatheMainMenu);case o.PRINTER_MENU.SEARCH:return(0,e.createComponentVNode)(2,b.LatheCategory);case o.PRINTER_MENU.MATERIALS:return(0,e.createComponentVNode)(2,y.LatheMaterialStorage);case o.PRINTER_MENU.CHEMICALS:return(0,e.createComponentVNode)(2,B.LatheChemicalStorage)}},u=r.LatheMenu=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.menu,f=N.linked_lathe,g=N.linked_imprinter;return v===o.MENU.LATHE&&!f?(0,e.createComponentVNode)(2,t.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):v===o.MENU.IMPRINTER&&!g?(0,e.createComponentVNode)(2,t.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MAIN,icon:"bars",children:"Main Menu"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MATERIALS,icon:"layer-group",children:"Materials"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.CHEMICALS,icon:"flask-vial",children:"Chemicals"})]}),p(N.menu===o.MENU.LATHE?N.submenu_protolathe:N.submenu_imprinter)]})}return d}()},68198:function(T,r,n){"use strict";r.__esModule=!0,r.LatheSearch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheSearch=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function C(i,c){return k("search",{to_search:c})}return C}()})})}return m}()},81421:function(T,r,n){"use strict";r.__esModule=!0,r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),m=r.LinkMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.controllers;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),c.map(function(p){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:p.addr}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:p.net_id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function u(){return C("linktonetworkcontroller",{target_controller:p.addr})}return u}()})})]},p.addr)})]})})})})}return b}()},6256:function(T,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.SettingsMenu=function(){function y(B,k){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,b)]})}return y}(),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.sync,u=c.admin;return(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",align:"flex-start",children:(0,e.createComponentVNode)(2,t.Button,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){function d(){i("unlink")}return d}()})})})},b=function(B,k){var C=(0,a.useBackend)(k),i=C.data,c=C.act,p=i.linked_destroy,u=i.linked_lathe,d=i.linked_imprinter;return(0,e.createComponentVNode)(2,t.Section,{title:"Linked Devices",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){function s(){return c("find_device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destructive Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!p,content:p?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"destroy"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!u,content:u?"Unlink":"Undetected",onClick:function(){function s(){c("disconnect",{item:"lathe"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Circuit Imprinter",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!d,content:d?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"imprinter"})}return s}()})})]})})}},12644:function(T,r,n){"use strict";r.__esModule=!0,r.RndConsole=r.PRINTER_MENU=r.MENU=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),m=n(35840),b=n(37556),y=n(9681),B=n(81421),k=n(6256),C=n(58147),i=["menu"];function c(f,g){if(f==null)return{};var V={};for(var S in f)if({}.hasOwnProperty.call(f,S)){if(g.includes(S))continue;V[S]=f[S]}return V}var p=o.Tabs.Tab,u=r.MENU={MAIN:0,DISK:2,DESTROY:3,LATHE:4,IMPRINTER:5,SETTINGS:6},d=r.PRINTER_MENU={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},s=function(g){switch(g){case u.MAIN:return(0,e.createComponentVNode)(2,v);case u.DISK:return(0,e.createComponentVNode)(2,b.DataDiskMenu);case u.DESTROY:return(0,e.createComponentVNode)(2,C.DeconstructionMenu);case u.LATHE:case u.IMPRINTER:return(0,e.createComponentVNode)(2,y.LatheMenu);case u.SETTINGS:return(0,e.createComponentVNode)(2,k.SettingsMenu);default:return"UNKNOWN MENU"}},l=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.menu,A=g.menu,x=c(g,i);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p,Object.assign({selected:w===A,onClick:function(){function E(){return I("nav",{menu:A})}return E}()},x)))},h=r.RndConsole=function(){function f(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data;if(!L.linked)return(0,e.createComponentVNode)(2,B.LinkMenu);var w=L.menu,A=L.linked_destroy,x=L.linked_lathe,E=L.linked_imprinter,P=L.wait_message;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,l,{icon:"flask",menu:u.MAIN,children:"Research"}),!!A&&(0,e.createComponentVNode)(2,l,{icon:"microscope",menu:u.DESTROY,children:"Analyze"}),!!x&&(0,e.createComponentVNode)(2,l,{icon:"print",menu:u.LATHE,children:"Protolathe"}),!!E&&(0,e.createComponentVNode)(2,l,{icon:"memory",menu:u.IMPRINTER,children:"Imprinter"}),(0,e.createComponentVNode)(2,l,{icon:"floppy-disk",menu:u.DISK,children:"Disk"}),(0,e.createComponentVNode)(2,l,{icon:"cog",menu:u.SETTINGS,children:"Settings"})]}),s(w),(0,e.createComponentVNode)(2,N)]})})})}return f}(),N=function(g,V){var S=(0,a.useBackend)(V),I=S.data,L=I.wait_message;return L?(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay",children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay__Wrapper",children:(0,e.createComponentVNode)(2,o.NoticeBox,{color:"black",children:L})})}):null},v=function(g,V){var S=(0,a.useBackend)(V),I=S.data,L=I.tech_levels;return(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Level"})]}),L.map(function(w){var A=w.id,x=w.name,E=w.desc,P=w.level,j=w.ui_icon;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:E})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:j})," ",x]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P})]},A)})]})})}},29205:function(T,r,n){"use strict";r.__esModule=!0,r.RndNetController=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=r.RndNetController=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.ion,s=(0,t.useLocalState)(i,"mainTabIndex",0),l=s[0],h=s[1],N=function(){function v(f){switch(f){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return v}();return(0,e.createComponentVNode)(2,m.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:l===0,onClick:function(){function v(){return h(0)}return v}(),children:"Network Management"},"ConfigPage"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"floppy-disk",selected:l===1,onClick:function(){function v(){return h(1)}return v}(),children:"Design Management"},"DesignPage")]}),N(l)]})})}return k}(),y=function(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=(0,t.useLocalState)(i,"filterType","ALL"),s=d[0],l=d[1],h=u.network_password,N=u.network_name,v=u.devices,f=[];f.push(s),s==="MSC"&&(f.push("BCK"),f.push("PGN"));var g=s==="ALL"?v:v.filter(function(V){return f.indexOf(V.dclass)>-1});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Network Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Name",children:(0,e.createComponentVNode)(2,o.Button,{content:N||"Unset",selected:N,icon:"edit",onClick:function(){function V(){return p("network_name")}return V}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Password",children:(0,e.createComponentVNode)(2,o.Button,{content:h||"Unset",selected:h,icon:"lock",onClick:function(){function V(){return p("network_password")}return V}()})})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Connected Devices",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="ALL",onClick:function(){function V(){return l("ALL")}return V}(),icon:"network-wired",children:"All Devices"},"AllDevices"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="SRV",onClick:function(){function V(){return l("SRV")}return V}(),icon:"server",children:"R&D Servers"},"RNDServers"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="RDC",onClick:function(){function V(){return l("RDC")}return V}(),icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MFB",onClick:function(){function V(){return l("MFB")}return V}(),icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MSC",onClick:function(){function V(){return l("MSC")}return V}(),icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Unlink"})]}),g.map(function(V){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function S(){return p("unlink_device",{dclass:V.dclass,uid:V.id})}return S}()})})]},V.id)})]})]})],4)},B=function(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.designs,s=(0,t.useLocalState)(i,"searchText",""),l=s[0],h=s[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Design Management",children:[(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search for designs",mb:2,onInput:function(){function N(v,f){return h(f)}return N}()}),d.filter((0,a.createSearch)(l,function(N){return N.name})).map(function(N){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,content:N.name,checked:!N.blacklisted,onClick:function(){function v(){return p(N.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:N.uid})}return v}()},N.name)})]})}},63315:function(T,r,n){"use strict";r.__esModule=!0,r.RndServer=void 0;var e=n(89005),a=n(72253),t=n(44879),o=n(36036),m=n(98595),b=r.RndServer=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.active,s=u.network_name;return(0,e.createComponentVNode)(2,m.Window,{width:600,height:500,resizable:!0,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Section,{title:"Server Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Machine power",children:(0,e.createComponentVNode)(2,o.Button,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){function l(){return p("toggle_active")}return l}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Link status",children:s===null?(0,e.createComponentVNode)(2,o.Box,{color:"red",children:"Unlinked"}):(0,e.createComponentVNode)(2,o.Box,{color:"green",children:"Linked"})})]})}),s===null?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})})}return k}(),y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.network_name;return(0,e.createComponentVNode)(2,o.Section,{title:"Network Info",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Connected network ID",children:d}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function s(){return p("unlink")}return s}()})})]})})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.controllers;return(0,e.createComponentVNode)(2,o.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),d.map(function(s){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:s.netname}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function l(){return p("link",{addr:s.addr})}return l}()})})]},s.addr)})]})})}},26109:function(T,r,n){"use strict";r.__esModule=!0,r.RobotSelfDiagnosis=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(25328),b=function(k,C){var i=k/C;return i<=.2?"good":i<=.5?"average":"bad"},y=r.RobotSelfDiagnosis=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.data,p=c.component_data;return(0,e.createComponentVNode)(2,o.Window,{width:280,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:p.map(function(u,d){return(0,e.createComponentVNode)(2,t.Section,{title:(0,m.capitalize)(u.name),children:u.installed<=0?(0,e.createComponentVNode)(2,t.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:u.installed===-1?"Destroyed":"Missing"})})}):(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"72%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",color:b(u.brute_damage,u.max_damage),children:u.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:b(u.electronic_damage,u.max_damage),children:u.electronic_damage})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Powered",color:u.powered?"good":"bad",children:u.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:u.status?"good":"bad",children:u.status?"Yes":"No"})]})})]})},d)})})})}return B}()},97997:function(T,r,n){"use strict";r.__esModule=!0,r.RoboticsControlConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.RoboticsControlConsole=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.can_hack,u=c.safety,d=c.show_lock_all,s=c.cyborgs,l=s===void 0?[]:s;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:460,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!d&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){function h(){return i("arm",{})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:u,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function h(){return i("masslock",{})}return h}()})]}),(0,e.createComponentVNode)(2,b,{cyborgs:l,can_hack:p})]})})}return y}(),b=function(B,k){var C=B.cyborgs,i=B.can_hack,c=(0,a.useBackend)(k),p=c.act,u=c.data,d="Detonate";return u.detonate_cooldown>0&&(d+=" ("+u.detonate_cooldown+"s)"),C.length?C.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createFragment)([!!s.hackable&&!s.emagged&&(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){function l(){return p("hackbot",{uid:s.uid})}return l}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:s.locked_down?"unlock":"lock",color:s.locked_down?"good":"default",content:s.locked_down?"Release":"Lockdown",disabled:!u.auth,onClick:function(){function l(){return p("stopbot",{uid:s.uid})}return l}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:d,disabled:!u.auth||u.detonate_cooldown>0,color:"bad",onClick:function(){function l(){return p("killbot",{uid:s.uid})}return l}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Box,{color:s.status?"bad":s.locked_down?"average":"good",children:s.status?"Not Responding":s.locked_down?"Locked Down":"Nominal"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:(0,e.createComponentVNode)(2,t.Box,{children:s.locstring})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.health>50?"good":"bad",value:s.health/100})}),typeof s.charge=="number"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.charge>30?"good":"bad",value:s.charge/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Capacity",children:(0,e.createComponentVNode)(2,t.Box,{color:s.cell_capacity<3e4?"average":"good",children:s.cell_capacity})})],4)||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"No Power Cell"})}),!!s.is_hacked&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safeties",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"DISABLED"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Module",children:s.module}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:(0,e.createComponentVNode)(2,t.Box,{color:s.synchronization?"default":"average",children:s.synchronization||"None"})})]})},s.uid)}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cyborg units detected within access parameters."})}},54431:function(T,r,n){"use strict";r.__esModule=!0,r.Safe=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Safe=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.dial,s=u.open,l=u.locked,h=u.contents;return(0,e.createComponentVNode)(2,o.Window,{theme:"safe",width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving",children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,e.createComponentVNode)(2,t.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,e.createVNode)(1,"br"),s?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*d+"deg)","z-index":0}})]}),!s&&(0,e.createComponentVNode)(2,B)]})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.dial,s=u.open,l=u.locked,h=function(v,f){return(0,e.createComponentVNode)(2,t.Button,{disabled:s||f&&!l,icon:"arrow-"+(f?"right":"left"),content:(f?"Right":"Left")+" "+v,iconRight:f,onClick:function(){function g(){return p(f?"turnleft":"turnright",{num:v})}return g}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:l,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){function N(){return p("open")}return N}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[h(50),h(10),h(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[h(1,!0),h(10,!0),h(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:d})]})},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:d.map(function(s,l){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function h(){return p("retrieve",{index:l+1})}return h}(),children:[(0,e.createComponentVNode)(2,t.Box,{as:"img",src:s.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),s.name]}),(0,e.createVNode)(1,"br")],4,s)})})},B=function(C,i){return(0,e.createComponentVNode)(2,t.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,e.createComponentVNode)(2,t.Box,{children:["1. Turn the dial left to the first number.",(0,e.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,e.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,e.createVNode)(1,"br"),"4. Open the safe."]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},29740:function(T,r,n){"use strict";r.__esModule=!0,r.SatelliteControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SatelliteControl=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.satellites,p=i.notice,u=i.meteor_shield,d=i.meteor_shield_coverage,s=i.meteor_shield_coverage_max,l=i.meteor_shield_coverage_percentage;return(0,e.createComponentVNode)(2,o.Window,{width:475,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[u&&(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:l>=100?"good":"average",value:d,maxValue:s,children:[l," %"]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alert",color:"red",children:i.notice}),c.map(function(h){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+h.id,children:[h.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:h.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function N(){return C("toggle",{id:h.id})}return N}()})]},h.id)})]})})]})})}return b}()},44162:function(T,r,n){"use strict";r.__esModule=!0,r.SecureStorage=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=n(36352),y=n(92986),B=r.SecureStorage=function(){function c(p,u){return(0,e.createComponentVNode)(2,m.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,C)})})})})}return c}(),k=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=window.event?p.which:p.keyCode;if(l===y.KEY_ENTER){p.preventDefault(),s("keypad",{digit:"E"});return}if(l===y.KEY_ESCAPE){p.preventDefault(),s("keypad",{digit:"C"});return}if(l===y.KEY_BACKSPACE){p.preventDefault(),s("backspace");return}if(l>=y.KEY_0&&l<=y.KEY_9){p.preventDefault(),s("keypad",{digit:l-y.KEY_0});return}if(l>=y.KEY_NUMPAD_0&&l<=y.KEY_NUMPAD_9){p.preventDefault(),s("keypad",{digit:l-y.KEY_NUMPAD_0});return}},C=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=l.locked,N=l.no_passcode,v=l.emagged,f=l.user_entered_code,g=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],V=N?"":h?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function S(I){return k(I,u)}return S}(),children:[(0,e.createComponentVNode)(2,o.Stack.Item,{height:7.3,children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+V]),height:"100%",children:v?"ERROR":f})}),(0,e.createComponentVNode)(2,o.Table,{children:g.map(function(S){return(0,e.createComponentVNode)(2,b.TableRow,{children:S.map(function(I){return(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,i,{number:I})},I)})},S[0])})})]})},i=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=p.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:h,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+h]),onClick:function(){function N(){return s("keypad",{digit:h})}return N}()})}},6272:function(T,r,n){"use strict";r.__esModule=!0,r.SecurityRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(3939),y=n(321),B=n(5485),k=n(22091),C={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},i=function(f,g){(0,b.modalOpen)(f,"edit",{field:g.edit,value:g.value})},c=r.SecurityRecords=function(){function v(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.loginState,w=I.currentPage,A;if(L.logged_in)w===1?A=(0,e.createComponentVNode)(2,u):w===2&&(A=(0,e.createComponentVNode)(2,l));else return(0,e.createComponentVNode)(2,m.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});return(0,e.createComponentVNode)(2,m.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,p),A]})})]})}return v}(),p=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.currentPage,w=I.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:L===1,onClick:function(){function A(){return S("page",{page:1})}return A}(),children:"List Records"}),L===2&&w&&!w.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:L===2,children:["Record: ",w.fields[0].value]})]})})},u=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.records,w=(0,t.useLocalState)(g,"searchText",""),A=w[0],x=w[1],E=(0,t.useLocalState)(g,"sortId","name"),P=E[0],j=E[1],M=(0,t.useLocalState)(g,"sortOrder",!0),O=M[0],D=M[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,s)}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"SecurityRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,d,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,d,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,d,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,d,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,d,{id:"status",children:"Criminal Status"})]}),L.filter((0,a.createSearch)(A,function(F){return F.name+"|"+F.id+"|"+F.rank+"|"+F.fingerprint+"|"+F.status})).sort(function(F,W){var U=O?1:-1;return F[P].localeCompare(W[P])*U}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+C[F.status],onClick:function(){function W(){return S("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return W}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",F.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.fingerprint}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.status})]},F.id)})]})})})],4)},d=function(f,g){var V=(0,t.useLocalState)(g,"sortId","name"),S=V[0],I=V[1],L=(0,t.useLocalState)(g,"sortOrder",!0),w=L[0],A=L[1],x=f.id,E=f.children;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:S!==x&&"transparent",fluid:!0,onClick:function(){function P(){S===x?A(!w):(I(x),A(!0))}return P}(),children:[E,S===x&&(0,e.createComponentVNode)(2,o.Icon,{name:w?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},s=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.isPrinting,w=(0,t.useLocalState)(g,"searchText",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:"0.25rem",content:"New Record",icon:"plus",onClick:function(){function E(){return S("new_general")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Cell Log",onClick:function(){function E(){return(0,b.modalOpen)(g,"print_cell_log")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",fluid:!0,onInput:function(){function E(P,j){return x(j)}return E}()})})]})},l=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.isPrinting,w=I.general,A=I.security;return!w||!w.fields?(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"General records lost!"}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Record",onClick:function(){function x(){return S("print_record")}return x}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated with this crew member!",tooltipPosition:"bottom-start",content:"Delete Record",onClick:function(){function x(){return S("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,h)})}),!A||!A.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function x(){return S("new_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Security records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:A.empty,content:"Delete Record",onClick:function(){function x(){return S("delete_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:A.fields.map(function(x,E){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:x.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(x.value),!!x.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:x.line_break?"1rem":"initial",onClick:function(){function P(){return i(g,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,N)],4)],0)},h=function(f,g){var V=(0,t.useBackend)(g),S=V.data,I=S.general;return!I||!I.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:I.fields.map(function(L,w){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(""+L.value),!!L.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:L.line_break?"1rem":"initial",onClick:function(){function A(){return i(g,L)}return A}()})]},w)})})}),!!I.has_photos&&I.photos.map(function(L,w){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:L,style:{width:"96px","margin-top":"5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",w+1]},w)})]})},N=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.security;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function w(){return(0,b.modalOpen)(g,"comment_add")}return w}()}),children:L.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):L.comments.map(function(w,A){return(0,e.createComponentVNode)(2,o.Box,{preserveWhitespace:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:w.header||"Auto-generated"}),(0,e.createVNode)(1,"br"),w.text||w,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function x(){return S("comment_delete",{id:A+1})}return x}()})]},A)})})})}},5099:function(T,r,n){"use strict";r.__esModule=!0,r.SeedExtractor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(3939);function y(d,s){var l=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(l)return(l=l.call(d)).next.bind(l);if(Array.isArray(d)||(l=B(d))||s&&d&&typeof d.length=="number"){l&&(d=l);var h=0;return function(){return h>=d.length?{done:!0}:{done:!1,value:d[h++]}}}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 B(d,s){if(d){if(typeof d=="string")return k(d,s);var l={}.toString.call(d).slice(8,-1);return l==="Object"&&d.constructor&&(l=d.constructor.name),l==="Map"||l==="Set"?Array.from(d):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?k(d,s):void 0}}function k(d,s){(s==null||s>d.length)&&(s=d.length);for(var l=0,h=Array(s);l=A},N=function(w,A){return w<=A},v=s.split(" "),f=[],g=function(){var w=I.value,A=w.split(":");if(A.length===0)return 0;if(A.length===1)return f.push(function(P){return(P.name+" ("+P.variant+")").toLocaleLowerCase().includes(A[0].toLocaleLowerCase())}),0;if(A.length>2)return{v:function(){function P(j){return!1}return P}()};var x,E=l;if(A[1][A[1].length-1]==="-"?(E=N,x=Number(A[1].substring(0,A[1].length-1))):A[1][A[1].length-1]==="+"?(E=h,x=Number(A[1].substring(0,A[1].length-1))):x=Number(A[1]),isNaN(x))return{v:function(){function P(j){return!1}return P}()};switch(A[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":f.push(function(P){return E(P.lifespan,x)});break;case"e":case"end":case"endurance":f.push(function(P){return E(P.endurance,x)});break;case"m":case"mat":case"maturation":f.push(function(P){return E(P.maturation,x)});break;case"pr":case"prod":case"production":f.push(function(P){return E(P.production,x)});break;case"y":case"yield":f.push(function(P){return E(P.yield,x)});break;case"po":case"pot":case"potency":f.push(function(P){return E(P.potency,x)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":f.push(function(P){return E(P.amount,x)});break;default:return{v:function(){function P(j){return!1}return P}()}}},V,S=y(v),I;!(I=S()).done;)if(V=g(),V!==0&&V)return V.v;return function(L){for(var w=0,A=f;w=1?Number(E):1)}return A}()})]})]})}},17474:function(T,r,n){"use strict";r.__esModule=!0,r.Shop=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(25328),m=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(h){switch(h){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);default:return"\u041E\u0428\u0418\u0411\u041A\u0410, \u0421\u041E\u041E\u0411\u0429\u0418\u0422\u0415 \u0420\u0410\u0417\u0420\u0410\u0411\u041E\u0422\u0427\u0418\u041A\u0423"}},C=r.Shop=function(){function l(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.cart,S=(0,m.useLocalState)(N,"tabIndex",0),I=S[0],L=S[1];return(0,e.createComponentVNode)(2,y.Window,{width:900,height:600,theme:"abductor",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Tabs,{children:[(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:I===0,onClick:function(){function w(){L(0)}return w}(),icon:"store",children:"\u0422\u043E\u0440\u0433\u043E\u0432\u043B\u044F"},"PurchasePage"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:I===1,onClick:function(){function w(){L(1)}return w}(),icon:"shopping-cart",children:["\u041A\u043E\u0440\u0437\u0438\u043D\u0430 ",V&&V.length?"("+V.length+")":""]},"Cart")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(I)})]})})]})}return l}(),i=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.cash,S=g.cats,I=(0,m.useLocalState)(N,"shopItems",S[0].items),L=I[0],w=I[1],A=(0,m.useLocalState)(N,"showDesc",1),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430: "+V+"\u043A",buttons:(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438",checked:x,onClick:function(){function P(){return E(!x)}return P}()})})})}),(0,e.createComponentVNode)(2,b.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:S.map(function(P){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:P.items===L,onClick:function(){function j(){w(P.items)}return j}(),children:P.cat},P)})})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:L.map(function(P){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,p,{i:P,showDecription:x},(0,o.decodeHtmlEntities)(P.name))},(0,o.decodeHtmlEntities)(P.name))})})})})]})]})},c=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.cart,S=g.cash,I=g.cart_price,L=(0,m.useLocalState)(N,"showDesc",0),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430: "+S+"\u043A",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438",checked:w,onClick:function(){function x(){return A(!w)}return x}()}),(0,e.createComponentVNode)(2,b.Button,{content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",icon:"trash",onClick:function(){function x(){return f("empty_cart")}return x}(),disabled:!V}),(0,e.createComponentVNode)(2,b.Button,{content:"\u041E\u043F\u043B\u0430\u0442\u0438\u0442\u044C ("+I+"\u043A)",icon:"shopping-cart",onClick:function(){function x(){return f("purchase_cart")}return x}(),disabled:!V||I>S})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:V?V.map(function(x){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,p,{i:x,showDecription:w,buttons:(0,e.createComponentVNode)(2,d,{i:x})})},(0,o.decodeHtmlEntities)(x.name))}):(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:"\u0412\u0430\u0448\u0430 \u043A\u043E\u0440\u0437\u0438\u043D\u0430 \u043F\u0443\u0441\u0442\u0430!"})})})})})},p=function(h,N){var v=h.i,f=h.showDecription,g=f===void 0?1:f,V=h.buttons,S=V===void 0?(0,e.createComponentVNode)(2,u,{i:v}):V;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(v.name),showBottom:g,buttons:S,children:[g?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(v.desc)}):null,g?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(v.content)}):null]})},u=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=h.i,S=g.cash;return(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",content:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443 ("+V.cost+" \u041A\u0438\u043A\u0438\u0440\u0438\u0434\u0438\u0442\u043E\u0432)",color:V.limit!==-1&&"red",tooltip:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0442\u043E\u0432\u0430\u0440 \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443, \u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0432 \u043E\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043B\u043E \u0434\u0430\u043D\u043D\u043E\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430. \u0426\u0435\u043D\u0430 \u0442\u043E\u0432\u0430\u0440\u0430 \u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438 \u043E\u0442 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u044B\u0445 \u0446\u0435\u043D\u043D\u043E\u0441\u0442\u0435\u0439 \u0432 \u0420\u0430\u0441\u0447\u0438\u0447\u0435\u0442\u0447\u0438\u043A\u0438\u043A\u0435.",tooltipPosition:"left",onClick:function(){function I(){return f("add_to_cart",{item:V.obj_path})}return I}(),disabled:V.cost>S||V.limit!==-1&&V.purchased>=V.limit||V.is_time_available===!1})},d=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=h.i;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+V.cost*V.amount+"\u043A)",tooltip:"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u043A\u043E\u0440\u0437\u0438\u043D\u044B.",tooltipPosition:"left",onClick:function(){function S(){return f("remove_from_cart",{item:V.obj_path})}return S}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",ml:"5px",onClick:function(){function S(){return f("set_cart_item_quantity",{item:V.obj_path,quantity:--V.amount})}return S}(),disabled:V.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:V.amount,width:"45px",tooltipPosition:"bottom-end",onCommit:function(){function S(I,L){return f("set_cart_item_quantity",{item:V.obj_path,quantity:L})}return S}(),disabled:V.limit!==-1&&V.amount>=V.limit&&V.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:V.limit===0&&"Discount already redeemed!",onClick:function(){function S(){return f("set_cart_item_quantity",{item:V.obj_path,quantity:++V.amount})}return S}(),disabled:V.limit!==-1&&V.amount>=V.limit})]})},s=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=h.pack;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,horizontal:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{width:"70%",children:V.content_images.map(function(S){return(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+S,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})},S.ref)})})})}},2916:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ShuttleConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:i.status?i.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!i.shuttle&&(!!i.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:i.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function p(){return C("move",{move:c.id})}return p}()},c.name)})})||(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:"red",children:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!i.admin_controlled&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorization",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!i.status,onClick:function(){function c(){return C("request")}return c}()})})],0))]})})})})}return b}()},39401:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleManipulator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ShuttleManipulator=function(){function k(C,i){var c=(0,a.useLocalState)(i,"tabIndex",0),p=c[0],u=c[1],d=function(){function s(l){switch(l){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,y);case 2:return(0,e.createComponentVNode)(2,B);default:return"WE SHOULDN'T BE HERE!"}}return s}();return(0,e.createComponentVNode)(2,o.Window,{width:650,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===0,onClick:function(){function s(){return u(0)}return s}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===1,onClick:function(){function s(){return u(1)}return s}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===2,onClick:function(){function s(){return u(2)}return s}(),icon:"tools",children:"Modification"},"Modification")]}),d(p)]})})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID",children:s.id}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Timer",children:s.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Mode",children:s.mode}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Status",children:s.status}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function l(){return p("jump_to",{type:"mobile",id:s.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function l(){return p("fast_travel",{id:s.id})}return l}()})]})]})},s.name)})})},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.templates_tabs,s=u.existing_shuttle,l=u.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:d.map(function(h){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===s.id,icon:"file",onClick:function(){function N(){return p("select_template_category",{cat:h})}return N}(),children:h},h)})}),!!s&&l[s.id].templates.map(function(h){return(0,e.createComponentVNode)(2,t.Section,{title:h.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[h.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:h.description}),h.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:h.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Load Template",icon:"download",onClick:function(){function N(){return p("select_template",{shuttle_id:h.shuttle_id})}return N}()})})]})},h.name)})]})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.existing_shuttle,s=u.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[d?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+d.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d.status}),d.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:d.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function l(){return p("jump_to",{type:"mobile",id:d.id})}return l}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: None"}),s?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: "+s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:s.description}),s.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:s.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Preview",icon:"eye",onClick:function(){function l(){return p("preview",{shuttle_id:s.shuttle_id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function l(){return p("load",{shuttle_id:s.shuttle_id})}return l}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},88284:function(T,r,n){"use strict";r.__esModule=!0,r.Sleeper=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],C=r.Sleeper=function(){function l(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.hasOccupant,S=V?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,s);return(0,e.createComponentVNode)(2,m.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:S}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,u)})]})})})}return l}(),i=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,d)],4)},c=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.occupant,S=g.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:"Auto-eject if dead:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{icon:S?"toggle-on":"toggle-off",selected:S,content:S?"On":"Off",onClick:function(){function I(){return f("auto_eject_dead_"+(S?"off":"on"))}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function I(){return f("ejectify")}return I}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:V.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxHealth,value:V.health/V.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]},children:(0,a.round)(V.health,0)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:b[V.stat][0],children:b[V.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxTemp,value:V.bodyTemperature/V.maxTemp,color:k[V.temperatureSuitability+3],children:[(0,a.round)(V.btCelsius,0),"\xB0C,",(0,a.round)(V.btFaren,0),"\xB0F"]})}),!!V.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.bloodMax,value:V.bloodLevel/V.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[V.bloodPercent,"%, ",V.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[V.pulse," BPM"]})],4)]})})},p=function(h,N){var v=(0,t.useBackend)(N),f=v.data,g=f.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:y.map(function(V,S){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:g[V[1]]/100,ranges:B,children:(0,a.round)(g[V[1]],0)},S)},S)})})})},u=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.hasOccupant,S=g.isBeakerLoaded,I=g.beakerMaxSpace,L=g.beakerFreeSpace,w=g.dialysis,A=w&&L>0;return(0,e.createComponentVNode)(2,o.Section,{title:"Dialysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!S||L<=0||!V,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return f("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!S,icon:"eject",content:"Eject",onClick:function(){function x(){return f("removebeaker")}return x}()})],4),children:S?(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:L/I,ranges:{good:[.5,1/0],average:[.25,.5],bad:[-1/0,.25]},children:[L,"u"]})})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No beaker loaded."})})},d=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.occupant,S=g.chemicals,I=g.maxchem,L=g.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:S.map(function(w,A){var x="",E;return w.overdosing?(x="bad",E=(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle"}),"\xA0 Overdosing!"]})):w.od_warning&&(x="average",E=(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle"}),"\xA0 Close to overdosing"]})),(0,e.createComponentVNode)(2,o.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{title:w.title,level:"3",mx:"0",lineHeight:"18px",buttons:E,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:w.occ_amount/I,color:x,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[w.pretty_amount,"/",I,"u"]}),L.map(function(P,j){return(0,e.createComponentVNode)(2,o.Button,{disabled:!w.injectable||w.occ_amount+P>I||V.stat===2,icon:"syringe",content:"Inject "+P+"u",title:"Inject "+P+"u of "+w.title+" into the occupant",mb:"0",height:"19px",onClick:function(){function M(){return f("chemical",{chemid:w.id,amount:P})}return M}()},j)})]})})},A)})})},s=function(h,N){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},21597:function(T,r,n){"use strict";r.__esModule=!0,r.SlotMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SlotMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;if(i.money===null)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:90,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Could not scan your card or could not find account!"}),(0,e.createComponentVNode)(2,t.Box,{children:"Please wear or hold your ID and try again."})]})})});var c;return i.plays===1?c=i.plays+" player has tried their luck today!":c=i.plays+" players have tried their luck today!",(0,e.createComponentVNode)(2,o.Window,{width:300,height:151,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{lineHeight:2,children:c}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Credits Remaining",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:i.working,content:i.working?"Spinning...":"Spin",onClick:function(){function p(){return C("spin")}return p}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:i.resultlvl,children:i.result})]})})})}return b}()},46348:function(T,r,n){"use strict";r.__esModule=!0,r.Smartfridge=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Smartfridge=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.secure,p=i.can_dry,u=i.drying,d=i.contents;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Secure Access: Please have your identification ready."}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:p?"Drying rack":"Contents",buttons:!!p&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){function s(){return C("drying")}return s}()}),children:[!d&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cookie-bite",size:5,color:"brown"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No products loaded."]})}),!!d&&d.slice().sort(function(s,l){return s.display_name.localeCompare(l.display_name)}).map(function(s){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"55%",children:s.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"25%",children:["(",s.quantity," in stock)"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:13,children:[(0,e.createComponentVNode)(2,t.Button,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){function l(){return C("vend",{index:s.vend,amount:1})}return l}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:s.quantity,step:1,stepPixelSize:3,onChange:function(){function l(h,N){return C("vend",{index:s.vend,amount:N})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function l(){return C("vend",{index:s.vend,amount:s.quantity})}return l}()})]})]},s)})]})]})})})}return b}()},86162:function(T,r,n){"use strict";r.__esModule=!0,r.Smes=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),m=n(98595),b=1e3,y=r.Smes=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.capacityPercent,d=p.capacity,s=p.charge,l=p.inputAttempt,h=p.inputting,N=p.inputLevel,v=p.inputLevelMax,f=p.inputAvailable,g=p.outputPowernet,V=p.outputAttempt,S=p.outputting,I=p.outputLevel,L=p.outputLevelMax,w=p.outputUsed,A=u>=100&&"good"||h&&"average"||"bad",x=S&&"good"||s>0&&"average"||"bad";return(0,e.createComponentVNode)(2,m.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stored Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:u*.01,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l?"sync-alt":"times",selected:l,onClick:function(){function E(){return c("tryinput")}return E}(),children:l?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:u>=100&&"Fully Charged"||h&&"Charging"||"Not Charging"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Input",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:N===0,onClick:function(){function E(){return c("input",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:N===0,onClick:function(){function E(){return c("input",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:N/b,fillValue:f/b,minValue:0,maxValue:v/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,j){return c("input",{target:j*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:N===v,onClick:function(){function E(){return c("input",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:N===v,onClick:function(){function E(){return c("input",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(f)})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Output Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:V?"power-off":"times",selected:V,onClick:function(){function E(){return c("tryoutput")}return E}(),children:V?"On":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:x,children:g?S?"Sending":s>0?"Not Sending":"No Charge":"Not Connected"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Output",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:I===0,onClick:function(){function E(){return c("output",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:I===0,onClick:function(){function E(){return c("output",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:I/b,minValue:0,maxValue:L/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,j){return c("output",{target:j*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:I===L,onClick:function(){function E(){return c("output",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:I===L,onClick:function(){function E(){return c("output",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Outputting",children:(0,o.formatPower)(w)})]})})]})})})}return B}()},63584:function(T,r,n){"use strict";r.__esModule=!0,r.SolarControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SolarControl=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=0,p=1,u=2,d=i.generated,s=i.generated_ratio,l=i.tracking_state,h=i.tracking_rate,N=i.connected_panels,v=i.connected_tracker,f=i.cdir,g=i.direction,V=i.rotating_direction;return(0,e.createComponentVNode)(2,o.Window,{width:490,height:277,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){function S(){return C("refresh")}return S}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar tracker",color:v?"good":"bad",children:v?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:N>0?"good":"bad",children:N})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power output",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:s,children:d+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[f,"\xB0 (",g,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[l===u&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),l===p&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",h,"\xB0/h (",V,")"," "]}),l===c&&(0,e.createComponentVNode)(2,t.Box,{children:" Tracker offline "})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[l!==u&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(){function S(I,L){return C("cdir",{cdir:L})}return S}()}),l===u&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:l===c,onClick:function(){function S(){return C("track",{track:c})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:l===p,onClick:function(){function S(){return C("track",{track:p})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:l===u,disabled:!v,onClick:function(){function S(){return C("track",{track:u})}return S}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[l===p&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:h,format:function(){function S(I){var L=Math.sign(I)>0?"+":"-";return L+Math.abs(I)}return S}(),onDrag:function(){function S(I,L){return C("tdir",{tdir:L})}return S}()}),l===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),l===u&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}return b}()},38096:function(T,r,n){"use strict";r.__esModule=!0,r.SpawnersMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SpawnersMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.spawners||[];return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{children:c.map(function(p){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:p.name+" ("+p.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function u(){return C("jump",{ID:p.uids})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function u(){return C("spawn",{ID:p.uids})}return u}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:p.desc}),!!p.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:p.fluff}),!!p.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:p.important_info})]},p.name)})})})})}return b}()},30586:function(T,r,n){"use strict";r.__esModule=!0,r.SpecMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SpecMenu=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:1100,height:600,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return C}(),b=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("hemomancer")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Vampiric claws",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood Barrier",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood tendrils",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Sanguine pool",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Predator senses",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood eruption",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"The blood bringers rite",16),(0,e.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)]})})},y=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("umbrae")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Cloak of darkness",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow anchor",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow snare",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Dark passage",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Extinguish",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Eternal darkness",16),(0,e.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,e.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16)]})})},B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("gargantua")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rejuvenate",16),(0,e.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Seismic stomp",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood rush",16),(0,e.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell II",16),(0,e.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Overwhelming force",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Demonic grasp",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Charge",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Desecrated Duel",16),(0,e.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4)]})})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("dantalion")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Enthrall",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall cap",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall commune",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Subspace swap",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Pacify",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Decoy",16),(0,e.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rally thralls",16),(0,e.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood bond",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Mass Hysteria",16),(0,e.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4)]})})}},95152:function(T,r,n){"use strict";r.__esModule=!0,r.StackCraft=void 0;var e=n(89005),a=n(72253),t=n(88510),o=n(64795),m=n(25328),b=n(98595),y=n(36036),B=r.StackCraft=function(){function s(){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:500,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return s}(),k=function(l,h){var N=(0,a.useBackend)(h),v=N.data,f=v.amount,g=v.recipes,V=(0,a.useLocalState)(h,"searchText",""),S=V[0],I=V[1],L=C(g,(0,m.createSearch)(S)),w=(0,a.useLocalState)(h,"",!1),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,title:"Amount: "+f,buttons:(0,e.createFragment)([A&&(0,e.createComponentVNode)(2,y.Input,{width:12.5,value:S,placeholder:"Find recipe",onInput:function(){function E(P,j){return I(j)}return E}()}),(0,e.createComponentVNode)(2,y.Button,{ml:.5,tooltip:"Search",tooltipPosition:"bottom-end",icon:"magnifying-glass",selected:A,onClick:function(){function E(){return x(!A)}return E}()})],0),children:L?(0,e.createComponentVNode)(2,u,{recipes:L}):(0,e.createComponentVNode)(2,y.NoticeBox,{children:"No recipes found!"})})},C=function s(l,h){var N=(0,o.flow)([(0,t.map)(function(v){var f=v[0],g=v[1];return i(g)?h(f)?v:[f,s(g,h)]:h(f)?v:[f,void 0]}),(0,t.filter)(function(v){var f=v[0],g=v[1];return g!==void 0}),(0,t.sortBy)(function(v){var f=v[0],g=v[1];return f}),(0,t.sortBy)(function(v){var f=v[0],g=v[1];return!i(g)}),(0,t.reduce)(function(v,f){var g=f[0],V=f[1];return v[g]=V,v},{})])(Object.entries(l));return Object.keys(N).length?N:void 0},i=function(l){return l.uid===void 0},c=function(l,h){return l.required_amount>h?0:Math.floor(h/l.required_amount)},p=function(l,h){for(var N=(0,a.useBackend)(h),v=N.act,f=l.recipe,g=l.max_possible_multiplier,V=Math.min(g,Math.floor(f.max_result_amount/f.result_amount)),S=[5,10,25],I=[],L=function(){var E=A[w];V>=E&&I.push((0,e.createComponentVNode)(2,y.Button,{bold:!0,translucent:!0,fontSize:.85,width:"32px",content:E*f.result_amount+"x",onClick:function(){function P(){return v("make",{recipe_uid:f.uid,multiplier:E})}return P}()}))},w=0,A=S;w1?I+"x ":"",P=L>1?"s":"",j=""+E+V,M=L+" sheet"+P,O=c(S,g);return(0,e.createComponentVNode)(2,y.ImageButton,{fluid:!0,base64:x,imageSize:32,disabled:!O,tooltip:M,buttons:w>1&&O>1&&(0,e.createComponentVNode)(2,p,{recipe:S,max_possible_multiplier:O}),onClick:function(){function D(){return v("make",{recipe_uid:A,multiplier:1})}return D}(),children:j})}},38307:function(T,r,n){"use strict";r.__esModule=!0,r.StationAlertConsoleContent=r.StationAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.StationAlertConsole=function(){function y(){return(0,e.createComponentVNode)(2,o.Window,{width:325,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b)})})}return y}(),b=r.StationAlertConsoleContent=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.data,c=i.alarms||[],p=c.Fire||[],u=c.Atmosphere||[],d=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[p.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),p.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Atmospherics Alarms",children:(0,e.createVNode)(1,"ul",null,[u.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),u.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Alarms",children:(0,e.createVNode)(1,"ul",null,[d.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),d.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)})],4)}return y}()},96091:function(T,r,n){"use strict";r.__esModule=!0,r.StationTraitsPanel=void 0;var e=n(89005),a=n(88510),t=n(42127),o=n(72253),m=n(36036),b=n(98595),y=function(i){return i[i.SetupFutureStationTraits=0]="SetupFutureStationTraits",i[i.ViewStationTraits=1]="ViewStationTraits",i}(y||{}),B=function(c,p){var u=(0,o.useBackend)(p),d=u.act,s=u.data,l=s.future_station_traits,h=(0,o.useLocalState)(p,"selectedFutureTrait",null),N=h[0],v=h[1],f=Object.fromEntries(s.valid_station_traits.map(function(V){return[V.name,V.path]})),g=Object.keys(f);return g.sort(),(0,e.createComponentVNode)(2,m.Box,{children:[(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Dropdown,{displayText:!N&&"Select trait to add...",onSelected:v,options:g,selected:N,width:"100%"})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:"green",icon:"plus",onClick:function(){function V(){if(N){var S=f[N],I=[S];if(l){var L,w=l.map(function(A){return A.path});if(w.indexOf(S)!==-1)return;I=(L=I).concat.apply(L,w)}d("setup_future_traits",{station_traits:I})}}return V}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,m.Divider),Array.isArray(l)?l.length>0?(0,e.createComponentVNode)(2,m.Stack,{vertical:!0,fill:!0,children:l.map(function(V){return(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:V.name}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:"red",icon:"times",onClick:function(){function S(){d("setup_future_traits",{station_traits:(0,a.filterMap)(l,function(I){if(I.path!==V.path)return I.path})})}return S}(),children:"Delete"})})]})},V.path)})}):(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,m.Button,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){function V(){return d("clear_future_traits")}return V}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,m.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function V(){return d("setup_future_traits",{station_traits:[]})}return V}(),children:"Prevent station traits from running next round"})]})]})},k=function(c,p){var u=(0,o.useBackend)(p),d=u.act,s=u.data;return s.current_traits.length>0?(0,e.createComponentVNode)(2,m.Stack,{vertical:!0,fill:!0,children:s.current_traits.map(function(l){return(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:l.name}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button.Confirm,{content:"Revert",color:"red",disabled:s.too_late_to_revert||!l.can_revert,tooltip:!l.can_revert&&"This trait is not revertable."||s.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){function h(){return d("revert",{ref:l.ref})}return h}()})})]})},l.ref)})}):(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:"There are no active station traits."})},C=r.StationTraitsPanel=function(){function i(c,p){var u=(0,o.useLocalState)(p,"station_traits_tab",y.ViewStationTraits),d=u[0],s=u[1],l;switch(d){case y.SetupFutureStationTraits:l=(0,e.createComponentVNode)(2,B);break;case y.ViewStationTraits:l=(0,e.createComponentVNode)(2,k);break;default:(0,t.exhaustiveCheck)(d)}return(0,e.createComponentVNode)(2,b.Window,{title:"Modify Station Traits",height:350,width:350,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Tabs,{children:[(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"eye",selected:d===y.ViewStationTraits,onClick:function(){function h(){return s(y.ViewStationTraits)}return h}(),children:"View"}),(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"edit",selected:d===y.SetupFutureStationTraits,onClick:function(){function h(){return s(y.SetupFutureStationTraits)}return h}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,m.Divider),l]})]})})})}return i}()},39409:function(T,r,n){"use strict";r.__esModule=!0,r.StripMenu=void 0;var e=n(89005),a=n(88510),t=n(79140),o=n(72253),m=n(36036),b=n(98595),y=5,B=9,k=function(N){return N===0?5:9},C="64px",i=function(N){return N[0]+"/"+N[1]},c=function(N){var v=N.align,f=N.children;return(0,e.createComponentVNode)(2,m.Box,{style:{position:"absolute",left:v==="left"?"6px":"48px","text-align":v,"text-shadow":"2px 2px 2px #000",top:"2px"},children:f})},p={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},u={eyes:{displayName:"eyewear",gridSpot:i([1,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,4]),image:"inventory-pda.png"}},d={eyes:{displayName:"eyewear",gridSpot:i([1,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,8]),image:"inventory-pda.png"}},s=function(h){return h[h.Completely=1]="Completely",h[h.Hidden=2]="Hidden",h}(s||{}),l=r.StripMenu=function(){function h(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=new Map;if(V.show_mode===0)for(var I=0,L=Object.keys(V.items);I=.01})},(0,a.sortBy)(function(w){return-w.amount})])(N.gases||[]),L=Math.max.apply(Math,[1].concat(I.map(function(w){return w.amount})));return(0,e.createComponentVNode)(2,B.Window,{width:550,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:f/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Relative EER",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:g,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(g)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(V),minValue:0,maxValue:i(1e4),ranges:{teal:[-1/0,i(80)],good:[i(80),i(373)],average:[i(373),i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(V)+" K"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(S),minValue:0,maxValue:i(5e4),ranges:{good:[i(1),i(300)],average:[-1/0,i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(S)+" kPa"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function w(){return h("back")}return w}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:I.map(function(w){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:(0,y.getGasLabel)(w.name),children:(0,e.createComponentVNode)(2,b.ProgressBar,{color:(0,y.getGasColor)(w.name),value:w.amount,minValue:0,maxValue:L,children:(0,o.toFixed)(w.amount,2)+"%"})},w.name)})})})})]})})})}},46029:function(T,r,n){"use strict";r.__esModule=!0,r.SyndicateComputerSimple=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SyndicateComputerSimple=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i.rows.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.title,buttons:(0,e.createComponentVNode)(2,t.Button,{content:c.buttontitle,disabled:c.buttondisabled,tooltip:c.buttontooltip,tooltipPosition:"left",onClick:function(){function p(){return C(c.buttonact)}return p}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(p){return(0,e.createComponentVNode)(2,t.Box,{children:p},p)})})]},c.title)})})})}return b}()},36372:function(T,r,n){"use strict";r.__esModule=!0,r.TEG=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(B){return B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},b=r.TEG=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data;return c.error?(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[c.error,(0,e.createComponentVNode)(2,t.Button,{icon:"circle",content:"Recheck",onClick:function(){function p(){return i("check")}return p}()})]})})}):(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cold Loop ("+c.cold_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Inlet",children:[m(c.cold_inlet_temp)," K, ",m(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[m(c.cold_outlet_temp)," K, ",m(c.cold_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Hot Loop ("+c.hot_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Inlet",children:[m(c.hot_inlet_temp)," K, ",m(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[m(c.hot_outlet_temp)," K, ",m(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[m(c.output_power)," W",!!c.warning_switched&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}return y}()},23190:function(T,r,n){"use strict";r.__esModule=!0,r.TTSSeedsExplorerContent=r.TTSSeedsExplorer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(46095),m=n(98595),b={0:"Free",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV",5:"Tier V"},y={male:"\u041C\u0443\u0436\u0441\u043A\u043E\u0439",female:"\u0416\u0435\u043D\u0441\u043A\u0438\u0439"},B={\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"}},k=function(p,u,d,s){return s===void 0&&(s=null),p.map(function(l){var h,N=(h=l[s])!=null?h:l;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:u.includes(l),content:N,onClick:function(){function v(){u.includes(l)?d(u.filter(function(f){var g;return((g=f[s])!=null?g:f)!==l})):d([l].concat(u))}return v}()},N)})},C=r.TTSSeedsExplorer=function(){function c(){return(0,e.createComponentVNode)(2,m.Window,{width:1e3,height:685,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,i)})})})}return c}(),i=r.TTSSeedsExplorerContent=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.providers,N=l.seeds,v=l.selected_seed,f=l.phrases,g=l.donator_level,V=l.character_gender,S=N.map(function(Y){return Y.category}).filter(function(Y,he,de){return de.indexOf(Y)===he}).sort(function(Y,he){return Y.localeCompare(he)}),I=N.map(function(Y){return Y.gender}).filter(function(Y,he,de){return de.indexOf(Y)===he}),L=N.map(function(Y){return Y.required_donator_level}).filter(function(Y,he,de){return de.indexOf(Y)===he}).sort(function(Y,he){return Y-he}).map(function(Y){return b[Y]}),w=(0,a.useLocalState)(u,"selectedProviders",h),A=w[0],x=w[1],E=(0,a.useLocalState)(u,"selectedGenders",I.includes(y[V])?[y[V]]:I),P=E[0],j=E[1],M=(0,a.useLocalState)(u,"selectedCategories",S),O=M[0],D=M[1],F=(0,a.useLocalState)(u,"selectedDonatorLevels",L.includes(b[g])?L.slice(0,L.indexOf(b[g])+1):L),W=F[0],U=F[1],K=(0,a.useLocalState)(u,"selectedPhrase",f[0]),G=K[0],$=K[1],Q=(0,a.useLocalState)(u,"searchtext",""),Z=Q[0],ie=Q[1],ne=(0,a.useLocalState)(u,"searchToggle",!1),se=ne[0],ve=ne[1],Ve=k(h,A,x,"name"),ge=k(I,P,j),Ce=k(S,O,D),oe=k(L,W,U),ce=(0,e.createComponentVNode)(2,t.Dropdown,{options:f,selected:G.replace(/(.{60})..+/,"$1..."),width:"21.3em",onSelected:function(){function Y(he){return $(he)}return Y}()}),te=(0,e.createFragment)([se&&(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435...",width:20,onInput:function(){function Y(he,de){return ie(de)}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"magnifying-glass",tooltip:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0438\u0441\u043A",tooltipPosition:"bottom-end",selected:se,onClick:function(){function Y(){return ve(!se)}return Y}()})],0),fe=N.sort(function(Y,he){var de=Y.name.toLowerCase(),Ne=he.name.toLowerCase();return de>Ne?1:de0&&v!==Y.name?"orange":"white",children:Y.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:v===Y.name?.5:.25,textAlign:"left",children:Y.category}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:v===Y.name?"white":B[Y.gender].color,textAlign:"left",children:(0,e.createComponentVNode)(2,t.Icon,{mx:1,size:1.2,name:B[Y.gender].icon})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:Y.required_donator_level>0&&(0,e.createFragment)([b[Y.required_donator_level],(0,e.createComponentVNode)(2,t.Icon,{ml:1,mr:2,name:"coins"})],0)})]},Y.name)});return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"30.25em",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u044B",children:Ve}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u043B",children:ge}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u0440",children:oe}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:ce})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"times",disabled:O.length===0,onClick:function(){function Y(){return D([])}return Y}(),children:"\u0423\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451"}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",disabled:O.length===S.length,onClick:function(){function Y(){return D(S)}return Y}(),children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451"})],4),children:Ce})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.BlockQuote,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"11px",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,e.createComponentVNode)(2,t.Box,{mt:1.5,italic:!0,color:"gray",fontSize:"10px",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."})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0413\u043E\u043B\u043E\u0441\u0430 ("+fe.length+"/"+N.length+")",buttons:te,children:(0,e.createComponentVNode)(2,t.Table,{children:(0,e.createComponentVNode)(2,o.VirtualList,{children:ue})})})})],4)}return c}()},56441:function(T,r,n){"use strict";r.__esModule=!0,r.TachyonArrayContent=r.TachyonArray=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TachyonArray=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.records,u=p===void 0?[]:p,d=c.explosion_target,s=c.toxins_tech,l=c.printing;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shift's Target",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Toxins Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Administration",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print All Logs",disabled:!u.length||l,align:"center",onClick:function(){function h(){return i("print_logs")}return h}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){function h(){return i("delete_logs")}return h}()})]})]})}),u.length?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return y}(),b=r.TachyonArrayContent=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.records,u=p===void 0?[]:p;return(0,e.createComponentVNode)(2,t.Section,{title:"Logged Explosions",children:(0,e.createComponentVNode)(2,t.Flex,{children:(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Epicenter"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actual Size"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Theoretical Size"})]}),u.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.theoretical_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){function s(){return i("delete_record",{index:d.index})}return s}()})})]},d.index)})]})})})})}return y}()},1754:function(T,r,n){"use strict";r.__esModule=!0,r.Tank=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Tank=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c;return i.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:i.connected?"check":"times",content:i.connected?"Internals On":"Internals Off",selected:i.connected,onClick:function(){function p(){return C("internals")}return p}()})}):c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.createComponentVNode)(2,o.Window,{width:325,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tank Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:i.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:i.ReleasePressure===i.minReleasePressure,tooltip:"Min",onClick:function(){function p(){return C("pressure",{pressure:"min"})}return p}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(i.releasePressure),width:"65px",unit:"kPa",minValue:i.minReleasePressure,maxValue:i.maxReleasePressure,onChange:function(){function p(u,d){return C("pressure",{pressure:d})}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:i.ReleasePressure===i.maxReleasePressure,tooltip:"Max",onClick:function(){function p(){return C("pressure",{pressure:"max"})}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:i.ReleasePressure===i.defaultReleasePressure,tooltip:"Reset",onClick:function(){function p(){return C("pressure",{pressure:"reset"})}return p}()})]}),c]})})})})}return b}()},7579:function(T,r,n){"use strict";r.__esModule=!0,r.TankDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TankDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.o_tanks,p=i.p_tanks;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:c===0,icon:"arrow-circle-down",onClick:function(){function u(){return C("oxygen")}return u}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+p+")",disabled:p===0,icon:"arrow-circle-down",onClick:function(){function u(){return C("plasma")}return u}()})})]})})})}return b}()},16136:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsCore=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TcommsCore=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.ion,l=(0,a.useLocalState)(c,"tabIndex",0),h=l[0],N=l[1],v=function(){function f(g){switch(g){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return f}();return(0,e.createComponentVNode)(2,o.Window,{width:900,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[s===1&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"wrench",selected:h===0,onClick:function(){function f(){return N(0)}return f}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:h===1,onClick:function(){function f(){return N(1)}return f}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:h===2,onClick:function(){function f(){return N(2)}return f}(),children:"User Filtering"},"FilterPage")]}),v(h)]})})}return C}(),b=function(){return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},y=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.active,l=d.sectors_available,h=d.nttc_toggle_jobs,N=d.nttc_toggle_job_color,v=d.nttc_toggle_name_color,f=d.nttc_toggle_command_bold,g=d.nttc_job_indicator_type,V=d.nttc_setting_language,S=d.network_id;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"On":"Off",selected:s,icon:"power-off",onClick:function(){function I(){return u("toggle_active")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:l})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Radio Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcements",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"user-tag",onClick:function(){function I(){return u("nttc_toggle_jobs")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:N?"On":"Off",selected:N,icon:"clipboard-list",onClick:function(){function I(){return u("nttc_toggle_job_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function I(){return u("nttc_toggle_name_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:f?"On":"Off",selected:f,icon:"volume-up",onClick:function(){function I(){return u("nttc_toggle_command_bold")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Advanced",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcement Format",children:(0,e.createComponentVNode)(2,t.Button,{content:g||"Unset",selected:g,icon:"pencil-alt",onClick:function(){function I(){return u("nttc_job_indicator_type")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Language Conversion",children:(0,e.createComponentVNode)(2,t.Button,{content:V||"Unset",selected:V,icon:"globe",onClick:function(){function I(){return u("nttc_setting_language")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:S||"Unset",selected:S,icon:"server",onClick:function(){function I(){return u("network_id")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){function I(){return u("import")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function I(){return u("export")}return I}()})]})],4)},B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.link_password,l=d.relay_entries;return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linkage Password",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"lock",onClick:function(){function h(){return u("change_password")}return h}()})})}),(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Unlink"})]}),l.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.status===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Online"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Offline"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",onClick:function(){function N(){return u("unlink",{addr:h.addr})}return N}()})})]},h.addr)})]})]})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.filtered_users;return(0,e.createComponentVNode)(2,t.Section,{title:"User Filtering",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Add User",icon:"user-plus",onClick:function(){function l(){return u("add_filter")}return l}()}),children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"90%"},children:"User"}),(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),s.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function h(){return u("remove_filter",{user:l})}return h}()})})]},l)})]})})}},88046:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsRelay=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TcommsRelay=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.linked,d=p.active,s=p.network_id;return(0,e.createComponentVNode)(2,o.Window,{width:600,height:292,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Relay Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){function l(){return c("toggle_active")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"server",onClick:function(){function l(){return c("network_id")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:u===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),u===1?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})})}return B}(),b=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.linked_core_id,d=p.linked_core_addr,s=p.hidden_link;return(0,e.createComponentVNode)(2,t.Section,{title:"Link Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core ID",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hidden Link",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){function l(){return c("toggle_hidden_link")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function l(){return c("unlink")}return l}()})})]})})},y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.cores;return(0,e.createComponentVNode)(2,t.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),u.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function s(){return c("link",{addr:d.addr})}return s}()})})]},d.addr)})]})})}},20802:function(T,r,n){"use strict";r.__esModule=!0,r.Teleporter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Teleporter=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.targetsTeleport?i.targetsTeleport:{},p=0,u=1,d=2,s=i.calibrated,l=i.calibrating,h=i.powerstation,N=i.regime,v=i.teleporterhub,f=i.target,g=i.locked,V=i.adv_beacon_allowed,S=i.advanced_beacon_locking;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:270,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:[(!h||!v)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[v,!h&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),h&&!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),h&&v&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Status",buttons:(0,e.createFragment)(!!V&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xA0"}),(0,e.createComponentVNode)(2,t.Button,{selected:S,icon:S?"toggle-on":"toggle-off",content:S?"Enabled":"Disabled",onClick:function(){function I(){return C("advanced_beacon_locking",{on:S?0:1})}return I}()})],4),0),children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[N===p&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:f,disabled:l,options:Object.keys(c),color:f!=="None"?"default":"bad",onSelected:function(){function I(L){return C("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),N===u&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:f,disabled:l,options:Object.keys(c),color:f!=="None"?"default":"bad",onSelected:function(){function I(L){return C("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),N===d&&(0,e.createComponentVNode)(2,t.Box,{children:f})]})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Regime:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:N===u?"good":null,onClick:function(){function I(){return C("setregime",{regime:u})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:N===p?"good":null,onClick:function(){function I(){return C("setregime",{regime:p})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:N===d?"good":null,disabled:!g,onClick:function(){function I(){return C("setregime",{regime:d})}return I}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{label:"Calibration",mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[f!=="None"&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:15.8,textAlign:"center",mt:.5,children:l&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"In Progress"})||s&&(0,e.createComponentVNode)(2,t.Box,{color:"good",children:"Optimal"})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Sub-Optimal"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!(s||l),onClick:function(){function I(){return C("calibrate")}return I}()})})]}),f==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(g&&h&&v&&N===d)&&(0,e.createComponentVNode)(2,t.Section,{title:"GPS",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){function I(){return C("load")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function I(){return C("eject")}return I}()})]})})]})})})})}return b}()},48517:function(T,r,n){"use strict";r.__esModule=!0,r.TelescienceConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TelescienceConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.last_msg,p=i.linked_pad,u=i.held_gps,d=i.lastdata,s=i.power_levels,l=i.current_max_power,h=i.current_power,N=i.current_bearing,v=i.current_elevation,f=i.current_sector,g=i.working,V=i.max_z,S=(0,a.useLocalState)(B,"dummyrot",N),I=S[0],L=S[1];return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createFragment)([c,!(d.length>0)||(0,e.createVNode)(1,"ul",null,d.map(function(w){return(0,e.createVNode)(1,"li",null,w,0,null,w)}),0)],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Telepad Status",children:p===1?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Bearing",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:g,value:N,onDrag:function(){function w(A,x){return L(x)}return w}(),onChange:function(){function w(A,x){return C("setbear",{bear:x})}return w}()}),(0,e.createComponentVNode)(2,t.Icon,{ml:1,size:1,name:"arrow-up",rotation:I})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Elevation",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:g,value:v,onChange:function(){function w(A,x){return C("setelev",{elev:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Level",children:s.map(function(w,A){return(0,e.createComponentVNode)(2,t.Button,{content:w,selected:h===w,disabled:A>=l-1||g,onClick:function(){function x(){return C("setpwr",{pwr:A+1})}return x}()},w)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Sector",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:V,value:f,disabled:g,onChange:function(){function w(A,x){return C("setz",{newz:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Telepad Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Send",disabled:g,onClick:function(){function w(){return C("pad_send")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Receive",disabled:g,onClick:function(){function w(){return C("pad_receive")}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Crystal Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Recalibrate Crystals",disabled:g,onClick:function(){function w(){return C("recal_crystals")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Crystals",disabled:g,onClick:function(){function w(){return C("eject_crystals")}return w}()})]})]}):(0,e.createFragment)([(0,e.createTextVNode)("No pad linked to console. Please use a multitool to link a pad.")],4)}),(0,e.createComponentVNode)(2,t.Section,{title:"GPS Actions",children:u===1?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{disabled:u===0||g,content:"Eject GPS",onClick:function(){function w(){return C("eject_gps")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===0||g,content:"Store Coordinates",onClick:function(){function w(){return C("store_to_gps")}return w}()})],4):(0,e.createFragment)([(0,e.createTextVNode)("Please insert a GPS to store coordinates to it.")],4)})]})})}return b}()},21800:function(T,r,n){"use strict";r.__esModule=!0,r.TempGun=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.TempGun=function(){function C(i,c){var p=(0,t.useBackend)(c),u=p.act,d=p.data,s=d.target_temperature,l=d.temperature,h=d.max_temp,N=d.min_temp;return(0,e.createComponentVNode)(2,m.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:N,maxValue:h,value:s,format:function(){function v(f){return(0,a.toFixed)(f,2)}return v}(),width:"50px",onDrag:function(){function v(f,g){return u("target_temperature",{target_temperature:g})}return v}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:y(l),bold:l>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(l,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:k(l),children:B(l)})})]})})})})}return C}(),y=function(i){return i<=-100?"blue":i<=0?"teal":i<=100?"green":i<=200?"orange":"red"},B=function(i){return i<=100-273.15?"High":i<=250-273.15?"Medium":i<=300-273.15?"Low":i<=400-273.15?"Medium":"High"},k=function(i){return i<=100-273.15?"red":i<=250-273.15?"orange":i<=300-273.15?"green":i<=400-273.15?"orange":"red"}},24410:function(T,r,n){"use strict";r.__esModule=!0,r.sanitizeMultiline=r.removeAllSkiplines=r.TextInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(72253),m=n(92986),b=n(36036),y=n(98595),B=r.sanitizeMultiline=function(){function c(p){return p.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),k=r.removeAllSkiplines=function(){function c(p){return p.replace(/[\r\n]+/,"")}return c}(),C=r.TextInputModal=function(){function c(p,u){var d=(0,o.useBackend)(u),s=d.act,l=d.data,h=l.max_length,N=l.message,v=N===void 0?"":N,f=l.multiline,g=l.placeholder,V=l.timeout,S=l.title,I=(0,o.useLocalState)(u,"input",g||""),L=I[0],w=I[1],A=function(){function P(j){if(j!==L){var M=f?B(j):k(j);w(M)}}return P}(),x=f||L.length>=40,E=130+(v.length>40?Math.ceil(v.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,y.Window,{title:S,width:325,height:E,children:[V&&(0,e.createComponentVNode)(2,a.Loader,{value:V}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function P(j){var M=window.event?j.which:j.keyCode;M===m.KEY_ENTER&&(!x||!j.shiftKey)&&s("submit",{entry:L}),M===m.KEY_ESCAPE&&s("cancel")}return P}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{input:L,onType:A})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:L,message:L.length+"/"+h})})]})})})]})}return c}(),i=function(p,u){var d=(0,o.useBackend)(u),s=d.act,l=d.data,h=l.max_length,N=l.multiline,v=p.input,f=p.onType,g=N||v.length>=40;return(0,e.createComponentVNode)(2,b.TextArea,{autoFocus:!0,autoSelect:!0,height:N||v.length>=40?"100%":"1.8rem",maxLength:h,onEscape:function(){function V(){return s("cancel")}return V}(),onEnter:function(){function V(S){g&&S.shiftKey||(S.preventDefault(),s("submit",{entry:v}))}return V}(),onInput:function(){function V(S,I){return f(I)}return V}(),placeholder:"Type something...",value:v})}},25036:function(T,r,n){"use strict";r.__esModule=!0,r.ThermoMachine=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.ThermoMachine=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data;return(0,e.createComponentVNode)(2,m.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"Status",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.temperature,format:function(){function p(u){return(0,a.toFixed)(u,2)}return p}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function p(u){return(0,a.toFixed)(u,2)}return p}()})," kPa"]})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Controls",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){function p(){return i("power")}return p}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Setting",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){function p(){return i("cooling")}return p}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){function p(){return i("target",{target:c.min})}return p}()}),(0,e.createComponentVNode)(2,o.NumberInput,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onDrag:function(){function p(u,d){return i("target",{target:d})}return p}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function p(){return i("target",{target:c.max})}return p}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function p(){return i("target",{target:c.initial})}return p}()})]})]})})]})})}return y}()},20035:function(T,r,n){"use strict";r.__esModule=!0,r.TransferValve=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TransferValve=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.tank_one,p=i.tank_two,u=i.attached_device,d=i.valve;return(0,e.createComponentVNode)(2,o.Window,{width:460,height:285,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Valve Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!p,onClick:function(){function s(){return C("toggle")}return s}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!u,onClick:function(){function s(){return C("device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:u?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){function s(){return C("remove_device")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Assembly"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment One",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:c?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:c,disabled:!c,onClick:function(){function s(){return C("tankone")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment Two",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:p?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:p,disabled:!p,onClick:function(){function s(){return C("tanktwo")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})})]})})}return b}()},78166:function(T,r,n){"use strict";r.__esModule=!0,r.TurbineComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(44879),b=r.TurbineComputer=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.compressor,s=u.compressor_broken,l=u.turbine,h=u.turbine_broken,N=u.online,v=!!(d&&!s&&l&&!h);return(0,e.createComponentVNode)(2,o.Window,{width:400,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:N?"power-off":"times",content:N?"Online":"Offline",selected:N,disabled:!v,onClick:function(){function f(){return p("toggle_power")}return f}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function f(){return p("disconnect")}return f}()})],4),children:v?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)})})})}return k}(),y=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.compressor,d=p.compressor_broken,s=p.turbine,l=p.turbine_broken,h=p.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!u||d?"bad":"good",children:d?u?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!s||l?"bad":"good",children:l?s?"Offline":"Missing":"Online"})]})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.rpm,d=p.temperature,s=p.power,l=p.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[u," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[d," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Generated Power",children:[s," W"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bearing Heat",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,m.toFixed)(l)+"%"})})]})}},52847:function(T,r,n){"use strict";r.__esModule=!0,r.Uplink=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(25328),m=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(N){switch(N){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,l);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},C=r.Uplink=function(){function h(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.cart,I=(0,m.useLocalState)(v,"tabIndex",0),L=I[0],w=I[1],A=(0,m.useLocalState)(v,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,y.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Tabs,{children:[(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0),E("")}return P}(),icon:"store",children:"View Market"},"PurchasePage"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1),E("")}return P}(),icon:"shopping-cart",children:["View Shopping Cart ",S&&S.length?"("+S.length+")":""]},"Cart"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2),E("")}return P}(),icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{onClick:function(){function P(){return g("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(L)})]})})]})}return h}(),i=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.crystals,I=V.cats,L=(0,m.useLocalState)(v,"uplinkItems",I[0].items),w=L[0],A=L[1],x=(0,m.useLocalState)(v,"searchText",""),E=x[0],P=x[1],j=function(U,K){K===void 0&&(K="");var G=(0,o.createSearch)(K,function($){var Q=$.hijack_only===1?"|hijack":"";return $.name+"|"+$.desc+"|"+$.cost+"tc"+Q});return(0,t.flow)([(0,a.filter)(function($){return $==null?void 0:$.name}),K&&(0,a.filter)(G),(0,a.sortBy)(function($){return $==null?void 0:$.name})])(U)},M=function(U){if(P(U),U==="")return A(I[0].items);A(j(I.map(function(K){return K.items}).flat(),U))},O=(0,m.useLocalState)(v,"showDesc",1),D=O[0],F=O[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Current Balance: "+S+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:D,onClick:function(){function W(){return F(!D)}return W}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Random Item",icon:"question",onClick:function(){function W(){return g("buyRandom")}return W}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function W(){return g("refund")}return W}()})],4),children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function W(U,K){M(K)}return W}(),value:E})})})}),(0,e.createComponentVNode)(2,b.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:I.map(function(W){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:E!==""?!1:W.items===w,onClick:function(){function U(){A(W.items),P("")}return U}(),children:W.cat},W)})})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:w.map(function(W){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,u,{i:W,showDecription:D},(0,o.decodeHtmlEntities)(W.name))},(0,o.decodeHtmlEntities)(W.name))})})})})]})]})},c=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.cart,I=V.crystals,L=V.cart_price,w=(0,m.useLocalState)(v,"showDesc",0),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Current Balance: "+I+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:A,onClick:function(){function E(){return x(!A)}return E}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Empty Cart",icon:"trash",onClick:function(){function E(){return g("empty_cart")}return E}(),disabled:!S}),(0,e.createComponentVNode)(2,b.Button,{content:"Purchase Cart ("+L+"TC)",icon:"shopping-cart",onClick:function(){function E(){return g("purchase_cart")}return E}(),disabled:!S||L>I})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:S?S.map(function(E){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,u,{i:E,showDecription:A,buttons:(0,e.createComponentVNode)(2,s,{i:E})})},(0,o.decodeHtmlEntities)(E.name))}):(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,e.createComponentVNode)(2,p)]})},p=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.cats,I=V.lucky_numbers;return(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"dice",content:"See more suggestions",onClick:function(){function L(){return g("shuffle_lucky_numbers")}return L}()}),children:(0,e.createComponentVNode)(2,b.Stack,{wrap:!0,children:I.map(function(L){return S[L.cat].items[L.item]}).filter(function(L){return L!=null}).map(function(L,w){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",children:(0,e.createComponentVNode)(2,u,{grow:!0,i:L})},w)})})})})},u=function(N,v){var f=N.i,g=N.showDecription,V=g===void 0?1:g,S=N.buttons,I=S===void 0?(0,e.createComponentVNode)(2,d,{i:f}):S;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(f.name),showBottom:V,buttons:I,children:V?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(f.desc)}):null})},d=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=N.i,I=V.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",color:S.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function L(){return g("add_to_cart",{item:S.obj_path})}return L}(),disabled:S.cost>I}),(0,e.createComponentVNode)(2,b.Button,{content:"Buy ("+S.cost+"TC)"+(S.refundable?" [Refundable]":""),color:S.hijack_only===1&&"red",tooltip:S.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function L(){return g("buyItem",{item:S.obj_path})}return L}(),disabled:S.cost>I})],4)},s=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=N.i,I=V.exploitable;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+S.cost*S.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function L(){return g("remove_from_cart",{item:S.obj_path})}return L}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",tooltip:S.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function L(){return g("set_cart_item_quantity",{item:S.obj_path,quantity:--S.amount})}return L}(),disabled:S.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:S.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:S.limit===0&&"Discount already redeemed!",onCommit:function(){function L(w,A){return g("set_cart_item_quantity",{item:S.obj_path,quantity:A})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit&&S.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:S.limit===0&&"Discount already redeemed!",onClick:function(){function L(){return g("set_cart_item_quantity",{item:S.obj_path,quantity:++S.amount})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit})]})},l=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.exploitable,I=(0,m.useLocalState)(v,"selectedRecord",S[0]),L=I[0],w=I[1],A=(0,m.useLocalState)(v,"searchText",""),x=A[0],E=A[1],P=function(O,D){D===void 0&&(D="");var F=(0,o.createSearch)(D,function(W){return W.name});return(0,t.flow)([(0,a.filter)(function(W){return W==null?void 0:W.name}),D&&(0,a.filter)(F),(0,a.sortBy)(function(W){return W.name})])(O)},j=P(S,x);return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(){function M(O,D){return E(D)}return M}()}),(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:j.map(function(M){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:M===L,onClick:function(){function O(){return w(M)}return O}(),children:M.name},M)})})]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:L.name,children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:L.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:L.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:L.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:L.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:L.species})]})})})]})}},12261:function(T,r,n){"use strict";r.__esModule=!0,r.Vending=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=B.product,u=B.productStock,d=B.productImage,s=c.chargesMoney,l=c.user,h=c.usermoney,N=c.inserted_cash,v=c.vend_ready,f=c.inserted_item_name,g=!s||p.price===0,V="ERROR!",S="";g?(V="FREE",S="arrow-circle-down"):(V=p.price,S="shopping-cart");var I=!v||u===0||!g&&p.price>h&&p.price>N;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:u<=0&&"bad"||u<=p.max_amount/2&&"average"||"good",children:[u," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:I,icon:S,content:V,textAlign:"left",onClick:function(){function L(){return i("vend",{inum:p.inum})}return L}()})})]})},b=r.Vending=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.user,u=c.usermoney,d=c.inserted_cash,s=c.chargesMoney,l=c.product_records,h=l===void 0?[]:l,N=c.hidden_records,v=N===void 0?[]:N,f=c.stock,g=c.vend_ready,V=c.inserted_item_name,S=c.panel_open,I=c.speaker,L=c.imagelist,w;return w=[].concat(h),c.extended_inventory&&(w=[].concat(w,v)),w=w.filter(function(A){return!!A}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((s?171:89)+w.length*32,585),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!s&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:(0,e.createVNode)(1,"span",null,V,0,{style:{"text-transform":"capitalize"}}),onClick:function(){function A(){return i("eject_item",{})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!d,icon:"money-bill-wave-alt",content:d?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,d,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:d?"Dispense Change":null,textAlign:"left",onClick:function(){function A(){return i("change")}return A}()})})]}),children:p&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,p.name,0),", ",(0,e.createVNode)(1,"b",null,p.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[u,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!S&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"check":"volume-mute",selected:I,content:"Speaker",textAlign:"left",onClick:function(){function A(){return i("toggle_voice",{})}return A}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:(0,e.createComponentVNode)(2,t.Table,{children:w.map(function(A){return(0,e.createComponentVNode)(2,m,{product:A,productStock:f[A.name],productImage:L[A.path]},A.name)})})})})]})})})}return y}()},68971:function(T,r,n){"use strict";r.__esModule=!0,r.VolumeMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.VolumeMixer=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.channels;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:Math.min(95+c.length*50,565),children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:c.map(function(p,u){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:u>0&&"0.5rem",children:p.name}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:.5,children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return C("volume",{channel:p.num,volume:0})}return d}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:p.volume,onChange:function(){function d(s,l){return C("volume",{channel:p.num,volume:l})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return C("volume",{channel:p.num,volume:100})}return d}()})})})]})})],4,p.num)})})})})}return b}()},2510:function(T,r,n){"use strict";r.__esModule=!0,r.VotePanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.VotePanel=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.remaining,p=i.question,u=i.choices,d=i.user_vote,s=i.counts,l=i.show_counts;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:360,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:p,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),u.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,translucent:!0,lineHeight:3,multiLine:h,content:h+(l?" ("+(s[h]||0)+")":""),onClick:function(){function N(){return C("vote",{target:h})}return N}(),selected:h===d})},h)})]})})})}return b}()},30138:function(T,r,n){"use strict";r.__esModule=!0,r.Wires=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Wires=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.wires||[],p=i.status||[],u=56+c.length*23+(status?0:15+p.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:u,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:d.color_name,labelColor:d.seen_color,color:d.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:d.cut?"Mend":"Cut",onClick:function(){function s(){return C("cut",{wire:d.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function s(){return C("pulse",{wire:d.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:d.attached?"Detach":"Attach",onClick:function(){function s(){return C("attach",{wire:d.color})}return s}()})],4),children:!!d.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),d.wire,(0,e.createTextVNode)(")")],0)},d.seen_color)})})})}),!!p.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:p.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:d},d)})})})]})})})}return b}()},21400:function(T,r,n){"use strict";r.__esModule=!0,r.WizardApprenticeContract=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.WizardApprenticeContract=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.used;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:555,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,e.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),c?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,e.createComponentVNode)(2,t.Section,{title:"Which school of magic is your apprentice studying?",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,e.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("fire")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,e.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("translocation")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,e.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("restoration")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,e.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("stealth")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,e.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,e.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("honk")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})})]})})}return b}()},49148:function(T,r,n){"use strict";r.__esModule=!0,r.AccessList=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036);function m(C,i){var c=typeof Symbol!="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(c)return(c=c.call(C)).next.bind(c);if(Array.isArray(C)||(c=b(C))||i&&C&&typeof C.length=="number"){c&&(C=c);var p=0;return function(){return p>=C.length?{done:!0}:{done:!1,value:C[p++]}}}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 b(C,i){if(C){if(typeof C=="string")return y(C,i);var c={}.toString.call(C).slice(8,-1);return c==="Object"&&C.constructor&&(c=C.constructor.name),c==="Map"||c==="Set"?Array.from(C):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?y(C,i):void 0}}function y(C,i){(i==null||i>C.length)&&(i=C.length);for(var c=0,p=Array(i);c0&&!V.includes(D.ref)&&!f.includes(D.ref),checked:f.includes(D.ref),onClick:function(){function F(){return S(D.ref)}return F}()},D.desc)})]})]})})}return C}()},26991:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosScan=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036),m=function(B,k,C,i,c){return Bi?"average":B>c?"bad":"good"},b=r.AtmosScan=function(){function y(B,k){var C=B.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(i){return i.val!=="0"||i.entry==="Pressure"||i.entry==="Temperature"})(C).map(function(i){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:i.entry,color:m(i.val,i.bad_low,i.poor_low,i.poor_high,i.bad_high),children:[i.val,i.units]},i.entry)})})})}return y}()},85870:function(T,r,n){"use strict";r.__esModule=!0,r.BeakerContents=void 0;var e=n(89005),a=n(36036),t=n(15964),o=function(y){return y+" unit"+(y===1?"":"s")},m=r.BeakerContents=function(){function b(y){var B=y.beakerLoaded,k=y.beakerContents,C=k===void 0?[]:k,i=y.buttons;return(0,e.createComponentVNode)(2,a.Stack,{vertical:!0,children:[!B&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"No beaker loaded."})||C.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),C.map(function(c,p){return(0,e.createComponentVNode)(2,a.Stack,{children:[(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",grow:!0,children:[o(c.volume)," of ",c.name]},c.name),!!i&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:i(c,p)})]},c.name)})]})}return b}();m.propTypes={beakerLoaded:t.bool,beakerContents:t.array,buttons:t.arrayOf(t.element)}},92963:function(T,r,n){"use strict";r.__esModule=!0,r.BotStatus=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.BotStatus=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.locked,c=C.noaccess,p=C.maintpanel,u=C.on,d=C.autopatrol,s=C.canhack,l=C.emagged,h=C.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",i?"unlock":"lock"," this interface."]}),(0,e.createComponentVNode)(2,t.Section,{title:"General Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:c,onClick:function(){function N(){return k("power")}return N}()})}),d!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){function N(){return k("autopatrol")}return N}()})}),!!p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Maintenance Panel",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Panel Open!"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety System",children:(0,e.createComponentVNode)(2,t.Box,{color:l?"bad":"good",children:l?"DISABLED!":"Enabled"})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:l?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function N(){return k("hack")}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!h,content:"AI Remote Control",disabled:c,onClick:function(){function N(){return k("disableremote")}return N}()})})]})})],4)}return m}()},3939:function(T,r,n){"use strict";r.__esModule=!0,r.modalRegisterBodyOverride=r.modalOpen=r.modalClose=r.modalAnswer=r.ComplexModal=void 0;var e=n(89005),a=n(72253),t=n(36036),o={},m=r.modalOpen=function(){function C(i,c,p){var u=(0,a.useBackend)(i),d=u.act,s=u.data,l=Object.assign(s.modal?s.modal.args:{},p||{});d("modal_open",{id:c,arguments:JSON.stringify(l)})}return C}(),b=r.modalRegisterBodyOverride=function(){function C(i,c){o[i]=c}return C}(),y=r.modalAnswer=function(){function C(i,c,p,u){var d=(0,a.useBackend)(i),s=d.act,l=d.data;if(l.modal){var h=Object.assign(l.modal.args||{},u||{});s("modal_answer",{id:c,answer:p,arguments:JSON.stringify(h)})}}return C}(),B=r.modalClose=function(){function C(i,c){var p=(0,a.useBackend)(i),u=p.act;u("modal_close",{id:c})}return C}(),k=r.ComplexModal=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.data;if(u.modal){var d=u.modal,s=d.id,l=d.text,h=d.type,N,v=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function L(){return B(c)}return L}()}),f,g,V="auto";if(o[s])f=o[s](u.modal,c);else if(h==="input"){var S=u.modal.value;N=function(){function L(w){return y(c,s,S)}return L}(),f=(0,e.createComponentVNode)(2,t.Input,{value:u.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function L(w,A){S=A}return L}()}),g=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){function L(){return B(c)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,S)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(h==="choice"){var I=typeof u.modal.choices=="object"?Object.values(u.modal.choices):u.modal.choices;f=(0,e.createComponentVNode)(2,t.Dropdown,{options:I,selected:u.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function L(w){return y(c,s,w)}return L}()}),V="initial"}else h==="bento"?f=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:u.modal.choices.map(function(L,w){return(0,e.createComponentVNode)(2,t.Stack.Item,{flex:"1 1 auto",children:(0,e.createComponentVNode)(2,t.Button,{selected:w+1===parseInt(u.modal.value,10),onClick:function(){function A(){return y(c,s,w+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:L})})},w)})}):h==="boolean"&&(g=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:u.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function L(){return y(c,s,0)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:u.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,1)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:i.maxWidth||window.innerWidth/2+"px",maxHeight:i.maxHeight||window.innerHeight/2+"px",onEnter:N,mx:"auto",overflowY:V,"padding-bottom":"5px",children:[l&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:l}),o[s]&&v,f,g]})}}return C}()},41874:function(T,r,n){"use strict";r.__esModule=!0,r.CrewManifest=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(25328),m=n(76910),b=m.COLORS.department,y=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],B=function(p){return y.indexOf(p)!==-1?"green":"orange"},k=function(p){if(y.indexOf(p)!==-1)return!0},C=function(p){return p.length>0&&(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,color:"white",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"50%",children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"35%",children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"15%",children:"Active"})]}),p.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{color:B(u.rank),bold:k(u.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(u.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(u.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.active})]},u.name+u.rank)})]})},i=r.CrewManifest=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l;if(p.data)l=p.data;else{var h=(0,a.useBackend)(u),N=h.data;l=N}var v=l,f=v.manifest,g=f.heads,V=f.sec,S=f.eng,I=f.med,L=f.sci,w=f.ser,A=f.sup,x=f.misc;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.command,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:C(g)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.security,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:C(V)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.engineering,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:C(S)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.medical,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:C(I)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.science,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:C(L)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.service,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:C(w)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.supply,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:C(A)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:C(x)})]})}return c}()},19203:function(T,r,n){"use strict";r.__esModule=!0,r.InputButtons=void 0;var e=n(89005),a=n(36036),t=n(72253),o=r.InputButtons=function(){function m(b,y){var B=(0,t.useBackend)(y),k=B.act,C=B.data,i=C.large_buttons,c=C.swapped_buttons,p=b.input,u=b.message,d=b.disabled,s=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!i,fluid:!!i,onClick:function(){function h(){return k("submit",{entry:p})}return h}(),textAlign:"center",tooltip:i&&u,disabled:d,width:!i&&6}),l=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!i,fluid:!!i,onClick:function(){function h(){return k("cancel")}return h}(),textAlign:"center",width:!i&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:l}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:l}),!i&&u&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:u})}),i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,mr:c?.5:0,ml:c?0:.5,children:s}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:s})]})}return m}()},195:function(T,r,n){"use strict";r.__esModule=!0,r.InterfaceLockNoticeBox=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.InterfaceLockNoticeBox=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=b.siliconUser,c=i===void 0?C.siliconUser:i,p=b.locked,u=p===void 0?C.locked:p,d=b.normallyLocked,s=d===void 0?C.normallyLocked:d,l=b.onLockStatusChange,h=l===void 0?function(){return k("lock")}:l,N=b.accessText,v=N===void 0?"an ID card":N;return c?(0,e.createComponentVNode)(2,t.NoticeBox,{color:c&&"grey",children:(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:"Interface lock status:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:"1"}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{m:"0",color:s?"red":"green",icon:s?"lock":"unlock",content:s?"Locked":"Unlocked",onClick:function(){function f(){h&&h(!u)}return f}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",v," to ",u?"unlock":"lock"," this interface."]})}return m}()},51057:function(T,r,n){"use strict";r.__esModule=!0,r.Loader=void 0;var e=n(89005),a=n(44879),t=n(36036),o=r.Loader=function(){function m(b){var y=b.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(y)*100+"%"}}),2)}return m}()},321:function(T,r,n){"use strict";r.__esModule=!0,r.LoginInfo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginInfo=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.loginState;if(C)return(0,e.createComponentVNode)(2,t.NoticeBox,{info:!0,children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:["Logged in as: ",i.name," (",i.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!i.id,content:"Eject ID",color:"good",onClick:function(){function c(){return k("login_eject")}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){function c(){return k("login_logout")}return c}()})]})]})})}return m}()},5485:function(T,r,n){"use strict";r.__esModule=!0,r.LoginScreen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginScreen=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.loginState,c=C.isAI,p=C.isRobot,u=C.isAdmin;return(0,e.createComponentVNode)(2,t.Section,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",align:"center",justify:"center",children:(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,e.createComponentVNode)(2,t.Box,{color:"label",my:"1rem",children:["ID:",(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:i.id?i.id:"----------",ml:"0.5rem",onClick:function(){function d(){return k("login_insert")}return d}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!i.id,content:"Login",onClick:function(){function d(){return k("login_login",{login_type:1})}return d}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function d(){return k("login_login",{login_type:2})}return d}()}),!!p&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function d(){return k("login_login",{login_type:3})}return d}()}),!!u&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function d(){return k("login_login",{login_type:4})}return d}()})]})})})}return m}()},62411:function(T,r,n){"use strict";r.__esModule=!0,r.Operating=void 0;var e=n(89005),a=n(36036),t=n(15964),o=r.Operating=function(){function m(b){var y=b.operating,B=b.name;if(y)return(0,e.createComponentVNode)(2,a.Dimmer,{children:(0,e.createComponentVNode)(2,a.Flex,{mb:"30px",children:(0,e.createComponentVNode)(2,a.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,e.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,e.createVNode)(1,"br"),"The ",B," is processing..."]})})})}return m}();o.propTypes={operating:t.bool,name:t.string}},13545:function(T,r,n){"use strict";r.__esModule=!0,r.Signaler=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=r.Signaler=function(){function b(y,B){var k=(0,t.useBackend)(B),C=k.act,i=y.data,c=i.code,p=i.frequency,u=i.minFrequency,d=i.maxFrequency;return(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:u/10,maxValue:d/10,value:p/10,format:function(){function s(l){return(0,a.toFixed)(l,1)}return s}(),width:"80px",onDrag:function(){function s(l,h){return C("freq",{freq:h})}return s}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:c,width:"80px",onDrag:function(){function s(l,h){return C("code",{code:h})}return s}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){function s(){return C("signal")}return s}()})]})}return b}()},41984:function(T,r,n){"use strict";r.__esModule=!0,r.SimpleRecords=void 0;var e=n(89005),a=n(72253),t=n(25328),o=n(64795),m=n(88510),b=n(36036),y=r.SimpleRecords=function(){function C(i,c){var p=i.data.records;return(0,e.createComponentVNode)(2,b.Box,{children:p?(0,e.createComponentVNode)(2,k,{data:i.data,recordType:i.recordType}):(0,e.createComponentVNode)(2,B,{data:i.data})})}return C}(),B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=i.data.recordsList,s=(0,a.useLocalState)(c,"searchText",""),l=s[0],h=s[1],N=function(g,V){V===void 0&&(V="");var S=(0,t.createSearch)(V,function(I){return I.Name});return(0,o.flow)([(0,m.filter)(function(I){return I==null?void 0:I.Name}),V&&(0,m.filter)(S),(0,m.sortBy)(function(I){return I.Name})])(d)},v=N(d,l);return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function f(g,V){return h(V)}return f}()}),v.map(function(f){return(0,e.createComponentVNode)(2,b.Box,{children:(0,e.createComponentVNode)(2,b.Button,{mb:.5,content:f.Name,icon:"user",onClick:function(){function g(){return u("Records",{target:f.uid})}return g}()})},f)})]})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=i.data.records,s=d.general,l=d.medical,h=d.security,N;switch(i.recordType){case"MED":N=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Medical Data",children:l?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Blood Type",children:l.blood_type}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Disabilities",children:l.mi_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.mi_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Disabilities",children:l.ma_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.ma_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Allergies",children:l.alg}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.alg_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Current Diseases",children:l.cdi}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.cdi_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:l.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":N=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Security Data",children:h?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Criminal Status",children:h.criminal}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Crimes",children:h.mi_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:h.mi_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Crimes",children:h.ma_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:h.ma_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:h.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Security record lost!"})});break}return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Section,{title:"General Data",children:s?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Name",children:s.name}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:s.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:s.species}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:s.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:s.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:s.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Physical Status",children:s.p_stat}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mental Status",children:s.m_stat})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"General record lost!"})}),N]})}},22091:function(T,r,n){"use strict";r.__esModule=!0,r.TemporaryNotice=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.TemporaryNotice=function(){function m(b,y){var B,k=(0,a.useBackend)(y),C=k.act,i=k.data,c=i.temp;if(c){var p=(B={},B[c.style]=!0,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},p,{children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:c.text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"times-circle",onClick:function(){function u(){return C("cleartemp")}return u}()})})]})})))}}return m}()},80818:function(T,r,n){"use strict";r.__esModule=!0,r.pai_atmosphere=void 0;var e=n(89005),a=n(72253),t=n(26991),o=r.pai_atmosphere=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:C.app_data})}return m}()},23903:function(T,r,n){"use strict";r.__esModule=!0,r.pai_bioscan=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_bioscan=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.holder,p=i.dead,u=i.health,d=i.brute,s=i.oxy,l=i.tox,h=i.burn,N=i.temp;return c?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:p?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"Dead"}):(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"green",children:"Alive"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:0,max:1,value:u/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"blue",children:s})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxin Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:h})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"red",children:d})})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Error: No biological host found."})}return m}()},64988:function(T,r,n){"use strict";r.__esModule=!0,r.pai_directives=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_directives=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.master,p=i.dna,u=i.prime,d=i.supplemental;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master",children:c?c+" ("+p+")":"None"}),c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Request DNA",children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){function s(){return k("getdna")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Prime Directive",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Supplemental Directives",children:d||"None"})]}),(0,e.createComponentVNode)(2,t.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,e.createComponentVNode)(2,t.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."})]})}return m}()},13813:function(T,r,n){"use strict";r.__esModule=!0,r.pai_doorjack=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_doorjack=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.cable,p=i.machine,u=i.inprogress,d=i.progress,s=i.aborted,l;p?l=(0,e.createComponentVNode)(2,t.Button,{selected:!0,content:"Connected"}):l=(0,e.createComponentVNode)(2,t.Button,{content:c?"Extended":"Retracted",color:c?"orange":null,onClick:function(){function N(){return k("cable")}return N}()});var h;return p&&(h=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hack",children:[(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:d,maxValue:100}),u?(0,e.createComponentVNode)(2,t.Button,{mt:1,color:"red",content:"Abort",onClick:function(){function N(){return k("cancel")}return N}()}):(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Start",onClick:function(){function N(){return k("jack")}return N}()})]})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cable",children:l}),h]})}return m}()},66025:function(T,r,n){"use strict";r.__esModule=!0,r.pai_main_menu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_main_menu=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.available_software,p=i.installed_software,u=i.installed_toggles,d=i.available_ram,s=i.emotions,l=i.current_emotion,h=i.speech_verbs,N=i.current_speech_verb,v=i.available_chassises,f=i.current_chassis,g=[];return p.map(function(V){return g[V.key]=V.name}),u.map(function(V){return g[V.key]=V.name}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available RAM",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Software",children:[c.filter(function(V){return!g[V.key]}).map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name+" ("+V.cost+")",icon:V.icon,disabled:V.cost>d,onClick:function(){function S(){return k("purchaseSoftware",{key:V.key})}return S}()},V.key)}),c.filter(function(V){return!g[V.key]}).length===0&&"No software available!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Software",children:[p.filter(function(V){return V.key!=="mainmenu"}).map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,icon:V.icon,onClick:function(){function S(){return k("startSoftware",{software_key:V.key})}return S}()},V.key)}),p.length===0&&"No software installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Toggles",children:[u.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,icon:V.icon,selected:V.active,onClick:function(){function S(){return k("setToggle",{toggle_key:V.key})}return S}()},V.key)}),u.length===0&&"No toggles installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Emotion",children:s.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.id===l,onClick:function(){function S(){return k("setEmotion",{emotion:V.id})}return S}()},V.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Speaking State",children:h.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.name===N,onClick:function(){function S(){return k("setSpeechStyle",{speech_state:V.name})}return S}()},V.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Chassis Type",children:v.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.icon===f,onClick:function(){function S(){return k("setChassis",{chassis_to_change:V.icon})}return S}()},V.id)})})]})})}return m}()},2983:function(T,r,n){"use strict";r.__esModule=!0,r.pai_manifest=void 0;var e=n(89005),a=n(72253),t=n(41874),o=r.pai_manifest=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest,{data:C.app_data})}return m}()},40758:function(T,r,n){"use strict";r.__esModule=!0,r.pai_medrecords=void 0;var e=n(89005),a=n(72253),t=n(41984),o=r.pai_medrecords=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k.app_data,recordType:"MED"})}return m}()},98599:function(T,r,n){"use strict";r.__esModule=!0,r.pai_messenger=void 0;var e=n(89005),a=n(72253),t=n(77595),o=r.pai_messenger=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data.active_convo;return i?(0,e.createComponentVNode)(2,t.ActiveConversation,{data:C.app_data}):(0,e.createComponentVNode)(2,t.MessengerList,{data:C.app_data})}return m}()},50775:function(T,r,n){"use strict";r.__esModule=!0,r.pai_radio=void 0;var e=n(89005),a=n(72253),t=n(44879),o=n(36036),m=r.pai_radio=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.app_data,p=c.minFrequency,u=c.maxFrequency,d=c.frequency,s=c.broadcasting;return(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:p/10,maxValue:u/10,value:d/10,format:function(){function l(h){return(0,t.toFixed)(h,1)}return l}(),onChange:function(){function l(h,N){return C("freq",{freq:N})}return l}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Reset",icon:"undo",onClick:function(){function l(){return C("freq",{freq:"145.9"})}return l}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function l(){return C("toggleBroadcast")}return l}(),selected:s,content:s?"Enabled":"Disabled"})})]})}return b}()},48623:function(T,r,n){"use strict";r.__esModule=!0,r.pai_secrecords=void 0;var e=n(89005),a=n(72253),t=n(41984),o=r.pai_secrecords=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k.app_data,recordType:"SEC"})}return m}()},47297:function(T,r,n){"use strict";r.__esModule=!0,r.pai_signaler=void 0;var e=n(89005),a=n(72253),t=n(13545),o=r.pai_signaler=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.Signaler,{data:C.app_data})}return m}()},78532:function(T,r,n){"use strict";r.__esModule=!0,r.pda_atmos_scan=void 0;var e=n(89005),a=n(72253),t=n(26991),o=r.pda_atmos_scan=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:k})}return m}()},40253:function(T,r,n){"use strict";r.__esModule=!0,r.pda_janitor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pda_janitor=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.janitor,c=i.user_loc,p=i.mops,u=i.buckets,d=i.cleanbots,s=i.carts,l=i.janicarts;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Locations",children:p.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - ",h.status]},h)})}),u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Bucket Locations",children:u.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - [",h.volume,"/",h.max_volume,"]"]},h)})}),d&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cleanbot Locations",children:d.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - ",h.status]},h)})}),s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - [",h.volume,"/",h.max_volume,"]"]},h)})}),l&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janicart Locations",children:l.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.direction_from_user,")"]},h)})})]})}return m}()},58293:function(T,r,n){"use strict";r.__esModule=!0,r.pda_main_menu=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=r.pda_main_menu=function(){function b(y,B){var k=(0,t.useBackend)(B),C=k.act,i=k.data,c=i.owner,p=i.ownjob,u=i.idInserted,d=i.categories,s=i.pai,l=i.notifying;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",color:"average",children:[c,", ",p]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID",children:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){function h(){return C("UpdateInfo")}return h}()})})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Functions",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:d.map(function(h){var N=i.apps[h];return!N||!N.length?null:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:h,children:N.map(function(v){return(0,e.createComponentVNode)(2,o.Button,{icon:v.uid in l?v.notify_icon:v.icon,iconSpin:v.uid in l,color:v.uid in l?"red":"transparent",content:v.name,onClick:function(){function f(){return C("StartProgram",{program:v.uid})}return f}()},v.uid)})},h)})})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!s&&(0,e.createComponentVNode)(2,o.Section,{title:"pAI",children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){function h(){return C("pai",{option:1})}return h}()}),(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){function h(){return C("pai",{option:2})}return h}()})]})})]})}return b}()},58059:function(T,r,n){"use strict";r.__esModule=!0,r.pda_manifest=void 0;var e=n(89005),a=n(72253),t=n(41874),o=r.pda_manifest=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest)}return m}()},18147:function(T,r,n){"use strict";r.__esModule=!0,r.pda_medical=void 0;var e=n(89005),a=n(72253),t=n(41984),o=r.pda_medical=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k,recordType:"MED"})}return m}()},77595:function(T,r,n){"use strict";r.__esModule=!0,r.pda_messenger=r.MessengerList=r.ActiveConversation=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036),m=r.pda_messenger=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.active_convo;return d?(0,e.createComponentVNode)(2,b,{data:u}):(0,e.createComponentVNode)(2,y,{data:u})}return k}(),b=r.ActiveConversation=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=C.data,d=u.convo_name,s=u.convo_job,l=u.messages,h=u.active_convo,N=(0,t.useLocalState)(i,"clipboardMode",!1),v=N[0],f=N[1],g=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:v,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return f(!v)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return p("Message",{target:h})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===h})(l).map(function(V,S){return(0,e.createComponentVNode)(2,o.Box,{textAlign:V.sent?"right":"left",position:"relative",mb:1,children:[(0,e.createComponentVNode)(2,o.Icon,{fontSize:2.5,color:V.sent?"#4d9121":"#cd7a0d",position:"absolute",left:V.sent?null:"0px",right:V.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:V.sent?"scale(-1, 1)":null},name:"comment"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,backgroundColor:V.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:V.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"normal"},children:[V.sent?"You:":"Them:"," ",V.message]})]},S)})});return v&&(g=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:v,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return f(!v)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return p("Message",{target:h})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===h})(l).map(function(V,S){return(0,e.createComponentVNode)(2,o.Box,{color:V.sent?"#4d9121":"#cd7a0d",style:{"word-break":"normal"},children:[V.sent?"You:":"Them:"," ",(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:V.message})]},S)})})),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:.5,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Delete Conversations",confirmContent:"Are you sure?",icon:"trash",confirmIcon:"trash",onClick:function(){function V(){return p("Clear",{option:"Convo"})}return V}()})})})}),g]})}return k}(),y=r.MessengerList=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=C.data,d=u.convopdas,s=u.pdas,l=u.charges,h=u.silent,N=u.toff,v=u.ringtone_list,f=u.ringtone,g=(0,t.useLocalState)(i,"searchTerm",""),V=g[0],S=g[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:5,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"volume-mute":"volume-up",onClick:function(){function I(){return p("Toggle Ringer")}return I}(),children:["Ringer: ",h?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{color:N?"bad":"green",icon:"power-off",onClick:function(){function I(){return p("Toggle Messenger")}return I}(),children:["Messenger: ",N?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",color:"bad",onClick:function(){function I(){return p("Clear",{option:"All"})}return I}(),children:"Delete All Conversations"}),(0,e.createComponentVNode)(2,o.Button,{icon:"bell",onClick:function(){function I(){return p("Ringtone")}return I}(),children:"Set Custom Ringtone"}),(0,e.createComponentVNode)(2,o.Button,{children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:f,width:"100px",options:Object.keys(v),onSelected:function(){function I(L){return p("Available_Ringtones",{selected_ringtone:L})}return I}()})})]})}),!N&&(0,e.createComponentVNode)(2,o.Box,{children:[!!l&&(0,e.createComponentVNode)(2,o.Box,{mt:.5,mb:1,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cartridge Special Function",children:[l," charges left."]})})}),!d.length&&!s.length&&(0,e.createComponentVNode)(2,o.Box,{children:"No current conversations"})||(0,e.createComponentVNode)(2,o.Box,{children:["Search:"," ",(0,e.createComponentVNode)(2,o.Input,{mt:.5,value:V,onInput:function(){function I(L,w){S(w)}return I}()})]})]})||(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Messenger Offline."})]}),(0,e.createComponentVNode)(2,B,{title:"Current Conversations",data:u,pdas:d,msgAct:"Select Conversation",searchTerm:V}),(0,e.createComponentVNode)(2,B,{title:"Other PDAs",pdas:s,msgAct:"Message",data:u,searchTerm:V})]})}return k}(),B=function(C,i){var c=(0,t.useBackend)(i),p=c.act,u=C.data,d=C.pdas,s=C.title,l=C.msgAct,h=C.searchTerm,N=u.charges,v=u.plugins;return!d||!d.length?(0,e.createComponentVNode)(2,o.Section,{title:s,children:"No PDAs found."}):(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:s,children:d.filter(function(f){return f.Name.toLowerCase().includes(h.toLowerCase())}).map(function(f){return(0,e.createComponentVNode)(2,o.Stack,{m:.5,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"arrow-circle-down",content:f.Name,onClick:function(){function g(){return p(l,{target:f.uid})}return g}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!N&&v.map(function(g){return(0,e.createComponentVNode)(2,o.Button,{icon:g.icon,content:g.name,onClick:function(){function V(){return p("Messenger Plugin",{plugin:g.uid,target:f.uid})}return V}()},g.uid)})})]},f.uid)})})}},24635:function(T,r,n){"use strict";r.__esModule=!0,r.pda_mule=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pda_mule=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.mulebot,u=p.active;return(0,e.createComponentVNode)(2,t.Box,{children:u?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,m)})}return y}(),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.mulebot,u=p.bots;return u.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:d.Name,icon:"cog",onClick:function(){function s(){return i("control",{bot:d.uid})}return s}()})},d.Name)})},b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.mulebot,u=p.botstatus,d=p.active,s=u.mode,l=u.loca,h=u.load,N=u.powr,v=u.dest,f=u.home,g=u.retn,V=u.pick,S;switch(s){case 0:S="Ready";break;case 1:S="Loading/Unloading";break;case 2:case 12:S="Navigating to delivery location";break;case 3:S="Navigating to Home";break;case 4:S="Waiting for clear path";break;case 5:case 6:S="Calculating navigation path";break;case 7:S="Unable to locate destination";break;default:S=s;break}return(0,e.createComponentVNode)(2,t.Section,{title:d,children:[s===-1&&(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:[N,"%"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Home",children:f}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:(0,e.createComponentVNode)(2,t.Button,{content:v?v+" (Set)":"None (Set)",onClick:function(){function I(){return i("target")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Load",children:(0,e.createComponentVNode)(2,t.Button,{content:h?h+" (Unload)":"None",disabled:!h,onClick:function(){function I(){return i("unload")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Pickup",children:(0,e.createComponentVNode)(2,t.Button,{content:V?"Yes":"No",selected:V,onClick:function(){function I(){return i("set_pickup_type",{autopick:V?0:1})}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Return",children:(0,e.createComponentVNode)(2,t.Button,{content:g?"Yes":"No",selected:g,onClick:function(){function I(){return i("set_auto_return",{autoret:g?0:1})}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Stop",icon:"stop",onClick:function(){function I(){return i("stop")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Proceed",icon:"play",onClick:function(){function I(){return i("start")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Return Home",icon:"home",onClick:function(){function I(){return i("home")}return I}()})]})]})]})}},23734:function(T,r,n){"use strict";r.__esModule=!0,r.pda_nanobank=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=r.pda_nanobank=function(){function u(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.logged_in,f=N.owner_name,g=N.money;return v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Name",children:f}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:["$",g]})]})}),(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y)]})],4):(0,e.createComponentVNode)(2,i)}return u}(),b=function(d,s){var l=(0,t.useBackend)(s),h=l.data,N=h.is_premium,v=(0,t.useLocalState)(s,"tabIndex",1),f=v[0],g=v[1];return(0,e.createComponentVNode)(2,o.Tabs,{mt:2,children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===1,onClick:function(){function V(){return g(1)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transfers"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===2,onClick:function(){function V(){return g(2)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Account Actions"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===3,onClick:function(){function V(){return g(3)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transaction History"]}),!!N&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===4,onClick:function(){function V(){return g(4)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Supply Orders"]})]})},y=function(d,s){var l=(0,t.useLocalState)(s,"tabIndex",1),h=l[0],N=(0,t.useBackend)(s),v=N.data,f=v.db_status;if(!f)return(0,e.createComponentVNode)(2,o.Box,{children:"Account Database Connection Severed"});switch(h){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);case 3:return(0,e.createComponentVNode)(2,C);case 4:return(0,e.createComponentVNode)(2,p);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},B=function(d,s){var l,h=(0,t.useBackend)(s),N=h.act,v=h.data,f=v.requests,g=v.available_accounts,V=v.money,S=(0,t.useLocalState)(s,"selectedAccount"),I=S[0],L=S[1],w=(0,t.useLocalState)(s,"transferAmount"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"searchText",""),P=E[0],j=E[1],M=[];return g.map(function(O){return M[O.name]=O.UID}),(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account",children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account name",onInput:function(){function O(D,F){return j(F)}return O}()}),(0,e.createComponentVNode)(2,o.Dropdown,{mt:.6,width:"190px",options:g.filter((0,a.createSearch)(P,function(O){return O.name})).map(function(O){return O.name}),selected:(l=g.filter(function(O){return O.UID===I})[0])==null?void 0:l.name,onSelected:function(){function O(D){return L(M[D])}return O}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Amount",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Up to 5000",onInput:function(){function O(D,F){return x(F)}return O}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:V0&&l.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["#",N.Number,' - "',N.Name,'" for "',N.OrderedBy,'"']},N)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Approved Orders",children:s>0&&d.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["#",N.Number,' - "',N.Name,'" for "',N.ApprovedBy,'"']},N)})})]})}return m}()},17617:function(T,r,n){"use strict";r.__esModule=!0,r.Layout=void 0;var e=n(89005),a=n(35840),t=n(55937),o=n(24826),m=["className","theme","children"],b=["className","scrollable","children"];/** + */var b=(0,t.createLogger)("hotkeys"),y={},B=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],k={},C=function(l){if(l===16)return"Shift";if(l===17)return"Ctrl";if(l===18)return"Alt";if(l===33)return"Northeast";if(l===34)return"Southeast";if(l===35)return"Southwest";if(l===36)return"Northwest";if(l===37)return"West";if(l===38)return"North";if(l===39)return"East";if(l===40)return"South";if(l===45)return"Insert";if(l===46)return"Delete";if(l>=48&&l<=57||l>=65&&l<=90)return String.fromCharCode(l);if(l>=96&&l<=105)return"Numpad"+(l-96);if(l>=112&&l<=123)return"F"+(l-111);if(l===188)return",";if(l===189)return"-";if(l===190)return"."},i=function(l){var h=String(l);if(h==="Ctrl+F5"||h==="Ctrl+R"){location.reload();return}if(h!=="Ctrl+F"&&!(l.event.defaultPrevented||l.isModifierKey()||B.includes(l.code))){h==="F5"&&(l.event.preventDefault(),l.event.returnValue=!1);var N=C(l.code);if(N){var v=y[N];if(v)return b.debug("macro",v),Byond.command(v);if(l.isDown()&&!k[N]){k[N]=!0;var f='Key_Down "'+N+'"';return b.debug(f),Byond.command(f)}if(l.isUp()&&k[N]){k[N]=!1;var g='Key_Up "'+N+'"';return b.debug(g),Byond.command(g)}}}},c=r.acquireHotKey=function(){function s(l){B.push(l)}return s}(),p=r.releaseHotKey=function(){function s(l){var h=B.indexOf(l);h>=0&&B.splice(h,1)}return s}(),u=r.releaseHeldKeys=function(){function s(){for(var l=0,h=Object.keys(k);l=75?c="green":i.integrity>=25?c="yellow":c="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:c,value:i.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,i.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(p,u){return(0,e.createComponentVNode)(2,t.Box,{children:p},u)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.wireless?"check":"times",content:i.wireless?"Enabled":"Disabled",color:i.wireless?"green":"red",onClick:function(){function p(){return C("wireless")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.radio?"check":"times",content:i.radio?"Enabled":"Disabled",color:i.radio?"green":"red",onClick:function(){function p(){return C("radio")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:i.flushing||i.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function p(){return C("wipe")}return p}()})})]})})})]})})})}return b}()},39454:function(T,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AIFixer=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;if(i.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var c=!0;(i.stat===2||i.stat===null)&&(c=!1);var p=null;i.integrity>=75?p="green":i.integrity>=25?p="yellow":p="red";var u=!0;return i.integrity>=100&&i.stat!==2&&(u=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:p,value:i.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(d,s){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d},s)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.wireless?"times":"check",content:i.wireless?"Disabled":"Enabled",color:i.wireless?"red":"green",onClick:function(){function d(){return C("wireless")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.radio?"times":"check",content:i.radio?"Disabled":"Enabled",color:i.radio?"red":"green",onClick:function(){function d(){return C("radio")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!u||i.active,content:!u||i.active?"Already Repaired":"Repair",onClick:function(){function d(){return C("fix")}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:i.active?"Reconstruction in progress.":""})]})})]})})})}return b}()},88422:function(T,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(195),b=r.APC=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return C}(),y={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"}},B={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"}},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.locked&&!d.siliconUser,l=d.normallyLocked,h=y[d.externalPower]||y[0],N=y[d.chargingStatus]||y[0],v=d.powerChannels||[],f=B[d.malfStatus]||B[0],g=d.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,m.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:h.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.isOperating?"power-off":"times",content:d.isOperating?"On":"Off",selected:d.isOperating&&!s,color:d.isOperating?"":"bad",disabled:s,onClick:function(){function V(){return u("breaker")}return V}()}),children:["[ ",h.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:g})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:N.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.chargeMode?"sync":"times",content:d.chargeMode?"Auto":"Off",selected:d.chargeMode,disabled:s,onClick:function(){function V(){return u("charge")}return V}()}),children:["[ ",N.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.map(function(V){var S=V.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:V.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:V.status>=2?"good":"bad",children:V.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!s&&(V.status===1||V.status===3),disabled:s,onClick:function(){function I(){return u("channel",S.auto)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!s&&V.status===2,disabled:s,onClick:function(){function I(){return u("channel",S.on)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!s&&V.status===0,disabled:s,onClick:function(){function I(){return u("channel",S.off)}return I}()})],4),children:[V.powerLoad," W"]},V.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[d.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!d.siliconUser&&(0,e.createFragment)([!!d.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){function V(){return u(f.action)}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function V(){return u("overload")}return V}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:d.coverLocked?"lock":"unlock",content:d.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){function V(){return u("cover")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:d.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){function V(){return u("emergency_lighting")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:d.nightshiftLights?"Enabled":"Disabled",onClick:function(){function V(){return u("toggle_nightshift")}return V}()})})]})})],4)}},99660:function(T,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ATM=function(){function p(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.view_screen,v=h.authenticated_account,f=h.ticks_left_locked_down,g=h.linked_db,V;if(f>0)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!g)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(v)switch(N){case 1:V=(0,e.createComponentVNode)(2,y);break;case 2:V=(0,e.createComponentVNode)(2,B);break;case 3:V=(0,e.createComponentVNode)(2,i);break;default:V=(0,e.createComponentVNode)(2,k)}else V=(0,e.createComponentVNode)(2,C);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Section,{children:V})]})})}return p}(),b=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.machine_id,v=h.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"eject",onClick:function(){function f(){return l("insert_card")}return f}()})})})]})},y=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:N===0,onClick:function(){function v(){return l("change_security_level",{new_security_level:1})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:N===2,onClick:function(){function v(){return l("change_security_level",{new_security_level:2})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},B=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=(0,a.useLocalState)(d,"targetAccNumber",0),v=N[0],f=N[1],g=(0,a.useLocalState)(d,"fundsAmount",0),V=g[0],S=g[1],I=(0,a.useLocalState)(d,"purpose",0),L=I[0],w=I[1],A=h.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function x(E,P){return f(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function x(E,P){return S(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function x(E,P){return w(P)}return x}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function x(){return l("transfer",{target_acc_number:v,funds_amount:V,purpose:L})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},k=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=(0,a.useLocalState)(d,"fundsAmount",0),v=N[0],f=N[1],g=h.owner_name,V=h.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+g,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function S(){return l("logout")}return S}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",V]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function S(I,L){return f(L)}return S}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function S(){return l("withdrawal",{funds_amount:v})}return S}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function S(){return l("view_screen",{view_screen:1})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function S(){return l("view_screen",{view_screen:2})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function S(){return l("view_screen",{view_screen:3})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function S(){return l("balance_statement")}return S}()})})]})],4)},C=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=(0,a.useLocalState)(d,"accountID",null),v=N[0],f=N[1],g=(0,a.useLocalState)(d,"accountPin",null),V=g[0],S=g[1],I=h.machine_id,L=h.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return f(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return S(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function w(){return l("attempt_auth",{account_num:v,account_pin:V})}return w}()})})]})})},i=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),N.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:v.is_deposit?"green":"red",children:["$",v.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.target_name})]},v)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function N(){return l("view_screen",{view_screen:0})}return N}()})}},86423:function(T,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(36352),b=n(98595),y=n(321),B=n(5485),k=r.AccountsUplinkTerminal=function(){function h(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.loginState,I=V.currentPage,L;if(S.logged_in)I===1?L=(0,e.createComponentVNode)(2,i):I===2?L=(0,e.createComponentVNode)(2,s):I===3&&(L=(0,e.createComponentVNode)(2,l));else return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B.LoginScreen)})})});return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:L})]})})})}return h}(),C=function(N,v){var f=(0,t.useBackend)(v),g=f.data,V=(0,t.useLocalState)(v,"tabIndex",0),S=V[0],I=V[1],L=g.login_state;return(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,mb:1,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===0,onClick:function(){function w(){return I(0)}return w}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===1,onClick:function(){function w(){return I(1)}return w}(),children:"Department Accounts"})]})})})},i=function(N,v){var f=(0,t.useLocalState)(v,"tabIndex",0),g=f[0];switch(g){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,p);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.accounts,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1],A=(0,t.useLocalState)(v,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(v,"sortOrder",!0),j=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,u,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,u,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,u,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,u,{id:"money",children:"Account Balance"})]}),S.filter((0,a.createSearch)(L,function(O){return O.owner_name+"|"+O.account_number+"|"+O.suspended+"|"+O.money})).sort(function(O,D){var F=j?1:-1;return O[x].localeCompare(D[x])*F}).map(function(O){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+O.suspended,onClick:function(){function D(){return g("view_account_detail",{account_num:O.account_number})}return D}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",O.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",O.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.money})]},O.account_number)})]})})})]})},p=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.department_accounts;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,m.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,m.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,m.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,m.TableCell,{children:"Account Balance"})]}),S.map(function(I){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+I.suspended,onClick:function(){function L(){return g("view_account_detail",{account_num:I.account_number})}return L}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"wallet"})," ",I.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",I.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.money})]},I.account_number)})]})})})})},u=function(N,v){var f=(0,t.useLocalState)(v,"sortId","name"),g=f[0],V=f[1],S=(0,t.useLocalState)(v,"sortOrder",!0),I=S[0],L=S[1],w=N.id,A=N.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:g!==w&&"transparent",width:"100%",onClick:function(){function x(){g===w?L(!I):(V(w),L(!0))}return x}(),children:[A,g===w&&(0,e.createComponentVNode)(2,o.Icon,{name:I?"sort-up":"sort-down",ml:"0.25rem;"})]})})},d=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.is_printing,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function A(){return g("create_new_account")}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function A(x,E){return w(E)}return A}()})})]})},s=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=V.account_number,I=V.owner_name,L=V.money,w=V.suspended,A=V.transactions,x=V.account_pin,E=V.is_department_account;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+S+" / "+I,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return g("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",S]}),!!E&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin",children:x}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin Actions",children:(0,e.createComponentVNode)(2,o.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:!!E,onClick:function(){function P(){return g("set_account_pin",{account_number:S})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:I}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:L}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:w?"red":"green",children:[w?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:w?"Unsuspend":"Suspend",icon:w?"unlock":"lock",onClick:function(){function P(){return g("toggle_suspension")}return P}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),A.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:P.is_deposit?"green":"red",children:["$",P.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.target_name})]},P)})]})})})]})},l=function(N,v){var f=(0,t.useBackend)(v),g=f.act,V=f.data,S=(0,t.useLocalState)(v,"accName",""),I=S[0],L=S[1],w=(0,t.useLocalState)(v,"accDeposit",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function E(){return g("back")}return E}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function E(P,j){return L(j)}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function E(P,j){return x(j)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return g("finalise_create_account",{holder_name:I,starting_funds:A})}return E}()})]})}},79571:function(T,r,n){"use strict";r.__esModule=!0,r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=[{name:"Male",icon:"mars"},{name:"Female",icon:"venus"},{name:"Genderless",icon:"genderless"}],b=["A+","A-","B+","B-","AB+","AB-","O+","O-"],y=r.AgentCard=function(){function c(p,u){var d=(0,a.useLocalState)(u,"tabIndex",0),s=d[0],l=d[1],h=function(){function N(v){switch(v){case 0:return(0,e.createComponentVNode)(2,C);case 1:return(0,e.createComponentVNode)(2,i);default:return(0,e.createComponentVNode)(2,C)}}return N}();return(0,e.createComponentVNode)(2,o.Window,{width:405,height:505,theme:"syndicate",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"table",selected:s===0,onClick:function(){function N(){return l(0)}return N}(),children:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F"},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:s===1,onClick:function(){function N(){return l(1)}return N}(),children:"\u0412\u043D\u0435\u0448\u043D\u0438\u0439 \u0432\u0438\u0434"},"Appearance")]})}),h(s)]})})})}return c}(),B="\u041F\u0443\u0441\u0442\u043E",k=function(p){var u=p.label,d=p.value,s=p.onCommit,l=p.onClick,h=p.onRClick,N=p.tooltip;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Input,{fluid:!0,textAlign:"center",content:d||B,onCommit:s})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"file-signature",tooltip:N,tooltipPosition:"bottom-end",onClick:l,onContextMenu:h})})]})})},C=r.AgentCardInfo=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.registered_name,N=l.sex,v=l.age,f=l.assignment,g=l.associated_account_number,V=l.blood_type,S=l.dna_hash,I=l.fingerprint_hash,L=l.photo,w=l.ai_tracking,A=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("\u0410\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("\u041B\u041A\u041C - \u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043E\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("\u041F\u041A\u041C - \u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0447\u0443\u0436\u043E\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440.")],4);return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NoticeBox,{m:0,children:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438 \u043D\u0435 \u0432\u043B\u0438\u044F\u044E\u0442 \u043D\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u044B."})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,k,{label:"\u0418\u043C\u044F",value:h,tooltip:A,onCommit:function(){function x(E,P){return s("change_name",{name:P})}return x}(),onClick:function(){function x(){return s("change_name",{option:"Primary"})}return x}(),onRClick:function(){function x(E){E.preventDefault(),s("change_name",{option:"Secondary"})}return x}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u043B",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:m.map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:x.icon,content:x.name,selected:N===x.name,onClick:function(){function E(){return s("change_sex",{sex:x.name})}return E}()})},x.name)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0412\u043E\u0437\u0440\u0430\u0441\u0442",children:(0,e.createComponentVNode)(2,t.Slider,{fluid:!0,minValue:17,value:v||0,maxValue:300,onChange:function(){function x(E,P){return s("change_age",{age:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:f||B,onClick:function(){function x(){return s("change_occupation")}return x}()})}),(0,e.createComponentVNode)(2,k,{label:"\u041E\u0442\u043F\u0435\u0447\u0430\u0442\u043A\u0438",value:I,tooltip:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043E\u0438 \u043E\u0442\u043F\u0435\u0447\u0430\u0442\u043A\u0438.",onCommit:function(){function x(E,P){return s("change_fingerprints",{new_fingerprints:P})}return x}(),onClick:function(){function x(){return s("change_fingerprints",{option:"Primary"})}return x}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u043F \u043A\u0440\u043E\u0432\u0438",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:b.map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:x,selected:V===x,onClick:function(){function E(){return s("change_blood_type",{new_type:x})}return E}()})},x)})})}),(0,e.createComponentVNode)(2,k,{label:"\u0414\u041D\u041A",value:S,onCommit:function(){function x(E,P){return s("change_dna_hash",{new_dna:P})}return x}(),onClick:function(){function x(){return s("change_dna_hash",{option:"Primary"})}return x}(),tooltip:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043E\u0451 \u0414\u041D\u041A."}),(0,e.createComponentVNode)(2,k,{label:"\u0410\u043A\u043A\u0430\u0443\u043D\u0442",value:g||0,onCommit:function(){function x(E,P){return s("change_money_account",{new_account:P})}return x}(),onClick:function(){function x(){return s("change_money_account",{option:"Primary"})}return x}(),tooltip:"\u0412\u0432\u0435\u0441\u0442\u0438 \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0446\u0438\u0444\u0440."}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0424\u043E\u0442\u043E",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:L?"Update":B,onClick:function(){function x(){return s("change_photo")}return x}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u0430\u0440\u0442\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E",confirmContent:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?",onClick:function(){function x(){return s("delete_info")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0414\u043E\u0441\u0442\u0443\u043F\u044B",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u044B",confirmContent:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?",onClick:function(){function x(){return s("clear_access")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0418\u0418",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:w?"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E":"\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E",onClick:function(){function x(){return s("change_ai_tracking")}return x}()})})]})})})],4)}return c}(),i=r.AgentCardAppearances=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=(0,a.useSharedState)(u,"selectedAppearance",""),N=h[0],v=h[1],f=l.appearances;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0412\u043D\u0435\u0448\u043D\u0438\u0439 \u0432\u0438\u0434",children:Object.entries(f).map(function(g){var V=g[0],S=g[1];return(0,e.createComponentVNode)(2,t.ImageButton,{m:.5,base64:S,imageSize:58,selected:N===V,onClick:function(){function I(){v(V),s("change_appearance",{new_appearance:V})}return I}()},V)})})})}return c}()},56793:function(T,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},b=r.AiAirlock=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=m[c.power.main]||m[0],u=m[c.power.backup]||m[0],d=m[c.shock]||m[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:p.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function s(){return i("disrupt-main")}return s}()}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"["+c.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:u.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function s(){return i("disrupt-backup")}return s}()}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"["+c.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:d.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&c.shock!==2),content:"Restore",onClick:function(){function s(){return i("shock-restore")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){function s(){return i("shock-temp")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!c.wires.shock||c.shock===0,content:"Permanent",onClick:function(){function s(){return i("shock-perm")}return s}()})],4),children:[c.shock===2?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"["+c.shock_timeleft+"s]"||c.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){function s(){return i("idscan-toggle")}return s}()}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){function s(){return i("emergency-toggle")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){function s(){return i("bolt-toggle")}return s}()}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){function s(){return i("light-toggle")}return s}()}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){function s(){return i("safe-toggle")}return s}()}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){function s(){return i("speed-toggle")}return s}()}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){function s(){return i("open-close")}return s}()}),children:!!(c.locked||c.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return y}()},72475:function(T,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(195),b=r.AirAlarm=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:f?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,B),!f&&(0,e.createFragment)([(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C)],4)]})})}return d}(),y=function(s){return s===0?"green":s===1?"orange":"red"},B=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.air,g=v.mode,V=v.atmos_alarm,S=v.locked,I=v.alarmActivated,L=v.rcon,w=v.target_temp,A;return f.danger.overall===0?V===0?A="Optimal":A="Caution: Atmos alert in area":f.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:f?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:y(f.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:f.pressure})," kPa",!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:g===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:g===3,icon:"exclamation-triangle",onClick:function(){function x(){return N("mode",{mode:g===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.oxygen/100,fractionDigits:"1",color:y(f.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.nitrogen/100,fractionDigits:"1",color:y(f.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.co2/100,fractionDigits:"1",color:y(f.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.plasma/100,fractionDigits:"1",color:y(f.danger.plasma)})}),f.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.n2o/100,fractionDigits:"1",color:y(f.danger.n2o)})}),f.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:f.contents.other/100,fractionDigits:"1",color:y(f.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:y(f.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:f.temperature})," K / ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:f.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function x(){return N("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:f.thermostat_state?"On":"Off",selected:f.thermostat_state,icon:"power-off",onClick:function(){function x(){return N("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:y(f.danger.overall),children:[A,!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:I?"Reset Alarm":"Activate Alarm",selected:I,onClick:function(){function x(){return N(I?"atmos_reset":"atmos_alarm")}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:L===1,onClick:function(){function x(){return N("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function x(){return N("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function x(){return N("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},k=function(s,l){var h=(0,a.useLocalState)(l,"tabIndex",0),N=h[0],v=h[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===0,onClick:function(){function f(){return v(0)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===1,onClick:function(){function f(){return v(1)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===2,onClick:function(){function f(){return v(2)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:N===3,onClick:function(){function f(){return v(3)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},C=function(s,l){var h=(0,a.useLocalState)(l,"tabIndex",0),N=h[0],v=h[1];switch(N){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,p);case 3:return(0,e.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},i=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.vents;return f.map(function(g){return(0,e.createComponentVNode)(2,t.Section,{title:g.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:g.power?"On":"Off",selected:g.power,icon:"power-off",onClick:function(){function V(){return N("command",{cmd:"power",val:!g.power,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:g.direction?"Blowing":"Siphoning",icon:g.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function V(){return N("command",{cmd:"direction",val:!g.direction,id_tag:g.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:g.checks===1,onClick:function(){function V(){return N("command",{cmd:"checks",val:1,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:g.checks===2,onClick:function(){function V(){return N("command",{cmd:"checks",val:2,id_tag:g.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:g.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function V(){return N("command",{cmd:"set_external_pressure",id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function V(){return N("command",{cmd:"set_external_pressure",val:101.325,id_tag:g.id_tag})}return V}()})]})]})},g.name)})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.scrubbers;return f.map(function(g){return(0,e.createComponentVNode)(2,t.Section,{title:g.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:g.power?"On":"Off",selected:g.power,icon:"power-off",onClick:function(){function V(){return N("command",{cmd:"power",val:!g.power,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:g.scrubbing?"Scrubbing":"Siphoning",icon:g.scrubbing?"filter":"sign-in-alt",onClick:function(){function V(){return N("command",{cmd:"scrubbing",val:!g.scrubbing,id_tag:g.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:g.widenet?"Extended":"Normal",selected:g.widenet,icon:"expand-arrows-alt",onClick:function(){function V(){return N("command",{cmd:"widenet",val:!g.widenet,id_tag:g.id_tag})}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:g.filter_co2,onClick:function(){function V(){return N("command",{cmd:"co2_scrub",val:!g.filter_co2,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:g.filter_toxins,onClick:function(){function V(){return N("command",{cmd:"tox_scrub",val:!g.filter_toxins,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:g.filter_n2o,onClick:function(){function V(){return N("command",{cmd:"n2o_scrub",val:!g.filter_n2o,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:g.filter_o2,onClick:function(){function V(){return N("command",{cmd:"o2_scrub",val:!g.filter_o2,id_tag:g.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:g.filter_n2,onClick:function(){function V(){return N("command",{cmd:"n2_scrub",val:!g.filter_n2,id_tag:g.id_tag})}return V}()})]})]})},g.name)})},p=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.modes,g=v.presets,V=v.emagged,S=v.mode,I=v.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:f.map(function(L){return(!L.emagonly||L.emagonly&&!!V)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===S,onClick:function(){function w(){return N("mode",{mode:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:g.map(function(L){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===I,onClick:function(){function w(){return N("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},u=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),f.map(function(g){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:g.name}),g.settings.map(function(V){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:V.selected===-1?"Off":V.selected,onClick:function(){function S(){return N("command",{cmd:"set_threshold",env:V.env,var:V.val})}return S}()})},V.val)})]},g.name)})]})})}},12333:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AirlockAccessController=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.exterior_status,p=i.interior_status,u=i.processing,d,s;return c==="open"?d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:u,onClick:function(){function l(){return C("force_ext")}return l}()}):d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:u,onClick:function(){function l(){return C("cycle_ext_door")}return l}()}),p==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:u,color:p==="open"?"red":u?"yellow":null,onClick:function(){function l(){return C("force_int")}return l}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:u,onClick:function(){function l(){return C("cycle_int_door")}return l}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:c==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:p==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[d,s]})})]})})}return b}()},28736:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(49148),b=1,y=2,B=4,k=8,C=r.AirlockElectronics=function(){function p(u,d){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})})}return p}(),i=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:N&B,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:B})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:N&y,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:y})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:N&k,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:k})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:N&b,onClick:function(){function v(){return l("unrestricted_access",{unres_dir:b})}return v}()})})]})]})})},c=function(u,d){var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.selected_accesses,v=h.one_access,f=h.regions;return(0,e.createComponentVNode)(2,m.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:v,content:"One",onClick:function(){function g(){return l("set_one_access",{access:"one"})}return g}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!v,content:"All",onClick:function(){function g(){return l("set_one_access",{access:"all"})}return g}()})],4),accesses:f,selectedList:N,accessMod:function(){function g(V){return l("set",{access:V})}return g}(),grantAll:function(){function g(){return l("grant_all")}return g}(),denyAll:function(){function g(){return l("clear_all")}return g}(),grantDep:function(){function g(V){return l("grant_region",{region:V})}return g}(),denyDep:function(){function g(V){return l("deny_region",{region:V})}return g}()})}},47365:function(T,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(92986),m=n(36036),b=n(98595),y=-1,B=1,k=r.AlertModal=function(){function c(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=l.autofocus,N=l.buttons,v=N===void 0?[]:N,f=l.large_buttons,g=l.message,V=g===void 0?"":g,S=l.timeout,I=l.title,L=(0,t.useLocalState)(u,"selected",0),w=L[0],A=L[1],x=110+(V.length>30?Math.ceil(V.length/4):0)+(V.length&&f?5:0),E=325+(v.length>2?100:0),P=function(){function j(M){w===0&&M===y?A(v.length-1):w===v.length-1&&M===B?A(0):A(w+M)}return j}();return(0,e.createComponentVNode)(2,b.Window,{title:I,height:x,width:E,children:[!!S&&(0,e.createComponentVNode)(2,a.Loader,{value:S}),(0,e.createComponentVNode)(2,b.Window.Content,{onKeyDown:function(){function j(M){var O=window.event?M.which:M.keyCode;O===o.KEY_SPACE||O===o.KEY_ENTER?s("choose",{choice:v[w]}):O===o.KEY_ESCAPE?s("cancel"):O===o.KEY_LEFT?(M.preventDefault(),P(y)):(O===o.KEY_TAB||O===o.KEY_RIGHT)&&(M.preventDefault(),P(B))}return j}(),children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,m.Box,{color:"label",overflow:"hidden",children:V})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:[!!h&&(0,e.createComponentVNode)(2,m.Autofocus),(0,e.createComponentVNode)(2,C,{selected:w})]})]})})})]})}return c}(),C=function(p,u){var d=(0,t.useBackend)(u),s=d.data,l=s.buttons,h=l===void 0?[]:l,N=s.large_buttons,v=s.swapped_buttons,f=p.selected;return(0,e.createComponentVNode)(2,m.Flex,{fill:!0,align:"center",direction:v?"row":"row-reverse",justify:"space-around",wrap:!0,children:h==null?void 0:h.map(function(g,V){return N&&h.length<3?(0,e.createComponentVNode)(2,m.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{button:g,id:V.toString(),selected:f===V})},V):(0,e.createComponentVNode)(2,m.Flex.Item,{grow:N?1:0,children:(0,e.createComponentVNode)(2,i,{button:g,id:V.toString(),selected:f===V})},V)})})},i=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=l.large_buttons,N=p.button,v=p.selected,f=N.length>7?"100%":7;return(0,e.createComponentVNode)(2,m.Button,{mx:h?1:0,pt:h?.33:0,content:N,fluid:!!h,onClick:function(){function g(){return s("choose",{choice:N})}return g}(),selected:v,textAlign:"center",height:!!h&&2,width:!h&&f})}},71824:function(T,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AppearanceChanger=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.change_race,u=c.species,d=c.specimen,s=c.change_gender,l=c.gender,h=c.change_eye_color,N=c.change_skin_tone,v=c.change_skin_color,f=c.change_runechat_color,g=c.change_head_accessory_color,V=c.change_hair_color,S=c.change_secondary_hair_color,I=c.change_facial_hair_color,L=c.change_secondary_facial_hair_color,w=c.change_head_marking_color,A=c.change_body_marking_color,x=c.change_tail_marking_color,E=c.change_head_accessory,P=c.head_accessory_styles,j=c.head_accessory_style,M=c.change_hair,O=c.hair_styles,D=c.hair_style,F=c.change_hair_gradient,W=c.change_facial_hair,U=c.facial_hair_styles,K=c.facial_hair_style,G=c.change_head_markings,$=c.head_marking_styles,Q=c.head_marking_style,Z=c.change_body_markings,ie=c.body_marking_styles,ne=c.body_marking_style,se=c.change_tail_markings,ve=c.tail_marking_styles,Ve=c.tail_marking_style,ge=c.change_body_accessory,Ce=c.body_accessory_styles,oe=c.body_accessory_style,ce=c.change_alt_head,te=c.alt_head_styles,fe=c.alt_head_style,ue=!1;return(h||N||v||g||f||V||S||I||L||w||A||x)&&(ue=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:u.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.specimen,selected:Y.specimen===d,onClick:function(){function he(){return i("race",{race:Y.specimen})}return he}()},Y.specimen)})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:l==="male",onClick:function(){function Y(){return i("gender",{gender:"male"})}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:l==="female",onClick:function(){function Y(){return i("gender",{gender:"female"})}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:l==="plural",onClick:function(){function Y(){return i("gender",{gender:"plural"})}return Y}()})]}),!!ue&&(0,e.createComponentVNode)(2,b),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.headaccessorystyle,selected:Y.headaccessorystyle===j,onClick:function(){function he(){return i("head_accessory",{head_accessory:Y.headaccessorystyle})}return he}()},Y.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:O.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.hairstyle,selected:Y.hairstyle===D,onClick:function(){function he(){return i("hair",{hair:Y.hairstyle})}return he}()},Y.hairstyle)})}),!!F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function Y(){return i("hair_gradient")}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function Y(){return i("hair_gradient_offset")}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function Y(){return i("hair_gradient_colour")}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function Y(){return i("hair_gradient_alpha")}return Y}()})]}),!!W&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:U.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.facialhairstyle,selected:Y.facialhairstyle===K,onClick:function(){function he(){return i("facial_hair",{facial_hair:Y.facialhairstyle})}return he}()},Y.facialhairstyle)})}),!!G&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:$.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.headmarkingstyle,selected:Y.headmarkingstyle===Q,onClick:function(){function he(){return i("head_marking",{head_marking:Y.headmarkingstyle})}return he}()},Y.headmarkingstyle)})}),!!Z&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:ie.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.bodymarkingstyle,selected:Y.bodymarkingstyle===ne,onClick:function(){function he(){return i("body_marking",{body_marking:Y.bodymarkingstyle})}return he}()},Y.bodymarkingstyle)})}),!!se&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:ve.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.tailmarkingstyle,selected:Y.tailmarkingstyle===Ve,onClick:function(){function he(){return i("tail_marking",{tail_marking:Y.tailmarkingstyle})}return he}()},Y.tailmarkingstyle)})}),!!ge&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:Ce.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.bodyaccessorystyle,selected:Y.bodyaccessorystyle===oe,onClick:function(){function he(){return i("body_accessory",{body_accessory:Y.bodyaccessorystyle})}return he}()},Y.bodyaccessorystyle)})}),!!ce&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:te.map(function(Y){return(0,e.createComponentVNode)(2,t.Button,{content:Y.altheadstyle,selected:Y.altheadstyle===fe,onClick:function(){function he(){return i("alt_head",{alt_head:Y.altheadstyle})}return he}()},Y.altheadstyle)})})]})})})}return y}(),b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=[{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_runechat_color",text:"Change runechat color",action:"runechat_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"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:p.map(function(u){return!!c[u.key]&&(0,e.createComponentVNode)(2,t.Button,{content:u.text,onClick:function(){function d(){return i(u.action)}return d}()},u.key)})})}},72285:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosAlertConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.priority||[],p=i.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[c.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),c.map(function(u){return(0,e.createVNode)(1,"li","color-bad",u,0,null,u)}),p.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),p.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)})})})}return b}()},65805:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(36352),m=n(98595),b=function(c){if(c===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(c===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(c===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},y=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},B=r.AtmosControl=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=(0,a.useLocalState)(p,"tabIndex",0),h=l[0],N=l[1],v=function(){function f(g){switch(g){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,C);default:return"WE SHOULDN'T BE HERE!"}}return f}();return(0,e.createComponentVNode)(2,m.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:h===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===0,onClick:function(){function f(){return N(0)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===1,onClick:function(){function f(){return N(1)}return f}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),v(h)]})})})}return i}(),k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),l.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:h.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:b(h.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function N(){return d("open_alarm",{aref:h.ref})}return N}()})})]},h.name)})]})})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{children:l.filter(function(h){return h.z===3}).map(function(h){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:h.x,y:h.y,icon:"circle",tooltip:h.name,color:y(h.danger),onClick:function(){function N(){return d("open_alarm",{aref:h.ref})}return N}()},h.ref)})})})}},87816:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosFilter=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.on,p=i.pressure,u=i.max_pressure,d=i.filter_type,s=i.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function l(){return C("power")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:p===0,width:2.2,onClick:function(){function l(){return C("min_pressure")}return l}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:p,onDrag:function(){function l(h,N){return C("custom_pressure",{pressure:N})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:p===u,width:2.2,onClick:function(){function l(){return C("max_pressure")}return l}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:s.map(function(l){return(0,e.createComponentVNode)(2,t.Button,{selected:l.gas_type===d,content:l.label,onClick:function(){function h(){return C("set_filter",{filter:l.gas_type})}return h}()},l.label)})})]})})})})}return b}()},57258:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosGraphMonitor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(44879),b=n(88510),y=n(35840),B=["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth","horizontalLinesCount","verticalLinesCount","gridColor","gridWidth","pointTextColor","pointTextSize","labelViewBoxSize"];function k(l,h){if(l==null)return{};var N={};for(var v in l)if({}.hasOwnProperty.call(l,v)){if(h.includes(v))continue;N[v]=l[v]}return N}function C(l,h){l.prototype=Object.create(h.prototype),l.prototype.constructor=l,i(l,h)}function i(l,h){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,v){return N.__proto__=v,N},i(l,h)}var c=r.AtmosGraphMonitor=function(){function l(h,N){var v=(0,a.useBackend)(N),f=v.data,g=(0,a.useLocalState)(N,"tabIndex",0),V=g[0],S=g[1],I=function(){function w(A){switch(A){case 0:return(0,e.createComponentVNode)(2,p,{data:f,info:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u0437\u0430\u043F\u0438\u0441\u0438 T = 60 \u0441. | \u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u043C\u0435\u0436\u0434\u0443 \u0437\u0430\u043F\u0438\u0441\u044F\u043C\u0438 t = 3 \u0441.",pressureListName:"pressure_history",temperatureListName:"temperature_history"});case 1:return(0,e.createComponentVNode)(2,p,{data:f,info:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u0437\u0430\u043F\u0438\u0441\u0438 T = 10 \u043C\u0438\u043D. | \u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u043C\u0435\u0436\u0434\u0443 \u0437\u0430\u043F\u0438\u0441\u044F\u043C\u0438 t = 30 \u0441.",pressureListName:"long_pressure_history",temperatureListName:"long_temperature_history"});default:return"WE SHOULDN'T BE HERE!"}}return w}(),L=function(){function w(A){switch(A){case 0:return 180;case 1:return 350;case 2:return 590;case 3:return 830;default:return 870}}return w}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:L(Object.keys(f.sensors).length),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:V===0,onClick:function(){function w(){return S(0)}return w}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"area-chart"})," \u0422\u0435\u043A\u0443\u0449\u0438\u0435"]},"View"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:V===1,onClick:function(){function w(){return S(1)}return w}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"bar-chart"})," \u0418\u0441\u0442\u043E\u0440\u0438\u044F"]},"History")]}),I(V),Object.keys(f.sensors).length===0&&(0,e.createComponentVNode)(2,t.Box,{pt:2,textAlign:"center",textColor:"gray",bold:!0,fontSize:1.3,children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 gas sensor \u0438\u043B\u0438 meter \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E multitool"})]})})})}return l}(),p=function(h){var N=h.data,v=h.info,f=h.pressureListName,g=h.temperatureListName,V=N.sensors||{},S=function(x,E){return V[x][E].slice(-1)[0]},I=function(x,E){return Math.min.apply(Math,V[x][E])},L=function(x,E){return Math.max.apply(Math,V[x][E])},w=function(x,E){return V[x][E].map(function(P,j){return[j,P]})};return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{color:"gray",children:v}),Object.keys(V).map(function(A){return(0,e.createComponentVNode)(2,t.Section,{title:A,children:(0,e.createComponentVNode)(2,t.Section,{px:2,children:[g in V[A]&&(0,e.createComponentVNode)(2,t.Box,{mb:4,children:[(0,e.createComponentVNode)(2,t.Box,{children:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430: "+(0,m.toFixed)(S(A,g),0)+"\u041A (MIN: "+(0,m.toFixed)(I(A,g),0)+"\u041A; MAX: "+(0,m.toFixed)(L(A,g),0)+"\u041A)"}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:5,mt:1,children:(0,e.createComponentVNode)(2,s,{fillPositionedParent:!0,data:w(A,g),rangeX:[0,w(A,g).length-1],rangeY:[I(A,g)-10,L(A,g)+5],strokeColor:"rgba(219, 40, 40, 1)",fillColor:"rgba(219, 40, 40, 0.1)",horizontalLinesCount:2,verticalLinesCount:w(A,g).length-2,labelViewBoxSize:400})})]}),f in V[A]&&(0,e.createComponentVNode)(2,t.Box,{mb:-1,children:[(0,e.createComponentVNode)(2,t.Box,{children:"\u0414\u0430\u0432\u043B\u0435\u043D\u0438\u0435: "+(0,m.toFixed)(S(A,f),0)+"\u043A\u041F\u0430 (MIN: "+(0,m.toFixed)(I(A,f),0)+"\u043A\u041F\u0430; MAX: "+(0,m.toFixed)(L(A,f),0)+"\u043A\u041F\u0430)"}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:5,mt:1,children:(0,e.createComponentVNode)(2,s,{fillPositionedParent:!0,data:w(A,f),rangeX:[0,w(A,f).length-1],rangeY:[I(A,f)-10,L(A,f)+5],strokeColor:"rgba(40, 219, 40, 1)",fillColor:"rgba(40, 219, 40, 0.1)",horizontalLinesCount:2,verticalLinesCount:w(A,f).length-2,labelViewBoxSize:400})})]})]})},A)})]})},u=function(h,N,v,f){if(h.length===0)return[];var g=(0,b.zipWith)(Math.min).apply(void 0,h),V=(0,b.zipWith)(Math.max).apply(void 0,h);v!==void 0&&(g[0]=v[0],V[0]=v[1]),f!==void 0&&(g[1]=f[0],V[1]=f[1]);var S=function(A,x,E,P){return(A-x)/(E-x)*P},I=(0,b.zipWith)(S),L=(0,b.map)(function(w){return I(w,g,V,N)});return L(h)},d=function(h){for(var N="",v=0;v0){var Ce=ge[0],oe=ge[ge.length-1];ge.push([Ve[0]+j,oe[1]]),ge.push([Ve[0]+j,-j]),ge.push([-j,-j]),ge.push([-j,Ce[1]])}var ce=d(ge);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({position:"relative"},ve,{children:function(){function te(fe){return(0,e.normalizeProps)((0,e.createVNode)(1,"div",null,(0,e.createVNode)(32,"svg",null,[Array.from({length:O}).map(function(ue,Y){return(0,e.createVNode)(32,"line",null,null,1,{x1:0,y1:(Y+1)*(Ve[1]/(O+1)),x2:Ve[0],y2:(Y+1)*(Ve[1]/(O+1)),stroke:U,"stroke-width":G},"horizontal-line-"+Y)}),Array.from({length:F}).map(function(ue,Y){return(0,e.createVNode)(32,"line",null,null,1,{x1:(Y+1)*(Ve[0]/(F+1)),y1:0,x2:(Y+1)*(Ve[0]/(F+1)),y2:Ve[1],stroke:U,"stroke-width":G},"vertical-line-"+Y)}),(0,e.createVNode)(32,"polyline",null,null,1,{transform:"scale(1, -1) translate(0, -"+Ve[1]+")",fill:A,points:ce}),S.map(function(ue,Y){return Y===0?null:(0,e.createVNode)(32,"line",null,null,1,{x1:ge[Y-1][0],y1:Ve[1]-ge[Y-1][1],x2:ge[Y][0],y2:Ve[1]-ge[Y][1],stroke:E,"stroke-width":j},"line-"+Y)}),S.map(function(ue,Y){return(0,e.createVNode)(32,"circle",null,null,1,{cx:ge[Y][0],cy:Ve[1]-ge[Y][1],r:2,fill:"#ffffff",stroke:E,"stroke-width":1},"point-"+Y)}),S.map(function(ue,Y){return Ve[0]>se&&Y%2===1&&(0,e.createVNode)(32,"text",null,ue[1]!==null?ue[1].toFixed(0):"N/A",0,{x:ge[Y][0],y:Ve[1]-ge[Y][1],fill:Q,"font-size":ie,dy:"1em",style:{"text-anchor":"end"}},"point-text-"+Y)})],0,{viewBox:"0 0 "+Ve[0]+" "+Ve[1]}),2,Object.assign({},fe),null,f.ref))}return te}()})))}return v}(),h}(e.Component);s.defaultHooks=void 0,s.defaultHooks=y.pureComponentHooks},52977:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosMixer=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.on,u=c.pressure,d=c.max_pressure,s=c.node1_concentration,l=c.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:p?"On":"Off",color:p?null:"red",selected:p,onClick:function(){function h(){return i("power")}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:u===0,width:2.2,onClick:function(){function h(){return i("min_pressure")}return h}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:u,onDrag:function(){function h(N,v){return i("custom_pressure",{pressure:v})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:u===d,width:2.2,onClick:function(){function h(){return i("max_pressure")}return h}()})]}),(0,e.createComponentVNode)(2,b,{node_name:"Node 1",node_ref:s}),(0,e.createComponentVNode)(2,b,{node_name:"Node 2",node_ref:l})]})})})})}return y}(),b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=B.node_name,u=B.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:p,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:u===0,onClick:function(){function d(){return i("set_node",{node_name:p,concentration:(u-10)/100})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:u,onChange:function(){function d(s,l){return i("set_node",{node_name:p,concentration:l/100})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:u===100,onClick:function(){function d(){return i("set_node",{node_name:p,concentration:(u+10)/100})}return d}()})]})}},11748:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.AtmosPump=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.on,p=i.rate,u=i.max_rate,d=i.gas_unit,s=i.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function l(){return C("power")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:p===0,width:2.2,onClick:function(){function l(){return C("min_rate")}return l}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:s,minValue:0,maxValue:u,value:p,onDrag:function(){function l(h,N){return C("custom_rate",{rate:N})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:p===u,width:2.2,onClick:function(){function l(){return C("max_rate")}return l}()})]})]})})})})}return b}()},69321:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosTankControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(44879),m=n(76910),b=n(98595),y=r.AtmosTankControl=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.sensors||{};return(0,e.createComponentVNode)(2,b.Window,{width:400,height:400,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:[Object.keys(u).map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(u[d]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[u[d].pressure," kpa"]}):"",Object.keys(u[d]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[u[d].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(s){return Object.keys(u[d]).indexOf(s)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,m.getGasLabel)(s),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,m.getGasColor)(s),value:u[d][s],minValue:0,maxValue:100,children:(0,o.toFixed)(u[d][s],2)+"%"})},(0,m.getGasLabel)(s)):""})]})},d)}),p.inlet&&Object.keys(p.inlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Inlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(p.inlet.on,"power-off"),content:p.inlet.on?"On":"Off",color:p.inlet.on?null:"red",selected:p.inlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"inlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:p.inlet.rate,onDrag:function(){function d(s,l){return c("set_pressure",{dev:"inlet",val:l})}return d}()})})]})}):"",p.outlet&&Object.keys(p.outlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Outlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(p.outlet.on,"power-off"),content:p.outlet.on?"On":"Off",color:p.outlet.on?null:"red",selected:p.outlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"outlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:p.outlet.rate,onDrag:function(){function d(s,l){return c("set_pressure",{dev:"outlet",val:l})}return d}()})})]})}):""]})})}return B}()},59179:function(T,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),m=n(36036),b=n(98595),y=n(25328),B=function(i,c,p,u){return i.requirements===null?!0:!(i.requirements.metal*u>c||i.requirements.glass*u>p)},k=r.Autolathe=function(){function C(i,c){var p=(0,o.useBackend)(c),u=p.act,d=p.data,s=d.total_amount,l=d.max_amount,h=d.metal_amount,N=d.glass_amount,v=d.busyname,f=d.busyamt,g=d.showhacked,V=d.buildQueue,S=d.buildQueueLen,I=d.recipes,L=d.categories,w=(0,o.useSharedState)(c,"category",0),A=w[0],x=w[1];A===0&&(A="Tools");var E=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=N.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),j=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),O=M[0],D=M[1],F=(0,y.createSearch)(O,function(G){return G.name}),W="";S>0&&(W=V.map(function(G,$){return(0,e.createComponentVNode)(2,m.Box,{children:(0,e.createComponentVNode)(2,m.Button,{fluid:!0,icon:"times",color:"transparent",content:V[$][0],onClick:function(){function Q(){return u("remove_from_queue",{remove_from_queue:V.indexOf(G)+1})}return Q}()},G)},$)}));var U=(0,a.flow)([(0,t.filter)(function(G){return(G.category.indexOf(A)>-1||O)&&(d.showhacked||!G.hacked)}),O&&(0,t.filter)(F),(0,t.sortBy)(function(G){return G.name.toLowerCase()})])(I),K="Build";return O?K="Results for: '"+O+"':":A&&(K="Build ("+A+")"),(0,e.createComponentVNode)(2,b.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:K,buttons:(0,e.createComponentVNode)(2,m.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function G($){return x($)}return G}()}),children:[(0,e.createComponentVNode)(2,m.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function G($,Q){return D(Q)}return G}(),mb:1}),U.map(function(G){return(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+G.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===1,disabled:!B(G,d.metal_amount,d.glass_amount,1),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:1})}return $}(),children:(0,y.toTitleCase)(G.name)}),G.max_multiplier>=10&&(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===10,disabled:!B(G,d.metal_amount,d.glass_amount,10),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:10})}return $}(),children:"10x"}),G.max_multiplier>=25&&(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===25,disabled:!B(G,d.metal_amount,d.glass_amount,25),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:25})}return $}(),children:"25x"}),G.max_multiplier>25&&(0,e.createComponentVNode)(2,m.Button,{mr:1,icon:"hammer",selected:d.busyname===G.name&&d.busyamt===G.max_multiplier,disabled:!B(G,d.metal_amount,d.glass_amount,G.max_multiplier),onClick:function(){function $(){return u("make",{make:G.uid,multiplier:G.max_multiplier})}return $}(),children:[G.max_multiplier,"x"]}),G.requirements&&Object.keys(G.requirements).map(function($){return(0,y.toTitleCase)($)+": "+G.requirements[$]}).join(", ")||(0,e.createComponentVNode)(2,m.Box,{children:"No resources required."})]},G.ref)})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,m.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Total",children:j}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Storage",children:[d.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,m.Section,{title:"Building",children:(0,e.createComponentVNode)(2,m.Box,{color:v?"green":"",children:v||"Nothing"})}),(0,e.createComponentVNode)(2,m.Section,{title:"Build Queue",height:23.7,children:[W,(0,e.createComponentVNode)(2,m.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!d.buildQueueLen,onClick:function(){function G(){return u("clear_queue")}return G}()})]})]})]})})})}return C}()},29943:function(T,r,n){"use strict";r.__esModule=!0,r.Autolathe220=void 0;var e=n(89005),a=n(25328),t=n(88510),o=n(64795),m=n(72253),b=n(36036),y=n(98595),B=["metal","glass"],k=function(h,N,v,f){return h.requirements===null?!0:!(h.requirements.metal*f>N||h.requirements.glass*f>v)},C=function(h,N){var v=h*N/2e3;return v===0?0:v<.01&&v>0?(0,e.createComponentVNode)(2,b.Box,{fontSize:.75,children:"< 0.01"}):Math.floor(v*100)/100},i=r.Autolathe220=function(){function l(h,N){var v=(0,m.useSharedState)(N,"category","Tools"),f=v[0],g=v[1];return(0,e.createComponentVNode)(2,y.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{basis:"20%",children:(0,e.createComponentVNode)(2,c,{category:f,setCategory:g})}),(0,e.createComponentVNode)(2,b.Stack.Item,{basis:"55%",children:(0,e.createComponentVNode)(2,p,{category:f})}),(0,e.createComponentVNode)(2,b.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,s)]})})]})})})}return l}(),c=function(h,N){var v=(0,m.useBackend)(N),f=v.data,g=h.category,V=h.setCategory,S=f.categories,I=["All"].concat(S);return(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Categories",children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:I.map(function(L){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{mb:.5,height:"2.5em",color:"blue",selected:L===g,onClick:function(){function w(){return V(L)}return w}(),children:L},L)})})})},p=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.metal_amount,S=g.glass_amount,I=g.recipes,L=h.category,w=(0,m.useSharedState)(N,"searchText",""),A=w[0],x=w[1],E=(0,o.flow)([(0,t.filter)(function(M){return L==="All"||M.category.includes(L)||A&&(g.showhacked||!M.hacked)}),A&&(0,t.filter)((0,a.createSearch)(A,function(M){return M.name})),(0,t.sortBy)(function(M){return M.name.toLowerCase()})])(I),P=function(O,D){return(0,e.createComponentVNode)(2,b.Button,{translucent:!0,tooltip:j(O,D),tooltipPosition:"top",disabled:!k(O,V,S,D),onClick:function(){function F(){return f("make",{make:O.uid,multiplier:D})}return F}(),children:[D,"x"]})},j=function(O,D){return(0,e.createFragment)(B.map(function(F){return O.requirements[F]&&(0,e.createComponentVNode)(2,b.ImageButton,{asset:["materials32x32",F],imageSize:32,children:C(O.requirements[F],D)},F)}),0)};return(0,e.createComponentVNode)(2,b.Section,{fill:!0,title:"Build ("+L+")",children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function M(O,D){return x(D)}return M}()})}),(0,e.createComponentVNode)(2,b.Stack.Item,{mt:.5,mb:-2.33,grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:E.map(function(M){return(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,base64:M.image,imageSize:32,textAlign:"left",color:M.category.includes("hacked")&&"brown",tooltip:j(M,1),tooltipPosition:"top",disabled:!k(M,V,S,1),buttons:M.max_multiplier>1&&(0,e.createFragment)([M.max_multiplier>=10&&P(M,10),M.max_multiplier>=25&&P(M,25),M.max_multiplier>25&&P(M,M.max_multiplier)],0),onClick:function(){function O(){return f("make",{make:M.uid,multiplier:1})}return O}(),children:M.name},M.name)})})})]})})},u=function(h,N){var v=(0,m.useBackend)(N),f=v.data,g=f.metal_amount,V=f.glass_amount,S=f.fill_percent,I=function(w,A){return(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,asset:["materials32x32",w],color:"nope",buttons:(0,e.createComponentVNode)(2,b.Box,{backgroundColor:"rgba(255, 255, 255, 0.05)",width:"45px",children:C(A,1)}),children:(0,a.toTitleCase)(w)})};return(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Materials",children:[I("metal",g),I("glass",V),(0,e.createComponentVNode)(2,b.ProgressBar,{minValue:0,value:S,maxValue:100,children:["Storage ",S,"% full"]})]})})},d=function(h,N){var v=(0,m.useBackend)(N),f=v.data,g=f.recipes,V=f.busyname,S=f.busyamt,I=g.find(function(L){return L.name===V});return(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Building",children:(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,color:V&&"green",base64:I==null?void 0:I.image,imageSize:32,children:V?S>1?V+" x"+S:V:"Nothing"})})})},s=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.recipes,S=g.buildQueue,I=g.buildQueueLen,L;return I>0&&(L=S.map(function(w,A){var x=V.find(function(E){return E.name===S[A][0]});return(0,e.createComponentVNode)(2,b.ImageButton,{fluid:!0,base64:x.image,imageSize:32,buttons:(0,e.createComponentVNode)(2,b.Button,{translucent:!0,width:"32px",icon:"times",iconColor:"red",onClick:function(){function E(){return f("remove_from_queue",{remove_from_queue:S.indexOf(w)+1})}return E}()},w),children:[x.name," ",Number(S[A][1])>1&&"x"+S[A][1]]},A)})),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Queue "+(I>0?I:""),children:L})}),(0,e.createComponentVNode)(2,b.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,b.Section,{fitted:!0,p:.75,children:(0,e.createComponentVNode)(2,b.Button,{fluid:!0,translucent:!I,color:"red",icon:"trash-can",disabled:!I,onClick:function(){function w(){return f("clear_queue")}return w}(),children:"Clear Queue"})})})]})})}},5147:function(T,r,n){"use strict";r.__esModule=!0,r.BioChipPad=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.BioChipPad=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.implant,p=i.contains_case,u=i.gps,d=i.tag,s=(0,a.useLocalState)(B,"newTag",d),l=s[0],h=s[1];return(0,e.createComponentVNode)(2,o.Window,{width:410,height:325,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Bio-chip Mini-Computer",buttons:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject Case",icon:"eject",disabled:!p,onClick:function(){function N(){return C("eject_case")}return N}()})}),children:c&&p?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+c.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),c.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:c.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:c.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:c.function}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:d,onEnter:function(){function N(){return C("tag",{newtag:l})}return N}(),onInput:function(){function N(v,f){return h(f)}return N}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:d===l,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function N(){return C("tag",{newtag:l})}return N}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):p?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"})})})})}return b}()},64273:function(T,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(62411),b=r.Biogenerator=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.config,l=d.container,h=d.processing,N=s.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Operating,{operating:h,name:N}),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),l?(0,e.createComponentVNode)(2,C):(0,e.createComponentVNode)(2,y)]})})})}return i}(),y=function(c,p){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},B=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.biomass,h=s.container,N=s.container_curr_reagents,v=s.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:l}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),h?(0,e.createComponentVNode)(2,t.ProgressBar,{value:N,maxValue:v,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:N+" / "+v+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.has_plants,h=s.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function N(){return d("activate")}return N}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!h,tooltip:h?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function N(){return d("detach_container")}return N}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function N(){return d("eject_plants")}return N}()})})]})})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.biomass,h=s.product_list,N=(0,a.useSharedState)(p,"vendAmount",1),v=N[0],f=N[1],g=Object.entries(h).map(function(V,S){var I=Object.entries(V[1]).map(function(L){return L[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:V[0],open:!0,children:I.map(function(L){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:L.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[L.cost*v,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:ls&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:[(0,e.createComponentVNode)(2,t.Button,{icon:S&&!g?"toggle-on":"toggle-off",content:"Auto shutdown",color:S&&!g?"green":"red",disabled:!!g,tooltip:"Turn auto shutdown on or off",onClick:function(){function A(){return c("auto_shutdown")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:I&&!g?"toggle-on":"toggle-off",content:"Stabilizers",color:I&&!g?"green":"red",disabled:!!g,tooltip:"Turn stabilizers on or off",onClick:function(){function A(){return c("stabilizers")}return A}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Level",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:d===0||g,tooltip:"Set to 0",onClick:function(){function A(){return c("set",{set_level:0})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:d===0||g,onClick:function(){function A(){return c("set",{set_level:s})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:d===0||g,tooltip:"Decrease one step",onClick:function(){function A(){return c("decrease")}return A}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,mx:1,children:(0,e.createComponentVNode)(2,t.Slider,{disabled:g,value:d,fillValue:s,minValue:0,color:w,maxValue:f,stepPixelSize:20,step:1,onChange:function(){function A(x,E){return c("set",{set_level:E})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:d===f||g,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){function A(){return c("increase")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:d===f||g,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){function A(){return c("set",{set_level:f})}return A}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Power Use",children:(0,m.formatPower)(N)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power Use",children:(0,m.formatPower)(N-L)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stabilizer Power Use",children:(0,m.formatPower)(L)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power for next level",children:(0,m.formatPower)(V)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,m.formatPower)(v)})]})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:A.price>=l,onClick:function(){function x(){return c("vend",{target:A.key})}return x}(),content:A.price})},A.key)})})})})]})})]})})})}return B}(),y=r.Alerts=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.product||[],d=p.inputLevel,s=p.emagged,l=p.safeLevels,h=p.autoShutown,N=p.stabilizers,v=p.overhead;return(0,e.createFragment)([!h&&!s&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Auto shutdown disabled"}),s?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"All safeties disabled"}):d<=l?"":N?d-v>l?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"High Power, engaging stabilizers"}):(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers disabled, Instability likely"})],0)}return B}()},33758:function(T,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(89005),a=n(44879),t=n(25328),o=n(72253),m=n(36036),b=n(98595),y=[["good","Alive"],["average","Critical"],["bad","DEAD"]],B=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],k=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],C={average:[.25,.5],bad:[.5,1/0]},i=function(S,I){for(var L=[],w=0;w0?S.filter(function(I){return!!I}).reduce(function(I,L){return(0,e.createFragment)([I,(0,e.createComponentVNode)(2,m.Box,{children:L},L)],0)},null):null},p=function(S){if(S>100){if(S<300)return"mild infection";if(S<400)return"mild infection+";if(S<500)return"mild infection++";if(S<700)return"acute infection";if(S<800)return"acute infection+";if(S<900)return"acute infection++";if(S>=900)return"septic"}return""},u=r.BodyScanner=function(){function V(S,I){var L=(0,o.useBackend)(I),w=L.data,A=w.occupied,x=w.occupant,E=x===void 0?{}:x,P=A?(0,e.createComponentVNode)(2,d,{occupant:E}):(0,e.createComponentVNode)(2,g);return(0,e.createComponentVNode)(2,b.Window,{width:700,height:600,title:"Body Scanner",children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:P})})}return V}(),d=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,m.Box,{children:[(0,e.createComponentVNode)(2,s,{occupant:I}),(0,e.createComponentVNode)(2,l,{occupant:I}),(0,e.createComponentVNode)(2,h,{occupant:I}),(0,e.createComponentVNode)(2,v,{organs:I.extOrgan}),(0,e.createComponentVNode)(2,f,{organs:I.intOrgan})]})},s=function(S,I){var L=(0,o.useBackend)(I),w=L.act,A=L.data,x=A.occupant;return(0,e.createComponentVNode)(2,m.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"Print Report"}),(0,e.createComponentVNode)(2,m.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Status",color:y[x.stat][0],children:y[x.stat][1]}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,m.AnimatedNumber,{value:(0,a.round)(x.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,m.AnimatedNumber,{value:(0,a.round)(x.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Implants",children:x.implant_len?(0,e.createComponentVNode)(2,m.Box,{children:x.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"None"})})]})})},l=function(S){var I=S.occupant;return I.hasBorer||I.blind||I.colourblind||I.nearsighted||I.hasVirus?(0,e.createComponentVNode)(2,m.Section,{title:"Abnormalities",children:B.map(function(L,w){if(I[L[0]])return(0,e.createComponentVNode)(2,m.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,m.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"No abnormalities found."})})},h=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,m.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,m.Table,{children:i(k,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:(0,e.createComponentVNode)(2,N,{value:I[L[1]],marginBottom:A100)&&"average"||!!I.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,m.ProgressBar,{m:-.5,min:"0",max:I.maxHealth,mt:L>0&&"0.5rem",value:I.totalLoss/I.maxHealth,ranges:C,children:(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:[(0,e.createComponentVNode)(2,m.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(I.totalLoss)]})}),!!I.bruteLoss&&(0,e.createComponentVNode)(2,m.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,m.Icon,{name:"bone",mr:.5}),(0,a.round)(I.bruteLoss)]})}),!!I.fireLoss&&(0,e.createComponentVNode)(2,m.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:[(0,e.createComponentVNode)(2,m.Icon,{name:"fire",mr:.5}),(0,a.round)(I.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,m.Box,{color:"average",inline:!0,children:c([!!I.internalBleeding&&"Internal bleeding",!!I.burnWound&&"Critical tissue burns",!!I.lungRuptured&&"Ruptured lung",!!I.status.broken&&I.status.broken,p(I.germ_level),!!I.open&&"Open incision"])}),(0,e.createComponentVNode)(2,m.Box,{inline:!0,children:[c([!!I.status.splinted&&(0,e.createComponentVNode)(2,m.Box,{color:"good",children:"Splinted"}),!!I.status.robotic&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"Robotic"}),!!I.status.dead&&(0,e.createComponentVNode)(2,m.Box,{color:"bad",bold:!0,children:"DEAD"})]),c(I.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},f=function(S){return S.organs.length===0?(0,e.createComponentVNode)(2,m.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,m.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,m.Table,{children:[(0,e.createComponentVNode)(2,m.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",children:"Injuries"})]}),S.organs.map(function(I,L){return(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{color:!!I.dead&&"bad"||I.germ_level>100&&"average"||I.robotic>0&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:I.maxHealth,value:I.damage/I.maxHealth,mt:L>0&&"0.5rem",ranges:C,children:(0,a.round)(I.damage)})}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,m.Box,{color:"average",inline:!0,children:c([p(I.germ_level)])}),(0,e.createComponentVNode)(2,m.Box,{inline:!0,children:c([I.robotic===1&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"Robotic"}),I.robotic===2&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"Assisted"}),!!I.dead&&(0,e.createComponentVNode)(2,m.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},g=function(){return(0,e.createComponentVNode)(2,m.Section,{fill:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},67963:function(T,r,n){"use strict";r.__esModule=!0,r.BookBinder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=n(39473),y=r.BookBinder=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.selectedbook,d=p.book_categories,s=[];return d.map(function(l){return s[l.description]=l.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Book Binder",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){function l(){return c("print_book")}return l}()}),children:[(0,e.createComponentVNode)(2,t.Box,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title,onClick:function(){function l(){return(0,m.modalOpen)(C,"edit_selected_title")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author,onClick:function(){function l(){return(0,m.modalOpen)(C,"edit_selected_author")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"190px",options:d.map(function(l){return l.description}),onSelected:function(){function l(h){return c("toggle_binder_category",{category_id:s[h]})}return l}()})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){function l(){return(0,m.modalOpen)(C,"edit_selected_summary")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:u.summary})]}),(0,e.createVNode)(1,"br"),d.filter(function(l){return u.categories.includes(l.category_id)}).map(function(l){return(0,e.createComponentVNode)(2,t.Button,{content:l.description,selected:!0,icon:"unlink",onClick:function(){function h(){return c("toggle_binder_category",{category_id:l.category_id})}return h}()},l.category_id)})]})})]})})})]})}return B}()},61925:function(T,r,n){"use strict";r.__esModule=!0,r.BotCall=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(i){var c=[{modes:[0],label:"Idle",color:"green"},{modes:[1,2,3],label:"Arresting",color:"yellow"},{modes:[4,5],label:"Patrolling",color:"average"},{modes:[9],label:"Moving",color:"average"},{modes:[6,11],label:"Responding",color:"green"},{modes:[12],label:"Delivering Cargo",color:"blue"},{modes:[13],label:"Returning Home",color:"blue"},{modes:[7,8,10,14,15,16,17,18,19],label:"Working",color:"blue"}],p=c.find(function(u){return u.modes.includes(i)});return(0,e.createComponentVNode)(2,t.Box,{color:p.color,children:[" ",p.label," "]})},b=r.BotCall=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=(0,a.useLocalState)(c,"tabIndex",0),l=s[0],h=s[1],N={0:"Security",1:"Medibot",2:"Cleanbot",3:"Floorbot",4:"Mule",5:"Honkbot"},v=function(){function f(g){return N[g]?(0,e.createComponentVNode)(2,y,{model:N[g]}):"This should not happen. Report on Paradise Github"}return f}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:l===0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:Array.from({length:6}).map(function(f,g){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:l===g,onClick:function(){function V(){return h(g)}return V}(),children:N[g]},g)})})}),v(l)]})})})}return C}(),y=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.bots;return s[i.model]!==void 0?(0,e.createComponentVNode)(2,k,{model:[i.model]}):(0,e.createComponentVNode)(2,B,{model:[i.model]})},B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data;return(0,e.createComponentVNode)(2,t.Stack,{justify:"center",align:"center",fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Box,{bold:1,color:"bad",children:["No ",[i.model]," detected"]})})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.bots;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Model"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Location"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Interface"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Call"})]}),s[i.model].map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.model}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.on?m(l.status):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Off"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.location}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Interface",onClick:function(){function h(){return u("interface",{botref:l.UID})}return h}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Call",onClick:function(){function h(){return u("call",{botref:l.UID})}return h}()})})]},l.UID)})]})})})}},20464:function(T,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotClean=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.locked,u=c.noaccess,d=c.maintpanel,s=c.on,l=c.autopatrol,h=c.canhack,N=c.emagged,v=c.remote_disabled,f=c.painame,g=c.cleanblood,V=c.area;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:g,content:"Clean Blood",disabled:u,onClick:function(){function S(){return i("blood")}return S}()})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc Settings",children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:V?"Reset Area Selection":"Restrict to Current Area",onClick:function(){function S(){return i("area")}return S}()}),V!==null&&(0,e.createComponentVNode)(2,t.LabeledList,{mb:1,children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Locked Area",children:V})})]}),f&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:f,disabled:u,onClick:function(){function S(){return i("ejectpai")}return S}()})})]})})}return y}()},69479:function(T,r,n){"use strict";r.__esModule=!0,r.BotFloor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotFloor=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.noaccess,u=c.painame,d=c.hullplating,s=c.replace,l=c.eat,h=c.make,N=c.fixfloor,v=c.nag_empty,f=c.magnet,g=c.tiles_amount;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Floor Settings",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"5px",children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tiles Left",children:g})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:p,onClick:function(){function V(){return i("autotile")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:p,onClick:function(){function V(){return i("replacetiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Repair damaged tiles and platings",disabled:p,onClick:function(){function V(){return i("fixfloors")}return V}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:l,content:"Finds tiles",disabled:p,onClick:function(){function V(){return i("eattiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Make pieces of metal into tiles when empty",disabled:p,onClick:function(){function V(){return i("maketiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Transmit notice when empty",disabled:p,onClick:function(){function V(){return i("nagonempty")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:f,content:"Traction Magnets",disabled:p,onClick:function(){function V(){return i("anchored")}return V}()})]}),u&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:u,disabled:p,onClick:function(){function V(){return i("ejectpai")}return V}()})})]})})}return y}()},59887:function(T,r,n){"use strict";r.__esModule=!0,r.BotHonk=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotHonk=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:220,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,m.BotStatus)})})}return y}()},80063:function(T,r,n){"use strict";r.__esModule=!0,r.BotMed=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotMed=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.locked,u=c.noaccess,d=c.maintpanel,s=c.on,l=c.autopatrol,h=c.canhack,N=c.emagged,v=c.remote_disabled,f=c.painame,g=c.shut_up,V=c.declare_crit,S=c.stationary_mode,I=c.heal_threshold,L=c.injection_amount,w=c.use_beaker,A=c.treat_virus,x=c.reagent_glass;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!g,disabled:u,onClick:function(){function E(){return i("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:V,disabled:u,onClick:function(){function E(){return i("toggle_critical_alerts")}return E}()})]}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Treatment Settings",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Healing Threshold",children:(0,e.createComponentVNode)(2,t.Slider,{value:I.value,minValue:I.min,maxValue:I.max,step:5,disabled:u,onChange:function(){function E(P,j){return i("set_heal_threshold",{target:j})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Injection Level",children:(0,e.createComponentVNode)(2,t.Slider,{value:L.value,minValue:L.min,maxValue:L.max,step:5,format:function(){function E(P){return P+"u"}return E}(),disabled:u,onChange:function(){function E(P,j){return i("set_injection_amount",{target:j})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reagent Source",children:(0,e.createComponentVNode)(2,t.Button,{content:w?"Beaker":"Internal Synthesizer",icon:w?"flask":"cogs",disabled:u,onClick:function(){function E(){return i("toggle_use_beaker")}return E}()})}),x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x.amount,minValue:0,maxValue:x.max_amount,children:[x.amount," / ",x.max_amount]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{ml:1,children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",disabled:u,onClick:function(){function E(){return i("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:u,onClick:function(){function E(){return i("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:S,disabled:u,onClick:function(){function E(){return i("toggle_stationary_mode")}return E}()})]}),f&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:f,disabled:u,onClick:function(){function E(){return i("ejectpai")}return E}()})})]})})})}return y}()},74439:function(T,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(92963),b=r.BotSecurity=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.noaccess,u=c.painame,d=c.check_id,s=c.check_weapons,l=c.check_warrant,h=c.arrest_mode,N=c.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:445,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,m.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:p,onClick:function(){function v(){return i("authid")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Unauthorized Weapons",disabled:p,onClick:function(){function v(){return i("authweapon")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:l,content:"Wanted Criminals",disabled:p,onClick:function(){function v(){return i("authwarrant")}return v}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Detain Targets Indefinitely",disabled:p,onClick:function(){function v(){return i("arrtype")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Announce Arrests On Radio",disabled:p,onClick:function(){function v(){return i("arrdeclare")}return v}()})]}),u&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:u,disabled:p,onClick:function(){function v(){return i("ejectpai")}return v}()})})]})})}return y}()},10833:function(T,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(89005),a=n(98595),t=n(36036),o=n(72253),m=function(k,C){var i=k.cell,c=(0,o.useBackend)(C),p=c.act,u=i.cell_id,d=i.occupant,s=i.crimes,l=i.brigged_by,h=i.time_left_seconds,N=i.time_set_seconds,v=i.ref,f="";h>0&&(f+=" BrigCells__listRow--active");var g=function(){p("release",{ref:v})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:f,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:N})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:h})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:g,children:"Release"})})]})},b=function(k){var C=k.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),C.map(function(i){return(0,e.createComponentVNode)(2,m,{cell:i},i.ref)})]})},y=r.BrigCells=function(){function B(k,C){var i=(0,o.useBackend)(C),c=i.act,p=i.data,u=p.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b,{cells:u})})})})})}return B}()},45761:function(T,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.BrigTimer=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;i.nameText=i.occupant,i.timing&&(i.prisoner_hasrec?i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:i.occupant}):i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:i.occupant}));var c="pencil-alt";i.prisoner_name&&(i.prisoner_hasrec||(c="exclamation-triangle"));var p=[],u=0;for(u=0;up?this.substring(0,p)+"...":this};var k=function(u,d){var s,l;if(!d)return[];var h=u.findIndex(function(N){return N.name===d.name});return[(s=u[h-1])==null?void 0:s.name,(l=u[h+1])==null?void 0:l.name]},C=function(u,d){d===void 0&&(d="");var s=(0,m.createSearch)(d,function(l){return l.name});return(0,t.flow)([(0,a.filter)(function(l){return l==null?void 0:l.name}),d&&(0,a.filter)(s),(0,a.sortBy)(function(l){return l.name})])(u)},i=r.CameraConsole=function(){function p(u,d){var s=(0,b.useBackend)(d),l=s.act,h=s.data,N=s.config,v=h.mapRef,f=h.activeCamera,g=C(h.cameras),V=k(g,f),S=V[0],I=V[1];return(0,e.createComponentVNode)(2,B.Window,{width:870,height:708,children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,c)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),f&&f.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!S,onClick:function(){function L(){return l("switch_camera",{name:S})}return L}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!I,onClick:function(){function L(){return l("switch_camera",{name:I})}return L}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:v,type:"map"}})],4)]})}return p}(),c=r.CameraConsoleContent=function(){function p(u,d){var s=(0,b.useBackend)(d),l=s.act,h=s.data,N=(0,b.useLocalState)(d,"searchText",""),v=N[0],f=N[1],g=h.activeCamera,V=C(h.cameras,v);return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function S(I,L){return f(L)}return S}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,children:V.map(function(S){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",g&&S.name===g.name&&"Button--selected"]),S.name.trimLongStr(23),0,{title:S.name,onClick:function(){function I(){return l("switch_camera",{name:S.name})}return I}()},S.name)})})})]})}return p}()},39222:function(T,r,n){"use strict";r.__esModule=!0,r.CameraConsoleOldContent=r.CameraConsoleMapContent=r.CameraConsole220=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(35840),m=n(25328),b=n(72253),y=n(36036),B=n(98595),k=function(d,s){var l,h;if(!s)return[];var N=d.findIndex(function(v){return v.name===s.name});return[(l=d[N-1])==null?void 0:l.name,(h=d[N+1])==null?void 0:h.name]},C=function(d,s){s===void 0&&(s="");var l=(0,m.createSearch)(s,function(h){return h.name});return(0,t.flow)([(0,a.filter)(function(h){return h==null?void 0:h.name}),s&&(0,a.filter)(l),(0,a.sortBy)(function(h){return h.name})])(d)},i=r.CameraConsole220=function(){function u(d,s){var l=(0,b.useLocalState)(s,"tabIndex",0),h=l[0],N=l[1],v=function(){function f(g){switch(g){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,p);default:return"WE SHOULDN'T BE HERE!"}}return f}();return(0,e.createComponentVNode)(2,B.Window,{width:1170,height:755,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{children:(0,e.createComponentVNode)(2,y.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{width:h===1?"222px":"475px",textAlign:"center",children:(0,e.createComponentVNode)(2,y.Tabs,{fluid:!0,ml:h===1?1:0,mt:h===1?1:0,children:[(0,e.createComponentVNode)(2,y.Tabs.Tab,{selected:h===0,onClick:function(){function f(){return N(0)}return f}(),children:[(0,e.createComponentVNode)(2,y.Icon,{name:"map-marked-alt"})," \u041A\u0430\u0440\u0442\u0430"]},"Map"),(0,e.createComponentVNode)(2,y.Tabs.Tab,{selected:h===1,onClick:function(){function f(){return N(1)}return f}(),children:[(0,e.createComponentVNode)(2,y.Icon,{name:"table"})," \u0421\u043F\u0438\u0441\u043E\u043A"]},"List")]})}),v(h)]})})})})}return u}(),c=r.CameraConsoleMapContent=function(){function u(d,s){var l=(0,b.useBackend)(s),h=l.act,N=l.data,v=C(N.cameras),f=(0,b.useLocalState)(s,"zoom",1),g=f[0],V=f[1],S=N.mapRef,I=N.activeCamera,L=N.stationLevel,w=N.mapUrl,A=N.selected_z_level,x=k(v,I),E=x[0],P=x[1];return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{height:"100%",style:{flex:"0 0 474px"},children:(0,e.createComponentVNode)(2,y.NanoMap,{onZoom:function(){function j(M){return V(M)}return j}(),mapUrl:w,children:v.filter(function(j){return j.z===(Number(A)||L)}).map(function(j){return(0,e.createComponentVNode)(2,y.NanoMap.NanoButton,{activeCamera:I,x:j.x,y:j.y,context:s,zoom:g,icon:"circle",tooltip:j.name,name:j.name,color:"blue",status:j.status},j.ref)})})}),(0,e.createComponentVNode)(2,y.Stack.Item,{height:"100%",m:.1,className:"CameraConsole__right_map",children:[(0,e.createVNode)(1,"div","CameraConsole__header",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),I&&I.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!E,onClick:function(){function j(){return h("switch_camera",{name:E})}return j}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!P,onClick:function(){function j(){return h("switch_camera",{name:P})}return j}()})],4)],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",overflow:"hidden",params:{id:S,type:"map"}})]})]})}return u}(),p=r.CameraConsoleOldContent=function(){function u(d,s){var l=(0,b.useBackend)(s),h=l.act,N=l.data,v=l.config,f=N.mapRef,g=N.activeCamera,V=(0,b.useLocalState)(s,"searchText",""),S=V[0],I=V[1],L=C(N.cameras,S),w=k(L,g),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Stack.Item,{children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Input,{width:"215px",placeholder:"\u041D\u0430\u0439\u0442\u0438 \u043A\u0430\u043C\u0435\u0440\u0443",onInput:function(){function E(P,j){return I(j)}return E}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,children:L.map(function(E){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid",E.status?"Button--color--transparent":"Button--color--danger","Button--ellipsis",g&&E.name===g.name&&"Button--selected"]),E.name,0,{title:E.name,onClick:function(){function P(){return h("switch_camera",{name:E.name})}return P}()},E.name)})})})]})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),g&&g.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!A,onClick:function(){function E(){return h("switch_camera",{name:A})}return E}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!x,onClick:function(){function E(){return h("switch_camera",{name:x})}return E}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:f,type:"map"}})],4)]})}return u}()},52927:function(T,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(49968),b=n(98595),y=r.Canister=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.act,p=i.data,u=p.portConnected,d=p.tankPressure,s=p.releasePressure,l=p.defaultReleasePressure,h=p.minReleasePressure,N=p.maxReleasePressure,v=p.valveOpen,f=p.name,g=p.canLabel,V=p.colorContainer,S=p.color_index,I=p.hasHoldingTank,L=p.holdingTank,w="";S.prim&&(w=V.prim.options[S.prim].name);var A="";S.sec&&(A=V.sec.options[S.sec].name);var x="";S.ter&&(x=V.ter.options[S.ter].name);var E="";S.quart&&(E=V.quart.options[S.quart].name);var P=[],j=[],M=[],O=[],D=0;for(D=0;Df.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:f.total_positions-f.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:l.cooldown_time||!f.can_close,onClick:function(){function g(){return s("make_job_unavailable",{job:f.title})}return g}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:l.cooldown_time||!f.can_open,onClick:function(){function g(){return s("make_job_available",{job:f.title})}return g}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:l.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l.priority_jobs.indexOf(f.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:f.is_priority?"Yes":"No",selected:f.is_priority,disabled:l.cooldown_time||!f.can_prioritize,onClick:function(){function g(){return s("prioritize_job",{job:f.title})}return g}()})})]},f.title)})]})})]}):v=(0,e.createComponentVNode)(2,B);break;case 2:!l.authenticated||!l.scan_name?v=(0,e.createComponentVNode)(2,B):l.modify_name?v=(0,e.createComponentVNode)(2,m.AccessList,{accesses:l.regions,selectedList:l.selectedAccess,accessMod:function(){function f(g){return s("set",{access:g})}return f}(),grantAll:function(){function f(){return s("grant_all")}return f}(),denyAll:function(){function f(){return s("clear_all")}return f}(),grantDep:function(){function f(g){return s("grant_region",{region:g})}return f}(),denyDep:function(){function f(g){return s("deny_region",{region:g})}return f}()}):v=(0,e.createComponentVNode)(2,k);break;case 3:l.authenticated?l.records.length?v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!l.authenticated||l.records.length===0||l.target_dept,onClick:function(){function f(){return s("wipe_all_logs")}return f}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!l.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),l.records.map(function(f){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.reason}),!!l.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.deletedby})]},f.timestamp)})]}),!!l.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!l.authenticated||l.records.length===0,onClick:function(){function f(){return s("wipe_my_logs")}return f}()})})]}):v=(0,e.createComponentVNode)(2,C):v=(0,e.createComponentVNode)(2,B);break;case 4:!l.authenticated||!l.scan_name?v=(0,e.createComponentVNode)(2,B):v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),l.people_dept.map(function(f){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:f.buttontext,disabled:!f.demotable,onClick:function(){function g(){return s("remote_demote",{remote_demote:f.name})}return g}()})})]},f.title)})]})});break;default:v=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:N}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:h}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v})]})})})}return c}()},64083:function(T,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),m=n(36036),b=n(98595),y=n(25328),B=r.CargoConsole=function(){function d(s,l){return(0,e.createComponentVNode)(2,b.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,u)]})})})}return d}(),k=function(s,l){var h=(0,o.useLocalState)(l,"contentsModal",null),N=h[0],v=h[1],f=(0,o.useLocalState)(l,"contentsModalTitle",null),g=f[0],V=f[1];if(N!==null&&g!==null)return(0,e.createComponentVNode)(2,m.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,m.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[g,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,m.Box,{children:N.map(function(S){return(0,e.createComponentVNode)(2,m.Box,{children:["- ",S]},S)})}),(0,e.createComponentVNode)(2,m.Box,{m:2,children:(0,e.createComponentVNode)(2,m.Button,{content:"Close",onClick:function(){function S(){v(null),V(null)}return S}()})})]})},C=function(s,l){var h=(0,o.useBackend)(l),N=h.act,v=h.data,f=v.is_public,g=v.timeleft,V=v.moving,S=v.at_station,I,L;return!V&&!S?(I="Docked off-station",L="Call Shuttle"):!V&&S?(I="Docked at the station",L="Return Shuttle"):V&&(L="In Transit...",g!==1?I="Shuttle is en route (ETA: "+g+" minutes)":I="Shuttle is en route (ETA: "+g+" minute)"),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Status",children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Shuttle Status",children:I}),f===0&&(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,m.Button,{content:L,disabled:V,onClick:function(){function w(){return N("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,m.Button,{content:"View Central Command Messages",onClick:function(){function w(){return N("showMessages")}return w}()})]})]})})})},i=function(s,l){var h,N=(0,o.useBackend)(l),v=N.act,f=N.data,g=f.accounts,V=(0,o.useLocalState)(l,"selectedAccount"),S=V[0],I=V[1],L=[];return g.map(function(w){return L[w.name]=w.account_UID}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,m.Dropdown,{width:"190px",options:g.map(function(w){return w.name}),selected:(h=g.filter(function(w){return w.account_UID===S})[0])==null?void 0:h.name,onSelected:function(){function w(A){return I(L[A])}return w}()}),g.filter(function(w){return w.account_UID===S}).map(function(w){return(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,m.Stack.Item,{mt:1,children:w.name})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:w.balance})})]},w.account_UID)})]})})},c=function(s,l){var h=(0,o.useBackend)(l),N=h.act,v=h.data,f=v.requests,g=v.categories,V=v.supply_packs,S=(0,o.useSharedState)(l,"category","Emergency"),I=S[0],L=S[1],w=(0,o.useSharedState)(l,"search_text",""),A=w[0],x=w[1],E=(0,o.useLocalState)(l,"contentsModal",null),P=E[0],j=E[1],M=(0,o.useLocalState)(l,"contentsModalTitle",null),O=M[0],D=M[1],F=(0,y.createSearch)(A,function(Q){return Q.name}),W=(0,o.useLocalState)(l,"selectedAccount"),U=W[0],K=W[1],G=(0,a.flow)([(0,t.filter)(function(Q){return Q.cat===g.filter(function(Z){return Z.name===I})[0].category||A}),A&&(0,t.filter)(F),(0,t.sortBy)(function(Q){return Q.name.toLowerCase()})])(V),$="Crate Catalogue";return A?$="Results for '"+A+"':":I&&($="Browsing "+I),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:$,buttons:(0,e.createComponentVNode)(2,m.Dropdown,{width:"190px",options:g.map(function(Q){return Q.name}),selected:I,onSelected:function(){function Q(Z){return L(Z)}return Q}()}),children:[(0,e.createComponentVNode)(2,m.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function Q(Z,ie){return x(ie)}return Q}(),mb:1}),(0,e.createComponentVNode)(2,m.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:G.map(function(Q){return(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{bold:!0,children:[Q.name," (",Q.cost," Credits)"]}),(0,e.createComponentVNode)(2,m.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,m.Button,{content:"Order 1",icon:"shopping-cart",disabled:!U,onClick:function(){function Z(){return N("order",{crate:Q.ref,multiple:!1,account:U})}return Z}()}),(0,e.createComponentVNode)(2,m.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!U||Q.singleton,onClick:function(){function Z(){return N("order",{crate:Q.ref,multiple:!0,account:U})}return Z}()}),(0,e.createComponentVNode)(2,m.Button,{content:"View Contents",icon:"search",onClick:function(){function Z(){j(Q.contents),D(Q.name)}return Z}()})]})]},Q.name)})})})]})})},p=function(s,l){var h=s.request,N,v;switch(h.department){case"Engineering":v="CE",N="orange";break;case"Medical":v="CMO",N="teal";break;case"Science":v="RD",N="purple";break;case"Supply":v="CT",N="brown";break;case"Service":v="HOP",N="olive";break;case"Security":v="HOS",N="red";break;case"Command":v="CAP",N="blue";break;case"Assistant":v="Any Head",N="grey";break}return(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{mt:.5,children:"Approval Required:"}),!!h.req_cargo_approval&&(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!h.req_head_approval&&(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:N,content:v,disabled:h.req_cargo_approval,icon:"user-tie",tooltip:h.req_cargo_approval?"This Order first requires approval from the QM before the "+v+" can approve it":"This Order requires approval from the "+v+" still"})})]})},u=function(s,l){var h=(0,o.useBackend)(l),N=h.act,v=h.data,f=v.requests,g=v.orders,V=v.shipments;return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,m.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,m.Table,{children:f.map(function(S){return(0,e.createComponentVNode)(2,m.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,m.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,m.Box,{children:["Order #",S.ordernum,": ",S.supply_type," (",S.cost," credits) for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)," with"," ",S.department?"The "+S.department+" Department":"Their Personal"," Account"]}),(0,e.createComponentVNode)(2,m.Box,{italic:!0,children:["Reason: ",S.comment]}),(0,e.createComponentVNode)(2,p,{request:S})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,m.Button,{content:"Approve",color:"green",disabled:!S.can_approve,onClick:function(){function I(){return N("approve",{ordernum:S.ordernum})}return I}()}),(0,e.createComponentVNode)(2,m.Button,{content:"Deny",color:"red",disabled:!S.can_deny,onClick:function(){function I(){return N("deny",{ordernum:S.ordernum})}return I}()})]})]},S.ordernum)})}),(0,e.createComponentVNode)(2,m.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:g.map(function(S){return(0,e.createComponentVNode)(2,m.Table.Row,{children:(0,e.createComponentVNode)(2,m.Table.Cell,{children:[(0,e.createComponentVNode)(2,m.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,m.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})}),(0,e.createComponentVNode)(2,m.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:V.map(function(S){return(0,e.createComponentVNode)(2,m.Table.Row,{children:(0,e.createComponentVNode)(2,m.Table.Cell,{children:[(0,e.createComponentVNode)(2,m.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,m.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})})]})}},87331:function(T,r,n){"use strict";r.__esModule=!0,r.ChangelogView=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ChangelogView=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=(0,a.useLocalState)(B,"onlyRecent",0),p=c[0],u=c[1],d=i.cl_data,s=i.last_cl,l={FIX:(0,e.createComponentVNode)(2,t.Icon,{name:"tools",title:"Fix"}),WIP:(0,e.createComponentVNode)(2,t.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,e.createComponentVNode)(2,t.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,e.createComponentVNode)(2,t.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})},h=function(){function N(v){return v in l?l[v]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return N}();return(0,e.createComponentVNode)(2,o.Window,{width:750,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,e.createComponentVNode)(2,t.Button,{content:p?"Showing all changes":"Showing changes since last connection",onClick:function(){function N(){return u(!p)}return N}()}),children:d.map(function(N){return!p&&N.merge_ts<=s||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:N.author+" - Merged on "+N.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+N.num,onClick:function(){function v(){return C("open_pr",{pr_number:N.num})}return v}()}),children:N.entries.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[h(v.etype)," ",v.etext]},v)})},N)})})})})}return b}()},36108:function(T,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(85870),m=n(98595),b=[1,5,10,20,30,50],y=[1,5,10],B=r.ChemDispenser=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.chemicals;return(0,e.createComponentVNode)(2,m.Window,{width:400,height:400+h.length*8,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,i)]})})})}return c}(),k=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.amount,N=l.energy,v=l.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:N,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[N," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:b.map(function(f,g){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:h===f,content:f,onClick:function(){function V(){return s("amount",{amount:f})}return V}()})},g)})})})]})})})},C=function(p,u){for(var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.chemicals,N=h===void 0?[]:h,v=[],f=0;f<(N.length+1)%3;f++)v.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:l.glass?"Drink Dispenser":"Chemical Dispenser",children:[N.map(function(g,V){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:g.title,style:{"margin-left":"2px"},onClick:function(){function S(){return s("dispense",{reagent:g.id})}return S}()},V)}),v.map(function(g,V){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},V)})]})})},i=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.isBeakerLoaded,N=l.beakerCurrentVolume,v=l.beakerMaxVolume,f=l.beakerContents,g=f===void 0?[]:f;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:l.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!h&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[N," / ",v," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!h,onClick:function(){function V(){return s("ejectBeaker")}return V}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:h,beakerContents:g,buttons:function(){function V(S){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:-1})}return I}()}),y.map(function(I,L){return(0,e.createComponentVNode)(2,t.Button,{content:I,onClick:function(){function w(){return s("remove",{reagent:S.id,amount:I})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:S.volume})}return I}()})],0)}return V}()})})})}},13146:function(T,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(85870),b=n(98595),y=r.ChemHeater=function(){function C(i,c){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return C}(),B=function(i,c){var p=(0,t.useBackend)(c),u=p.act,d=p.data,s=d.targetTemp,l=d.targetTempReached,h=d.autoEject,N=d.isActive,v=d.currentTemp,f=d.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){function g(){return u("toggle_autoeject")}return g}()}),(0,e.createComponentVNode)(2,o.Button,{content:N?"On":"Off",icon:"power-off",selected:N,disabled:!f,onClick:function(){function g(){return u("toggle_on")}return g}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(s,0),minValue:0,maxValue:1e3,onDrag:function(){function g(V,S){return u("adjust_temperature",{target:S})}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:l?"good":"average",children:f&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:v,format:function(){function g(V){return(0,a.toFixed)(V)+" K"}return g}()})||"\u2014"})]})})})},k=function(i,c){var p=(0,t.useBackend)(c),u=p.act,d=p.data,s=d.isBeakerLoaded,l=d.beakerCurrentVolume,h=d.beakerMaxVolume,N=d.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!s&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[l," / ",h," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function v(){return u("eject_beaker")}return v}()})]}),children:(0,e.createComponentVNode)(2,m.BeakerContents,{beakerLoaded:s,beakerContents:N})})})}},56541:function(T,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(85870),b=n(3939),y=n(35840),B=["icon"];function k(I,L){if(I==null)return{};var w={};for(var A in I)if({}.hasOwnProperty.call(I,A)){if(L.includes(A))continue;w[A]=I[A]}return w}function C(I,L){I.prototype=Object.create(L.prototype),I.prototype.constructor=I,i(I,L)}function i(I,L){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},i(I,L)}var c=[1,5,10],p=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=L.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:E.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:P.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(P.desc||"").length>0?P.desc:"N/A"}),P.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:P.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:P.blood_dna})],4),!E.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:E.printing?"spinner":"print",disabled:E.printing,iconSpin:!!E.printing,ml:"0.5rem",content:"Print",onClick:function(){function j(){return x("print",{idx:P.idx,beaker:L.args.beaker})}return j}()})]})})})})},u=function(I){return I[I.ToDisposals=0]="ToDisposals",I[I.ToBeaker=1]="ToBeaker",I}(u||{}),d=r.ChemMaster=function(){function I(L,w){return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,s),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,S)]})})]})}return I}(),s=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.beaker,j=E.beaker_reagents,M=E.buffer_reagents,O=M.length>0;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:O?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function D(){return x("eject")}return D}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function D(){return x("eject")}return D}()}),children:P?(0,e.createComponentVNode)(2,m.BeakerContents,{beakerLoaded:!0,beakerContents:j,buttons:function(){function D(F,W){return(0,e.createComponentVNode)(2,t.Box,{mb:W0?(0,e.createComponentVNode)(2,m.BeakerContents,{beakerLoaded:!0,beakerContents:j,buttons:function(){function M(O,D){return(0,e.createComponentVNode)(2,t.Box,{mb:D0&&(O=M.map(function(D){var F=D.id,W=D.sprite;return(0,e.createComponentVNode)(2,g,{icon:W,translucent:!0,onClick:function(){function U(){return x("set_sprite_style",{production_mode:P,style:F})}return U}(),selected:j===F},F)})),(0,e.createComponentVNode)(2,f,{productionData:L.productionData,children:O&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:O})})},S=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.loaded_pill_bottle_style,j=E.containerstyles,M=E.loaded_pill_bottle,O={width:"20px",height:"20px"},D=j.map(function(F){var W=F.color,U=F.name,K=P===W;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:O.width,height:O.height},onClick:function(){function G(){return x("set_container_style",{style:W})}return G}(),icon:K&&"check",iconStyle:{position:"relative","z-index":1},tooltip:U,tooltipPosition:"top",children:[!K&&(0,e.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,e.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:O.width,height:O.height,"background-color":W,opacity:.6,filter:"alpha(opacity=60)"}})]},W)});return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Container Customization",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!M,content:"Eject Container",onClick:function(){function F(){return x("ejectp")}return F}()}),children:M?(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:[(0,e.createComponentVNode)(2,t.Button,{style:{width:O.width,height:O.height},icon:"tint-slash",onClick:function(){function F(){return x("clear_container_style")}return F}(),selected:!P,tooltip:"Default",tooltipPosition:"top"}),D]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,b.modalRegisterBodyOverride)("analyze",p)},37173:function(T,r,n){"use strict";r.__esModule=!0,r.CloningConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(79140),b=1,y=32,B=128,k=r.CloningConsole=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.tab,g=v.has_scanner,V=v.pod_amount;return(0,e.createComponentVNode)(2,o.Window,{width:640,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cloning Console",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected scanner",children:g?"Online":"Missing"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected pods",children:V})]})}),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:f===1,icon:"home",onClick:function(){function S(){return N("menu",{tab:1})}return S}(),children:"Main Menu"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:f===2,icon:"user",onClick:function(){function S(){return N("menu",{tab:2})}return S}(),children:"Damage Configuration"})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,C)})]})})}return d}(),C=function(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.tab,f;return v===1?f=(0,e.createComponentVNode)(2,i):v===2&&(f=(0,e.createComponentVNode)(2,c)),f},i=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.pods,g=v.pod_amount,V=v.selected_pod_UID;return(0,e.createComponentVNode)(2,t.Box,{children:[!g&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No pods connected."}),!!g&&f.map(function(S,I){return(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Pod "+(I+1),children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"96px",shrink:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,m.resolveAsset)("pod_"+(S.cloning?"cloning":"idle")+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{selected:V===S.uid,onClick:function(){function L(){return N("select_pod",{uid:S.uid})}return L}(),children:"Select"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Progress",children:[!S.cloning&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Pod is inactive."}),!!S.cloning&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.clone_progress,maxValue:100,color:"good"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.biomass,ranges:{good:[2*S.biomass_storage_capacity/3,S.biomass_storage_capacity],average:[S.biomass_storage_capacity/3,2*S.biomass_storage_capacity/3],bad:[0,S.biomass_storage_capacity/3]},minValue:0,maxValue:S.biomass_storage_capacity,children:[S.biomass,"/",S.biomass_storage_capacity+" ("+100*S.biomass/S.biomass_storage_capacity+"%)"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sanguine Reagent",children:S.sanguine_reagent}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Osseous Reagent",children:S.osseous_reagent})]})})]})},S)})]})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.selected_pod_data,g=v.has_scanned,V=v.scanner_has_patient,S=v.feedback,I=v.scan_successful,L=v.cloning_cost,w=v.has_scanner;return(0,e.createComponentVNode)(2,t.Box,{children:[!w&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No scanner connected."}),!!w&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Scanner Info",buttons:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hourglass-half",onClick:function(){function A(){return N("scan")}return A}(),children:"Scan"}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function A(){return N("eject")}return A}(),children:"Eject Patient"})]}),children:[!g&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:V?"No scan detected for current patient.":"No patient is in the scanner."}),!!g&&(0,e.createComponentVNode)(2,t.Box,{color:S.color,children:S.text})]}),(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Damages Breakdown",children:(0,e.createComponentVNode)(2,t.Box,{children:[(!I||!g)&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No valid scan detected."}),!!I&&!!g&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function A(){return N("fix_all")}return A}(),children:"Repair All Damages"}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function A(){return N("fix_none")}return A}(),children:"Repair No Damages"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function A(){return N("clone")}return A}(),children:"Clone"})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[0],maxValue:f.biomass_storage_capacity,ranges:{bad:[2*f.biomass_storage_capacity/3,f.biomass_storage_capacity],average:[f.biomass_storage_capacity/3,2*f.biomass_storage_capacity/3],good:[0,f.biomass_storage_capacity/3]},color:L[0]>f.biomass?"bad":null,children:["Biomass: ",L[0],"/",f.biomass,"/",f.biomass_storage_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[1],maxValue:f.max_reagent_capacity,ranges:{bad:[2*f.max_reagent_capacity/3,f.max_reagent_capacity],average:[f.max_reagent_capacity/3,2*f.max_reagent_capacity/3],good:[0,f.max_reagent_capacity/3]},color:L[1]>f.sanguine_reagent?"bad":"good",children:["Sanguine: ",L[1],"/",f.sanguine_reagent,"/",f.max_reagent_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[2],maxValue:f.max_reagent_capacity,ranges:{bad:[2*f.max_reagent_capacity/3,f.max_reagent_capacity],average:[f.max_reagent_capacity/3,2*f.max_reagent_capacity/3],good:[0,f.max_reagent_capacity/3]},color:L[2]>f.osseous_reagent?"bad":"good",children:["Osseous: ",L[2],"/",f.osseous_reagent,"/",f.max_reagent_capacity]})})]}),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,u)]})]})})]})]})},p=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.patient_limb_data,g=v.limb_list,V=v.desired_limb_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Limbs",children:g.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"15%",height:"20px",children:[f[S][4],":"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),f[S][3]===0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0]+V[S][1],maxValue:f[S][5],ranges:{good:[0,f[S][5]/3],average:[f[S][5]/3,2*f[S][5]/3],bad:[2*f[S][5]/3,f[S][5]]},children:["Post-Cloning Damage: ",(0,e.createComponentVNode)(2,t.Icon,{name:"bone"})," "+V[S][0]+" / ",(0,e.createComponentVNode)(2,t.Icon,{name:"fire"})," "+V[S][1]]})}),f[S][3]!==0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",f[S][4]," is missing!"]})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[!!f[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][3],onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"replace"})}return L}(),children:"Replace Limb"})}),!f[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][0]||f[S][1]),checked:!(V[S][0]||V[S][1]),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"damage"})}return L}(),children:"Repair Damages"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][2]&b),checked:!(V[S][2]&b),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"bone"})}return L}(),children:"Mend Bone"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][2]&y),checked:!(V[S][2]&y),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"ib"})}return L}(),children:"Mend IB"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(f[S][2]&B),checked:!(V[S][2]&B),onClick:function(){function L(){return N("toggle_limb_repair",{limb:S,type:"critburn"})}return L}(),children:"Mend Critical Burn"})]})]})]},S)})})},u=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.patient_organ_data,g=v.organ_list,V=v.desired_organ_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Organs",children:g.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"20%",height:"20px",children:[f[S][3],":"," "]}),f[S][5]!=="heart"&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!!f[S][2]&&(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][2]&&!V[S][1],onClick:function(){function L(){return N("toggle_organ_repair",{organ:S,type:"replace"})}return L}(),children:"Replace Organ"}),!f[S][2]&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!f[S][0],checked:!V[S][0],onClick:function(){function L(){return N("toggle_organ_repair",{organ:S,type:"damage"})}return L}(),children:"Repair Damages"})})]})}),f[S][5]==="heart"&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Heart replacement is required for cloning."}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[!!f[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",f[S][3]," is missing!"]}),!f[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0],maxValue:f[S][4],ranges:{good:[0,f[S][4]/3],average:[f[S][4]/3,2*f[S][4]/3],bad:[2*f[S][4]/3,f[S][4]]},children:"Post-Cloning Damage: "+V[S][0]})]})]})},S)})})}},98723:function(T,r,n){"use strict";r.__esModule=!0,r.CloningPod=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.CloningPod=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.biomass,p=i.biomass_storage_capacity,u=i.sanguine_reagent,d=i.osseous_reagent,s=i.organs,l=i.currently_cloning;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Liquid Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:c,ranges:{good:[2*p/3,p],average:[p/3,2*p/3],bad:[0,p/3]},minValue:0,maxValue:p})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:u+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(){function h(N,v){return C("remove_reagent",{reagent:"sanguine_reagent",amount:v})}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function h(){return C("purge_reagent",{reagent:"sanguine_reagent"})}return h}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:d+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:d,step:1,unit:"units",onChange:function(){function h(N,v){return C("remove_reagent",{reagent:"osseous_reagent",amount:v})}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function h(){return C("purge_reagent",{reagent:"osseous_reagent"})}return h}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Organ Storage",children:[!l&&(0,e.createComponentVNode)(2,t.Box,{children:[!s&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No organs loaded."}),!!s&&s.map(function(h){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:h.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",onClick:function(){function N(){return C("eject_organ",{organ_ref:h.ref})}return N}()})})]},h)})]}),!!l&&(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Unable to access organ storage while cloning."]})})]})]})})}return b}()},18259:function(T,r,n){"use strict";r.__esModule=!0,r.CoinMint=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=r.CoinMint=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data,p=c.materials,u=c.moneyBag,d=c.moneyBagContent,s=c.moneyBagMaxContent,l=(u?210:138)+Math.ceil(p.length/4)*64;return(0,e.createComponentVNode)(2,m.Window,{width:210,height:l,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Coin Type",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",color:c.active&&"bad",tooltip:!u&&"Need a money bag",disabled:!u,onClick:function(){function h(){return i("activate")}return h}()}),children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",tooltip:"Eject selected material",onClick:function(){function h(){return i("ejectMat")}return h}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:p.map(function(h){return(0,e.createComponentVNode)(2,o.Button,{bold:!0,inline:!0,translucent:!0,m:.2,textAlign:"center",selected:h.id===c.chosenMaterial,tooltip:h.name,content:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",h.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:h.amount})]}),onClick:function(){function N(){return i("selectMaterial",{material:h.id})}return N}()},h.id)})})]})})}),!!u&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Money Bag",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){function h(){return i("ejectBag")}return h}()}),children:(0,e.createComponentVNode)(2,o.ProgressBar,{width:"100%",minValue:0,maxValue:s,value:d,children:[d," / ",s]})})})]})})})}return y}()},8444:function(T,r,n){"use strict";r.__esModule=!0,r.ColourMatrixTester=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ColourMatrixTester=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.colour_data,p=[[{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}]];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:190,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Matrix",children:p.map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",textColor:"label",children:u.map(function(d){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:1,children:[d.name,":\xA0",(0,e.createComponentVNode)(2,t.NumberInput,{width:4,value:c[d.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(){function s(l,h){return C("setvalue",{idx:d.idx+1,value:h})}return s}()})]},d.name)})},u)})})})})})}return b}()},63818:function(T,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(s){switch(s){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,i);case 3:return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,c)})});case 4:return(0,e.createComponentVNode)(2,u);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},b=r.CommunicationsComputer=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),m(f)]})})})}return d}(),y=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.authenticated,g=v.noauthbutton,V=v.esc_section,S=v.esc_callable,I=v.esc_recallable,L=v.esc_status,w=v.authhead,A=v.is_ai,x=v.lastCallLoc,E=!1,P;return f?f===1?P="Command":f===2?P="Captain":f===3?P="CentComm Officer":f===4?(P="CentComm Secure Connection",E=!0):P="ERROR: Report This Bug!":P="Not Logged In",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:P})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:f?"sign-out-alt":"id-card",selected:f,disabled:g,content:f?"Log Out ("+P+")":"Log In",onClick:function(){function j(){return N("auth")}return j}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:L}),!!S&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!w,onClick:function(){function j(){return N("callshuttle")}return j}()})}),!!I&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!w||A,onClick:function(){function j(){return N("cancelshuttle")}return j}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},B=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.is_admin;return f?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,C)},k=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.is_admin,g=v.gamma_armory_location,V=v.admin_levels,S=v.authenticated,I=v.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"CentComm Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,p,{levels:V,required_access:f,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!f,onClick:function(){function L(){return N("send_to_cc_announcement_page")}return L}()}),S===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!f,onClick:function(){function L(){return N("make_other_announcement")}return L}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Response Team",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!f,onClick:function(){function L(){return N("dispatch_ert")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:I,content:I?"ERT calling enabled":"ERT calling disabled",tooltip:I?"Command can request an ERT":"ERTs cannot be requested",disabled:!f,onClick:function(){function L(){return N("toggle_ert_allowed")}return L}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!f,onClick:function(){function L(){return N("send_nuke_codes")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gamma Armory",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:g?"Send Gamma Armory":"Recall Gamma Armory",disabled:!f,onClick:function(){function L(){return N("move_gamma_armory")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"coins",content:"View Economy",disabled:!f,onClick:function(){function L(){return N("view_econ")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!f,onClick:function(){function L(){return N("view_fax")}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,C)})]})},C=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.msg_cooldown,g=v.emagged,V=v.cc_cooldown,S=v.security_level_color,I=v.str_security_level,L=v.levels,w=v.authcapt,A=v.authhead,x=v.messages,E="Make Priority Announcement";f>0&&(E+=" ("+f+"s)");var P=g?"Message [UNKNOWN]":"Message CentComm",j="Request Authentication Codes";return V>0&&(P+=" ("+V+"s)",j+=" ("+V+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:S,children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,p,{levels:L,required_access:w})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:E,disabled:!w||f>0,onClick:function(){function M(){return N("announce")}return M}()})}),!!g&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:P,disabled:!w||V>0,onClick:function(){function M(){return N("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!w,onClick:function(){function M(){return N("RestoreBackup")}return M}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:P,disabled:!w||V>0,onClick:function(){function M(){return N("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:j,disabled:!w||V>0,onClick:function(){function M(){return N("nukerequest")}return M}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!A,onClick:function(){function M(){return N("status")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"View ("+x.length+")",disabled:!A,onClick:function(){function M(){return N("messagelist")}return M}()})})]})})})],4)},i=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.stat_display,g=v.authhead,V=v.current_message_title,S=f.presets.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.name===f.type,disabled:!g,onClick:function(){function w(){return N("setstat",{statdisp:L.name})}return w}()},L.name)}),I=f.alerts.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.alert===f.icon,disabled:!g,onClick:function(){function w(){return N("setstat",{statdisp:3,alert:L.alert})}return w}()},L.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function L(){return N("main")}return L}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:f.line_1,disabled:!g,onClick:function(){function L(){return N("setmsg1")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:f.line_2,disabled:!g,onClick:function(){function L(){return N("setmsg2")}return L}()})})]})})})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.authhead,g=v.current_message_title,V=v.current_message,S=v.messages,I=v.security_level,L;if(g)L=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:g,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!f,onClick:function(){function A(){return N("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:V})})});else{var w=S.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!f||g===A.title,onClick:function(){function x(){return N("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!f,onClick:function(){function x(){return N("delmessage",{msgid:A.id})}return x}()})]},A.id)});L=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function A(){return N("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w})})}return(0,e.createComponentVNode)(2,t.Box,{children:L})},p=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=s.levels,g=s.required_access,V=s.use_confirm,S=v.security_level;return V?f.map(function(I){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:I.icon,content:I.name,disabled:!g||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return N("newalertlevel",{level:I.id})}return L}()},I.name)}):f.map(function(I){return(0,e.createComponentVNode)(2,t.Button,{icon:I.icon,content:I.name,disabled:!g||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return N("newalertlevel",{level:I.id})}return L}()},I.name)})},u=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.is_admin,g=v.possible_cc_sounds;if(!f)return N("main");var V=(0,a.useLocalState)(l,"subtitle",""),S=V[0],I=V[1],L=(0,a.useLocalState)(l,"text",""),w=L[0],A=L[1],x=(0,a.useLocalState)(l,"classified",0),E=x[0],P=x[1],j=(0,a.useLocalState)(l,"beepsound","Beep"),M=j[0],O=j[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Central Command Report",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function D(){return N("main")}return D}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:S,onChange:function(){function D(F,W){return I(W)}return D}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:w,onChange:function(){function D(F,W){return A(W)}return D}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function D(){return N("make_cc_announcement",{subtitle:S,text:w,classified:E,beepsound:M})}return D}()}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"260px",height:"20px",options:g,selected:M,onSelected:function(){function D(F){return O(F)}return D}(),disabled:E})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"volume-up",mx:"5px",disabled:E,tooltip:"Test sound",onClick:function(){function D(){return N("test_sound",{sound:M})}return D}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:E,content:"Classified",fluid:!0,tooltip:E?"Sent to station communications consoles":"Publically announced",onClick:function(){function D(){return P(!E)}return D}()})})]})]})})}},20562:function(T,r,n){"use strict";r.__esModule=!0,r.CompostBin=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.CompostBin=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.biomass,p=i.compost,u=i.biomass_capacity,d=i.compost_capacity,s=i.potassium,l=i.potassium_capacity,h=i.potash,N=i.potash_capacity,v=(0,a.useSharedState)(B,"vendAmount",1),f=v[0],g=v[1];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:250,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{label:"Resources",children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:c,minValue:0,maxValue:u,ranges:{good:[u*.5,1/0],average:[u*.25,u*.5],bad:[-1/0,u*.25]},children:[c," / ",u," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:p,minValue:0,maxValue:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[p," / ",d," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potassium",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:s,minValue:0,maxValue:l,ranges:{good:[l*.5,1/0],average:[l*.25,l*.5],bad:[-1/0,l*.25]},children:[s," / ",l," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potash",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:h,minValue:0,maxValue:N,ranges:{good:[N*.5,1/0],average:[N*.25,N*.5],bad:[-1/0,N*.25]},children:[h," / ",N," Units"]})})]})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:f,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function V(S,I){return g(I)}return V}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,align:"center",content:"Make Soil",disabled:p<25*f,icon:"arrow-circle-down",onClick:function(){function V(){return C("create",{amount:f})}return V}()})})})]})})})}return b}()},21813:function(T,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(73379),b=n(98595);function y(N,v){N.prototype=Object.create(v.prototype),N.prototype.constructor=N,B(N,v)}function B(N,v){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,g){return f.__proto__=g,f},B(N,v)}var k={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},C=["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(Math.random()*2e4),"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"],i=r.Contractor=function(){function N(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I;S.unauthorized?I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,l,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):S.load_animation_completed?I=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,c)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:S.page===1?(0,e.createComponentVNode)(2,u,{height:"100%"}):(0,e.createComponentVNode)(2,s,{height:"100%"})})],4):I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,l,{height:"100%",allMessages:C,finishedTimeout:3e3,onFinished:function(){function x(){return V("complete_load_animation")}return x}()})});var L=(0,t.useLocalState)(f,"viewingPhoto",""),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,b.Window,{theme:"syndicate",width:500,height:600,children:[w&&(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,b.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:I})})]})}return N}(),c=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.tc_available,L=S.tc_paid_out,w=S.completed_contracts,A=S.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},v,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[I," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:I<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function x(){return V("claim")}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[L," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",inline:!0,children:w})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},v,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===1,onClick:function(){function L(){return V("page",{page:1})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===2,onClick:function(){function L(){return V("page",{page:2})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},u=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.contracts,L=S.contract_active,w=S.can_extract,A=!!L&&I.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(f,"viewingPhoto",""),P=E[0],j=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!w||x,icon:"parachute-box",content:["Call Extraction",x&&(0,e.createComponentVNode)(2,m.Countdown,{timeLeft:A.time_left,format:function(){function M(O,D){return" ("+D.substr(3)+")"}return M}()})],onClick:function(){function M(){return V("extract")}return M}()})},v,{children:I.slice().sort(function(M,O){return M.status===1?-1:O.status===1?1:M.status-O.status}).map(function(M){var O;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:M.status===1&&"good",children:M.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:M.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function D(){return j("target_photo_"+M.uid+".png")}return D}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!k[M.status]&&(0,e.createComponentVNode)(2,o.Box,{color:k[M.status][1],inline:!0,mt:M.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:k[M.status][0]}),M.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function D(){return V("abort")}return D}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[M.fluff_message,!!M.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",M.completed_time]}),!!M.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!M.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",M.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",d(M)]}),(O=M.difficulties)==null?void 0:O.map(function(D,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:D.name+" ("+D.reward+" TC)",onClick:function(){function W(){return V("activate",{uid:M.uid,difficulty:F+1})}return W}()},F)}),!!M.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[M.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(M.objective.rewards.tc||0)+" TC",",\xA0",(M.objective.rewards.credits||0)+" Credits",")"]})]})]})},M.uid)})})))},d=function(v){if(!(!v.objective||v.status>1)){var f=v.objective.locs.user_area_id,g=v.objective.locs.user_coords,V=v.objective.locs.target_area_id,S=v.objective.locs.target_coords,I=f===V;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:I?"dot-circle-o":"arrow-alt-circle-right-o",color:I?"green":"yellow",rotation:I?null:-(0,a.rad2deg)(Math.atan2(S[1]-g[1],S[0]-g[0])),lineHeight:I?null:"0.85",size:"1.5"})})}},s=function(v,f){var g=(0,t.useBackend)(f),V=g.act,S=g.data,I=S.rep,L=S.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},v,{children:L.map(function(w){return(0,e.createComponentVNode)(2,o.Section,{title:w.name,children:[w.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:I-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:w.stock===0?"bad":"good",ml:"0.5rem",children:[w.stock," in stock"]})]},w.uid)})})))},l=function(N){function v(g){var V;return V=N.call(this,g)||this,V.timer=null,V.state={currentIndex:0,currentDisplay:[]},V}y(v,N);var f=v.prototype;return f.tick=function(){function g(){var V=this.props,S=this.state;if(S.currentIndex<=V.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var I=S.currentDisplay;I.push(V.allMessages[S.currentIndex])}else clearTimeout(this.timer),setTimeout(V.onFinished,V.finishedTimeout)}return g}(),f.componentDidMount=function(){function g(){var V=this,S=this.props.linesPerSecond,I=S===void 0?2.5:S;this.timer=setInterval(function(){return V.tick()},1e3/I)}return g}(),f.componentWillUnmount=function(){function g(){clearTimeout(this.timer)}return g}(),f.render=function(){function g(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(V){return(0,e.createFragment)([V,(0,e.createVNode)(1,"br")],0,V)})})}return g}(),v}(e.Component),h=function(v,f){var g=(0,t.useLocalState)(f,"viewingPhoto",""),V=g[0],S=g[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:V}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function I(){return S("")}return I}()})]})}},54151:function(T,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ConveyorSwitch=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.slowFactor,p=i.oneWay,u=i.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!p,onClick:function(){function d(){return C("toggleOneWay")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function d(){return C("slowFactor",{value:c-5})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function d(){return C("slowFactor",{value:c-1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(){function d(s){return s+"x"}return d}(),onChange:function(){function d(s,l){return C("slowFactor",{value:l})}return d}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function d(){return C("slowFactor",{value:c+1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function d(){return C("slowFactor",{value:c+5})}return d}()})," "]})]})})]})})})})}return b}()},73169:function(T,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(89005),a=n(88510),t=n(25328),o=n(72253),m=n(36036),b=n(36352),y=n(76910),B=n(98595),k=n(96184),C=["color"];function i(h,N){if(h==null)return{};var v={};for(var f in h)if({}.hasOwnProperty.call(h,f)){if(N.includes(f))continue;v[f]=h[f]}return v}var c=function(N,v){return N.dead?"Deceased":parseInt(N.health,10)<=v?"Critical":parseInt(N.stat,10)===1?"Unconscious":"Living"},p=function(N,v){return N.dead?"red":parseInt(N.health,10)<=v?"orange":parseInt(N.stat,10)===1?"blue":"green"},u=r.CrewMonitor=function(){function h(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=(0,o.useLocalState)(v,"tabIndex",V.tabIndex),I=S[0],L=S[1],w=function(){function x(E){L(E),g("set_tab_index",{tab_index:E})}return x}(),A=function(){function x(E){switch(E){case 0:return(0,e.createComponentVNode)(2,d);case 1:return(0,e.createComponentVNode)(2,l);default:return"WE SHOULDN'T BE HERE!"}}return x}();return(0,e.createComponentVNode)(2,B.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Tabs,{children:[(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"table",selected:I===0,onClick:function(){function x(){return w(0)}return x}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"map-marked-alt",selected:I===1,onClick:function(){function x(){return w(1)}return x}(),children:"Map View"},"MapView")]})}),A(I)]})})})}return h}(),d=function(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=(0,a.sortBy)(function(M){return M.name})(V.crewmembers||[]),I=V.possible_levels,L=V.viewing_current_z_level,w=V.is_advanced,A=V.highlightedNames,x=(0,o.useLocalState)(v,"search",""),E=x[0],P=x[1],j=(0,t.createSearch)(E,function(M){return M.name+"|"+M.assignment+"|"+M.area});return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,m.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function M(O,D){return P(D)}return M}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:w?(0,e.createComponentVNode)(2,m.Dropdown,{mr:"5px",width:"50px",options:I,selected:L,onSelected:function(){function M(O){return g("switch_level",{new_level:O})}return M}()}):null})]}),(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,m.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:(0,e.createComponentVNode)(2,m.Button,{tooltip:"Clear highlights",icon:"square-xmark",onClick:function(){function M(){return g("clear_highlighted_names")}return M}()})}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Location"})]}),S.filter(j).map(function(M){var O=A.includes(M.name);return(0,e.createComponentVNode)(2,m.Table.Row,{bold:!!M.is_command,children:[(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,k.ButtonCheckbox,{checked:O,tooltip:"Mark on map",onClick:function(){function D(){return g(O?"remove_highlighted_name":"add_highlighted_name",{name:M.name})}return D}()})}),(0,e.createComponentVNode)(2,b.TableCell,{children:[M.name," (",M.assignment,")"]}),(0,e.createComponentVNode)(2,b.TableCell,{children:[(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:p(M,V.critThreshold),children:c(M,V.critThreshold)}),M.sensor_type>=2||V.ignoreSensors?(0,e.createComponentVNode)(2,m.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:M.oxy}),"|",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:M.tox}),"|",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.burn,children:M.fire}),"|",(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:y.COLORS.damageType.brute,children:M.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,b.TableCell,{children:M.sensor_type===3||V.ignoreSensors?V.isAI||V.isObserver?(0,e.createComponentVNode)(2,m.Button,{fluid:!0,icon:"location-arrow",content:M.area+" ("+M.x+", "+M.y+")",onClick:function(){function D(){return g("track",{track:M.ref})}return D}()}):M.area+" ("+M.x+", "+M.y+")":(0,e.createComponentVNode)(2,m.Box,{inline:!0,color:"grey",children:"Not Available"})})]},M.name)})]})]})},s=function(N,v){var f=N.color,g=i(N,C);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m.NanoMap.Marker,Object.assign({},g,{children:(0,e.createVNode)(1,"span","highlighted-marker color-border-"+f)})))},l=function(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=V.highlightedNames;return(0,e.createComponentVNode)(2,m.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,m.NanoMap,{zoom:V.zoom,offsetX:V.offsetX,offsetY:V.offsetY,onZoom:function(){function I(L){return g("set_zoom",{zoom:L})}return I}(),onOffsetChange:function(){function I(L,w){return g("set_offset",{offset_x:w.offsetX,offset_y:w.offsetY})}return I}(),children:V.crewmembers.filter(function(I){return I.sensor_type===3||V.ignoreSensors}).map(function(I){var L=p(I,V.critThreshold),w=S.includes(I.name),A=function(){return V.isObserver?g("track",{track:I.ref}):null},x=function(){return g(w?"remove_highlighted_name":"add_highlighted_name",{name:I.name})},E=I.name+" ("+I.assignment+")";return w?(0,e.createComponentVNode)(2,s,{x:I.x,y:I.y,tooltip:E,color:L,onClick:A,onDblClick:x},I.ref):(0,e.createComponentVNode)(2,m.NanoMap.MarkerIcon,{x:I.x,y:I.y,icon:"circle",tooltip:E,color:L,onClick:A,onDblClick:x},I.ref)})})})}},63987:function(T,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=r.Cryo=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:520,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B)})})})}return C}(),B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.isOperating,l=d.hasOccupant,h=d.occupant,N=h===void 0?[]:h,v=d.cellTemperature,f=d.cellTemperatureStatus,g=d.isBeakerLoaded,V=d.cooldownProgress,S=d.auto_eject_healthy,I=d.auto_eject_dead;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",onClick:function(){function L(){return u("ejectOccupant")}return L}(),disabled:!l,children:"Eject"}),children:l?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:N.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:N.health,max:N.maxHealth,value:N.health/N.maxHealth,color:N.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(N.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[N.stat][0],children:b[N.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(N.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),m.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:N[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(N[L.type])})})},L.id)})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Cell",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function L(){return u("ejectBeaker")}return L}(),disabled:!g,children:"Eject Beaker"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",onClick:function(){function L(){return u(s?"switchOff":"switchOn")}return L}(),selected:s,children:s?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:f,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dosage interval",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!g&&"average",value:V,minValue:0,maxValue:100})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:S?"toggle-on":"toggle-off",selected:S,onClick:function(){function L(){return u(S?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:S?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"toggle-on":"toggle-off",selected:I,onClick:function(){function L(){return u(I?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:I?"On":"Off"})})]})})})],4)},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.isBeakerLoaded,l=d.beakerLabel,h=d.beakerVolume;return s?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!l&&"average",children:[l||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!h&&"bad",ml:1,children:h?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h,format:function(){function N(v){return Math.round(v)+" units remaining"}return N}()}):"Beaker is empty"})],4):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"bad",children:"No beaker loaded"})}},86099:function(T,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(25328),b=r.CryopodConsole=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.account_name,d=p.allow_items;return(0,e.createComponentVNode)(2,o.Window,{title:"Cryopod Console",width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(u||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!d&&(0,e.createComponentVNode)(2,B)]})})}return k}(),y=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:u.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(d,s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:d.rank},s)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.frozen_items,s=function(h){var N=h.toString();return N.startsWith("the ")&&(N=N.slice(4,N.length)),(0,m.toTitleCase)(N)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:d.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s(l.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function h(){return p("one_item",{item:l.uid})}return h}()})},l)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function l(){return p("all_items")}return l}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},12692:function(T,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],B=[5,10,20,30,50],k=r.DNAModifier=function(){function f(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.irradiating,A=L.dnaBlockSize,x=L.occupant;V.dnaBlockSize=A,V.isDNAInvalid=!x.isViableSubject||!x.uniqueIdentity||!x.structuralEnzymes;var E;return w&&(E=(0,e.createComponentVNode)(2,N,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,m.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})})]})}return f}(),C=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.locked,A=L.hasOccupant,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Engaged":"Disengaged",onClick:function(){function E(){return I("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||w,icon:"user-slash",content:"Eject",onClick:function(){function E(){return I("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:x.minHealth,max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[x.stat][0],children:b[x.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),V.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:x.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:L.occupant.uniqueEnzymes?L.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},i=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedMenuKey,A=L.hasOccupant,x=L.occupant;if(A){if(V.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return w==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,u)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,u)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,d):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,h)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(P,j){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:P[2],selected:w===P[0],onClick:function(){function M(){return I("selectMenuKey",{key:P[0]})}return M}(),children:P[1]},j)})}),E]})},c=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedUIBlock,A=L.selectedUISubBlock,x=L.selectedUITarget,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,v,{dnaString:E.uniqueIdentity,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:x,format:function(){function P(j){return j.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(j,M){return I("changeUITarget",{value:M})}return P}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function P(){return I("pulseUIRadiation")}return P}()})]})},p=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedSEBlock,A=L.selectedSESubBlock,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,v,{dnaString:x.structuralEnzymes,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return I("pulseSERadiation")}return E}()})]})},u=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:w,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationIntensity",{value:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationDuration",{value:P})}return x}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function x(){return I("pulseRadiation")}return x}()})]})},d=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.buffers,A=w.map(function(x,E){return(0,e.createComponentVNode)(2,s,{id:E+1,name:"Buffer "+(E+1),buffer:x},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,l)})]})},s=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=g.id,A=g.name,x=g.buffer,E=L.isInjectorReady,P=A+(x.data?" - "+x.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:P,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!x.data,icon:"trash",content:"Clear",onClick:function(){function j(){return I("bufferOption",{option:"clear",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function j(){return I("bufferOption",{option:"changeLabel",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data||!L.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function j(){return I("bufferOption",{option:"saveDisk",id:w})}return j}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"saveUI",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"saveUIAndUE",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"saveSE",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"loadDisk",id:w})}return j}()})]}),!!x.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:x.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[x.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!x.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"createInjector",id:w})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"createInjector",id:w,block:1})}return j}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function j(){return I("bufferOption",{option:"transfer",id:w})}return j}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},l=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!w||!A.data,icon:"trash",content:"Wipe",onClick:function(){function x(){return I("wipeDisk")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function x(){return I("ejectDisk")}return x}()})],4),children:w?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},h=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.isBeakerLoaded,A=L.beakerVolume,x=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function E(){return I("ejectBeaker")}return E}()}),children:w?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[B.map(function(E,P){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function j(){return I("injectRejuvenators",{amount:E})}return j}()},P)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return I("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:x||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},N=function(g,V){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),g.duration,(0,e.createTextVNode)(" second"),g.duration===1?"":"s"],0)})]})},v=function(g,V){for(var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=g.dnaString,A=g.selectedBlock,x=g.selectedSubblock,E=g.blockSize,P=g.action,j=w.split(""),M=0,O=[],D=function(){for(var U=F/E+1,K=[],G=function(){var Z=$+1;K.push((0,e.createComponentVNode)(2,t.Button,{selected:A===U&&x===Z,content:j[F+$],mb:"0",onClick:function(){function ie(){return I(P,{block:U,subblock:Z})}return ie}()}))},$=0;$l.spawnpoints?"red":"green",children:[l.total," total, versus ",l.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{width:10.5,textAlign:"center",icon:"ambulance",content:"Send ERT",onClick:function(){function g(){return s("dispatch_ert",{silent:v})}return g}()})})]})})})},C=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:h&&h.length?h.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:N.sender_real_name,onClick:function(){function v(){return s("view_player_panel",{uid:N.sender_uid})}return v}(),tooltip:"View player panel"}),children:N.message},(0,m.decodeHtmlEntities)(N.time))}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"broadcast-tower",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No ERT requests."]})})})})},i=function(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=(0,a.useLocalState)(u,"text",""),N=h[0],v=h[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:19,fluid:!0,multiline:1,value:N,onChange:function(){function f(g,V){return v(V)}return f}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function f(){return s("deny_ert",{reason:N})}return f}()})]})})}},90217:function(T,r,n){"use strict";r.__esModule=!0,r.EconomyManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=r.EconomyManager=function(){function B(k,C){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:325,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return B}(),y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.next_payroll_time;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Global",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"global"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Members",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department_members"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Single Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"crew_member"})}return d}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",u," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function d(){return c("delay_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function d(){return c("set_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function d(){return c("accelerate_payroll")}return d}()})]}),(0,e.createComponentVNode)(2,t.NoticeBox,{children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons!"]})],4)}},82565:function(T,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.Electropack=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data,p=c.power,u=c.code,d=c.frequency,s=c.minFrequency,l=c.maxFrequency;return(0,e.createComponentVNode)(2,m.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,onClick:function(){function h(){return i("power")}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return i("reset",{reset:"freq"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:s/10,maxValue:l/10,value:d/10,format:function(){function h(N){return(0,a.toFixed)(N,1)}return h}(),width:"80px",onChange:function(){function h(N,v){return i("freq",{freq:v})}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function h(){return i("reset",{reset:"code"})}return h}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(){function h(N,v){return i("code",{code:v})}return h}()})})]})})})})}return y}()},11243:function(T,r,n){"use strict";r.__esModule=!0,r.Emojipedia=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=r.Emojipedia=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.data,p=c.emoji_list,u=(0,t.useLocalState)(C,"searchText",""),d=u[0],s=u[1],l=p.filter(function(h){return h.name.toLowerCase().includes(d.toLowerCase())});return(0,e.createComponentVNode)(2,m.Window,{width:325,height:400,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Emojipedia v1.0.1",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by name",value:d,onInput:function(){function h(N,v){return s(v)}return h}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Click on an emoji to copy its tag!",tooltipPosition:"bottom",icon:"circle-question"})],4),children:l.map(function(h){return(0,e.createComponentVNode)(2,o.Button,{m:1,color:"transparent",className:(0,a.classes)(["emoji16x16","emoji-"+h.name]),style:{transform:"scale(1.5)"},tooltip:h.name,onClick:function(){function N(){y(h.name)}return N}()},h.name)})})})})}return B}(),y=function(k){var C=document.createElement("input"),i=":"+k+":";C.value=i,document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C)}},69784:function(T,r,n){"use strict";r.__esModule=!0,r.EmotePanelContent=r.EmotePanel=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),m=n(25328),b=r.EmotePanel=function(){function B(k,C){return(0,e.createComponentVNode)(2,t.Window,{width:500,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,y)})})})}return B}(),y=r.EmotePanelContent=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.emotes,d=(0,a.useLocalState)(C,"searchText",""),s=d[0],l=d[1],h=(0,a.useLocalState)(C,"filterVisible",""),N=h[0],v=h[1],f=(0,a.useLocalState)(C,"filterAudible",""),g=f[0],V=f[1],S=(0,a.useLocalState)(C,"filterSound",""),I=S[0],L=S[1],w=(0,a.useLocalState)(C,"filterHands",""),A=w[0],x=w[1],E=(0,a.useLocalState)(C,"filterTargettable",""),P=E[0],j=E[1],M=(0,a.useLocalState)(C,"useTarget",""),O=M[0],D=M[1],F=(0,e.createComponentVNode)(2,o.Input,{placeholder:"\u0418\u0441\u043A\u0430\u0442\u044C \u044D\u043C\u043E\u0446\u0438\u044E...",fluid:!0,onInput:function(){function W(U,K){return l(K)}return W}()});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Button,{icon:"eye",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043C\u044B\u0439",selected:N,onClick:function(){function W(){return v(!N)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",align:"center",tooltip:"\u0421\u043B\u044B\u0448\u0438\u043C\u044B\u0439",selected:g,onClick:function(){function W(){return V(!g)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"volume-up",align:"center",tooltip:"\u0417\u0432\u0443\u043A",selected:I,onClick:function(){function W(){return L(!I)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"hand-paper",align:"center",tooltip:"\u0420\u0443\u043A\u0438",selected:A,onClick:function(){function W(){return x(!A)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",height:"100%",align:"center",tooltip:"\u0426\u0435\u043B\u044C",selected:P,onClick:function(){function W(){return j(!P)}return W}()})]}),children:F})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:s.length>0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+s+'"':"\u0412\u0441\u0435 \u044D\u043C\u043E\u0446\u0438\u0438",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",selected:O,onClick:function(){function W(){return D(!O)}return W}(),children:"\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u0446\u0435\u043B\u044C"}),children:(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:u.filter(function(W){return W.key&&(s.length>0?W.key.toLowerCase().includes(s.toLowerCase())||W.name.toLowerCase().includes(s.toLowerCase()):!0)&&(N?W.visible:!0)&&(g?W.audible:!0)&&(I?W.sound:!0)&&(A?W.hands:!0)&&(P?W.targettable:!0)}).map(function(W){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function U(){return c("play_emote",{emote_key:W.key,useTarget:O})}return U}(),children:[W.visible?(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}):"",W.audible?(0,e.createComponentVNode)(2,o.Icon,{name:"comment"}):"",W.sound?(0,e.createComponentVNode)(2,o.Icon,{name:"volume-up"}):"",W.hands?(0,e.createComponentVNode)(2,o.Icon,{name:"hand-paper"}):"",W.targettable?(0,e.createComponentVNode)(2,o.Icon,{name:"crosshairs"}):"",W.name]},W.name)})})})})})],4)}return B}()},36730:function(T,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(64795),y=n(88510),B=r.EvolutionMenu=function(){function i(c,p){return(0,e.createComponentVNode)(2,m.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,C)]})})})}return i}(),k=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.evo_points,h=s.can_respec;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!h,content:"Readapt",icon:"sync",onClick:function(){function N(){return d("readapt")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})})},C=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.evo_points,h=s.ability_tabs,N=s.purchased_abilities,v=s.view_mode,f=(0,t.useLocalState)(p,"selectedTab",h[0]),g=f[0],V=f[1],S=(0,t.useLocalState)(p,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(p,"ability_tabs",h[0].abilities),A=w[0],x=w[1],E=function(O,D){if(D===void 0&&(D=""),!O||O.length===0)return[];var F=(0,a.createSearch)(D,function(W){return W.name+"|"+W.description});return(0,b.flow)([(0,y.filter)(function(W){return W==null?void 0:W.name}),(0,y.filter)(F),(0,y.sortBy)(function(W){return W==null?void 0:W.name})])(O)},P=function(O){if(L(O),O==="")return x(g.abilities);x(E(h.map(function(D){return D.abilities}).flat(),O))},j=function(O){V(O),x(O.abilities),L("")};return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function M(O,D){P(D)}return M}(),value:I}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"square-o":"check-square-o",selected:!v,content:"Compact",onClick:function(){function M(){return d("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"check-square-o":"square-o",selected:v,content:"Expanded",onClick:function(){function M(){return d("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:h.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===""&&g===M,onClick:function(){function O(){j(M)}return O}(),children:M.category},M)})}),A.map(function(M,O){return(0,e.createComponentVNode)(2,o.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{ml:.5,color:"#dedede",children:M.name}),N.includes(M.power_path)&&(0,e.createComponentVNode)(2,o.Stack.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,o.Box,{as:"span",bold:!0,color:"#1b945c",children:M.cost})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,o.Button,{mr:.5,disabled:M.cost>l||N.includes(M.power_path),content:"Evolve",onClick:function(){function D(){return d("purchase",{power_path:M.power_path})}return D}()})})]}),!!v&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},O)})]})})}},17370:function(T,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(89005),a=n(35840),t=n(25328),o=n(72253),m=n(36036),b=n(73379),y=n(98595),B=["id","amount","lineDisplay","onClick"];function k(f,g){if(f==null)return{};var V={};for(var S in f)if({}.hasOwnProperty.call(f,S)){if(g.includes(S))continue;V[S]=f[S]}return V}var C=2e3,i={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function f(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.linked;return A?(0,e.createComponentVNode)(2,y.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,y.Window.Content,{className:"Exofab",children:[(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,u)}),w&&(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,d)})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,s)})]})})]})]})}):(0,e.createComponentVNode)(2,N)}return f}(),p=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.materials,A=L.capacity,x=Object.values(w).reduce(function(E,P){return E+P},0);return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,m.Box,{color:"label",mt:"0.25rem",children:[(x/A*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(E){return(0,e.createComponentVNode)(2,l,{mt:-2,id:E,bold:E==="metal"||E==="glass",onClick:function(){function P(){return I("withdraw",{id:E})}return P}()},E)})})},u=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.curCategory,A=L.categories,x=L.designs,E=L.syncing,P=(0,o.useLocalState)(V,"searchText",""),j=P[0],M=P[1],O=(0,t.createSearch)(j,function(K){return K.name}),D=x.filter(O),F=(0,o.useLocalState)(V,"levelsModal",!1),W=F[0],U=F[1];return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,m.Dropdown,{className:"Exofab__dropdown",selected:w,options:A,onSelected:function(){function K(G){return I("category",{cat:G})}return K}()}),buttons:(0,e.createComponentVNode)(2,m.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,m.Button,{icon:"plus",content:"Queue all",onClick:function(){function K(){return I("queueall")}return K}()}),(0,e.createComponentVNode)(2,m.Button,{icon:"info",content:"Show current tech levels",onClick:function(){function K(){return U(!0)}return K}()}),(0,e.createComponentVNode)(2,m.Button,{icon:"unlink",color:"red",tooltip:"Disconnect from R&D network",onClick:function(){function K(){return I("unlink")}return K}()})]}),children:[(0,e.createComponentVNode)(2,m.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function K(G,$){return M($)}return K}()}),D.map(function(K){return(0,e.createComponentVNode)(2,h,{design:K},K.id)}),D.length===0&&(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"No designs found."})]})},d=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.buildStart,x=L.buildEnd,E=L.worldTime;return(0,e.createComponentVNode)(2,m.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,m.ProgressBar.Countdown,{start:A,current:E,end:x,children:(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:["Building ",w,"\xA0(",(0,e.createComponentVNode)(2,b.Countdown,{current:E,timeLeft:x-E,format:function(){function P(j,M){return M.substr(3)}return P}()}),")"]})]})})})},s=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.queue,A=L.processingQueue,x=Object.entries(L.queueDeficit).filter(function(P){return P[1]<0}),E=w.reduce(function(P,j){return P+j.time},0);return(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,m.Box,{children:[(0,e.createComponentVNode)(2,m.Button,{selected:A,icon:A?"toggle-on":"toggle-off",content:"Process",onClick:function(){function P(){return I("process")}return P}()}),(0,e.createComponentVNode)(2,m.Button,{disabled:w.length===0,icon:"eraser",content:"Clear",onClick:function(){function P(){return I("unqueueall")}return P}()})]}),children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:w.length===0?(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:w.map(function(P,j){return(0,e.createComponentVNode)(2,m.Box,{color:P.notEnough&&"bad",children:[j+1,". ",P.name,j>0&&(0,e.createComponentVNode)(2,m.Button,{icon:"arrow-up",onClick:function(){function M(){return I("queueswap",{from:j+1,to:j})}return M}()}),j0&&(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,m.Divider),"Processing time:",(0,e.createComponentVNode)(2,m.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,m.Box,{inline:!0,bold:!0,children:new Date(E/10*1e3).toISOString().substr(14,5)})]}),Object.keys(x).length>0&&(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,m.Divider),"Lacking materials to complete:",x.map(function(P){return(0,e.createComponentVNode)(2,m.Box,{children:(0,e.createComponentVNode)(2,l,{id:P[0],amount:-P[1],lineDisplay:!0})},P[0])})]})],0)})})},l=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=g.id,A=g.amount,x=g.lineDisplay,E=g.onClick,P=k(g,B),j=L.materials[w]||0,M=A||j;if(!(M<=0&&!(w==="metal"||w==="glass"))){var O=A&&A>j;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",x&&"Exofab__material--line"])},P,{children:x?(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Stack.Item,{className:(0,a.classes)(["materials32x32",w])}),(0,e.createComponentVNode)(2,m.Stack.Item,{className:"Exofab__material--amount",color:O&&"bad",ml:0,mr:1,children:M.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,m.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,m.Button,{width:"85%",color:"transparent",onClick:E,children:(0,e.createComponentVNode)(2,m.Box,{mt:1,className:(0,a.classes)(["materials32x32",w])})})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__material--name",children:w}),(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__material--amount",children:[M.toLocaleString("en-US")," cm\xB3 (",Math.round(M/C*10)/10," ","sheets)"]})]})],4)})))}},h=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=g.design;return(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,m.Button,{disabled:w.notEnough||L.building,icon:"cog",content:w.name,onClick:function(){function A(){return I("build",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,m.Button,{icon:"plus-circle",onClick:function(){function A(){return I("queue",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,m.Box,{className:"Exofab__design--cost",children:Object.entries(w.cost).map(function(A){return(0,e.createComponentVNode)(2,m.Box,{children:(0,e.createComponentVNode)(2,l,{id:A[0],amount:A[1],lineDisplay:!0})},A[0])})}),(0,e.createComponentVNode)(2,m.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,m.Stack.Item,{children:[(0,e.createComponentVNode)(2,m.Icon,{name:"clock"}),w.time>0?(0,e.createFragment)([w.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})},N=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.controllers;return(0,e.createComponentVNode)(2,y.Window,{children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,m.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,m.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:"Link"})]}),w.map(function(A){return(0,e.createComponentVNode)(2,m.Table.Row,{children:[(0,e.createComponentVNode)(2,m.Table.Cell,{children:A.addr}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:A.net_id}),(0,e.createComponentVNode)(2,m.Table.Cell,{children:(0,e.createComponentVNode)(2,m.Button,{content:"Link",icon:"link",onClick:function(){function x(){return I("linktonetworkcontroller",{target_controller:A.addr})}return x}()})})]},A.addr)})]})})})})},v=function(g,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.tech_levels,A=(0,o.useLocalState)(V,"levelsModal",!1),x=A[0],E=A[1];return x?(0,e.createComponentVNode)(2,m.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:(0,e.createComponentVNode)(2,m.Section,{title:"Current tech levels",buttons:(0,e.createComponentVNode)(2,m.Button,{content:"Close",onClick:function(){function P(){E(!1)}return P}()}),children:(0,e.createComponentVNode)(2,m.LabeledList,{children:w.map(function(P){var j=P.name,M=P.level;return(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:j,children:M},j)})})})}):null}},59128:function(T,r,n){"use strict";r.__esModule=!0,r.ExperimentConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),b=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),y=r.ExperimentConsole=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.open,d=p.feedback,s=p.occupant,l=p.occupant_name,h=p.occupant_status,N=function(){function f(){if(!s)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var g=function(){function S(){return m.get(h)}return S}(),V=g();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V.color,children:V.text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Experiments",children:[0,1,2].map(function(S){return(0,e.createComponentVNode)(2,t.Button,{icon:b.get(S).icon,content:b.get(S).label,onClick:function(){function I(){return c("experiment",{experiment_type:S})}return I}()},S)})})]})}return f}(),v=N();return(0,e.createComponentVNode)(2,o.Window,{theme:"abductor",width:350,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){function f(){return c("door")}return f}()}),children:v})]})})}return B}()},97086:function(T,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=0,b=1013,y=function(C){var i="good",c=80,p=95,u=110,d=120;return Cu?i="average":C>d&&(i="bad"),i},B=r.ExternalAirlockController=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.chamber_pressure,s=u.exterior_status,l=u.interior_status,h=u.processing;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:205,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:y(d),value:d,minValue:m,maxValue:b,children:[d," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!h,onClick:function(){function N(){return p("abort")}return N}()}),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:h,onClick:function(){function N(){return p("cycle_ext")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:h,onClick:function(){function N(){return p("cycle_int")}return N}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:l==="open"?"red":h?"yellow":null,onClick:function(){function N(){return p("force_ext")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:l==="open"?"red":h?"yellow":null,onClick:function(){function N(){return p("force_int")}return N}()})]})]})]})})}return k}()},96142:function(T,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.FaxMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:295,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.scan_name?"eject":"id-card",selected:i.scan_name,content:i.scan_name?i.scan_name:"-----",tooltip:i.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return C("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,disabled:i.nologin,content:i.realauth?"Log Out":"Log In",onClick:function(){function c(){return C("auth")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:i.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i.paper?"eject":"paperclip",disabled:!i.authenticated&&!i.paper,content:i.paper?i.paper:"-----",onClick:function(){function c(){return C("paper")}return c}()}),!!i.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return C("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:i.destination?i.destination:"-----",disabled:!i.authenticated,onClick:function(){function c(){return C("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:i.sendError?i.sendError:"Send",disabled:!i.paper||!i.destination||!i.authenticated||i.sendError,onClick:function(){function c(){return C("send")}return c}()})})]})})]})})}return b}()},74123:function(T,r,n){"use strict";r.__esModule=!0,r.FilingCabinet=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.FilingCabinet=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=k.config,p=i.contents,u=c.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Contents",children:[!p&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"folder-open",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"The ",u," is empty."]})}),!!p&&p.slice().map(function(d){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:d.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){function s(){return C("retrieve",{index:d.index})}return s}()})})]},d)})]})})})})}return b}()},83767:function(T,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=B.image,u=B.isSelected,d=B.onSelect;return(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+p,style:{"border-style":u&&"solid"||"none","border-width":"2px","border-color":"orange",padding:u&&"2px"||"4px"},onClick:d})},b=r.FloorPainter=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.availableStyles,u=c.selectedStyle,d=c.selectedDir,s=c.directionsPreview,l=c.allStylesPreview;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function h(){return i("cycle_style",{offset:-1})}return h}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:p,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function h(N){return i("select_style",{style:N})}return h}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function h(){return i("cycle_style",{offset:1})}return h}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:p.map(function(h){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,m,{image:l[h],isSelected:u===h,onSelect:function(){function N(){return i("select_style",{style:h})}return N}()})},"{style}")})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:["north","","south"].map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[h+"west",h,h+"east"].map(function(N){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:N===""?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,m,{image:s[N],isSelected:N===d,onSelect:function(){function v(){return i("select_direction",{direction:N})}return v}()})},N)})},h)})})})})]})})})}return y}()},53424:function(T,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=function(u){return u?"("+u.join(", ")+")":"ERROR"},y=function(u,d){if(!(!u||!d)){if(u[2]!==d[2])return null;var s=Math.atan2(d[1]-u[1],d[0]-u[0]),l=Math.sqrt(Math.pow(d[1]-u[1],2)+Math.pow(d[0]-u[0],2));return{angle:(0,a.rad2deg)(s),distance:l}}},B=r.GPS=function(){function p(u,d){var s=(0,t.useBackend)(d),l=s.data,h=l.emped,N=l.active,v=l.area,f=l.position,g=l.saved;return(0,e.createComponentVNode)(2,m.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:h?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,k,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),N?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{area:v,position:f})}),g&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{title:"Saved Position",position:g})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,c,{height:"100%"})})],0):(0,e.createComponentVNode)(2,k)],0)})})})}return p}(),k=function(u,d){var s=u.emp;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:s?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),s?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},C=function(u,d){var s=(0,t.useBackend)(d),l=s.act,h=s.data,N=h.active,v=h.tag,f=h.same_z,g=(0,t.useLocalState)(d,"newTag",v),V=g[0],S=g[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:N,icon:N?"toggle-on":"toggle-off",content:N?"On":"Off",onClick:function(){function I(){return l("toggle")}return I}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:v,onEnter:function(){function I(){return l("tag",{newtag:V})}return I}(),onInput:function(){function I(L,w){return S(w)}return I}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:v===V,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function I(){return l("tag",{newtag:V})}return I}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!f,icon:f?"compress":"expand",content:f?"Local Sector":"Global",onClick:function(){function I(){return l("same_z")}return I}()})})]})})},i=function(u,d){var s=u.title,l=u.area,h=u.position;return(0,e.createComponentVNode)(2,o.Section,{title:s||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[l&&(0,e.createFragment)([l,(0,e.createVNode)(1,"br")],0),b(h)]})})},c=function(u,d){var s=(0,t.useBackend)(d),l=s.data,h=l.position,N=l.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},u,{children:(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(v){return Object.assign({},v,y(h,v.position))}).map(function(v,f){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:f%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:v.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:v.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:v.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(v.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:v.distance>0?"arrow-right":"circle",rotation:-v.angle}),"\xA0",Math.floor(v.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:b(v.position)})]},f)})})})))}},89124:function(T,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(3939),m=n(98595),b=r.GeneModder=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.has_seed;return(0,e.createComponentVNode)(2,m.Window,{width:950,height:650,children:[(0,e.createVNode)(1,"div","GeneModder__left",(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,u,{scrollable:!0})}),2),(0,e.createVNode)(1,"div","GeneModder__right",(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,o.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),v===0?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})}),2)]})}return d}(),y=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})},B=function(s,l){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},k=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.has_seed,g=v.seed,V=v.has_disk,S=v.disk,I,L;return f?I=(0,e.createComponentVNode)(2,t.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+g.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:g.name,onClick:function(){function w(){return N("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return N("variant_name")}return w}()})]}):I=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:"None",onClick:function(){function w(){return N("eject_seed")}return w}()})}),V?L=S.name:L="None",(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plant Sample",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:L,tooltip:"Select Empty Disk",onClick:function(){function w(){return N("select_empty_disk")}return w}()})})})]})})},C=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.disk,g=v.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:[g.map(function(V){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:V.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(f!=null&&f.can_extract),icon:"save",onClick:function(){function S(){return N("extract",{id:V.id})}return S}()})})]},V)})," ",(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract All",disabled:!(f!=null&&f.can_extract),icon:"save",onClick:function(){function V(){return N("bulk_extract_core")}return V}()})})})]},"Core Genes")},i=function(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.reagent_genes,f=N.has_reagent;return(0,e.createComponentVNode)(2,p,{title:"Reagent Genes",gene_set:v,do_we_show:f})},c=function(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.trait_genes,f=N.has_trait;return(0,e.createComponentVNode)(2,p,{title:"Trait Genes",gene_set:v,do_we_show:f})},p=function(s,l){var h=s.title,N=s.gene_set,v=s.do_we_show,f=(0,a.useBackend)(l),g=f.act,V=f.data,S=V.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:h,open:!0,children:v?N.map(function(I){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:I.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(S!=null&&S.can_extract),icon:"save",onClick:function(){function L(){return g("extract",{id:I.id})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return g("remove",{id:I.id})}return L}()})})]},I)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},h)},u=function(s,l){var h=s.title,N=s.gene_set,v=s.do_we_show,f=(0,a.useBackend)(l),g=f.act,V=f.data,S=V.has_seed,I=V.empty_disks,L=V.stat_disks,w=V.trait_disks,A=V.reagent_disks;return(0,e.createComponentVNode)(2,t.Section,{title:"Disks",children:[(0,e.createVNode)(1,"br"),"Empty Disks: ",I,(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){function x(){return g("eject_empty_disk")}return x}()}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stats",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[L.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[x.stat==="All"?(0,e.createComponentVNode)(2,t.Button,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(x!=null&&x.ready)||!S,icon:"arrow-circle-down",onClick:function(){function E(){return g("bulk_replace_core",{index:x.index})}return E}()}):(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!x||!S,content:"Replace",onClick:function(){function E(){return g("replace",{index:x.index,stat:x.stat})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return g("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Traits",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[w.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){function E(){return g("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return g("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Reagents",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[A.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){function E(){return g("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return g("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return g("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})})]})]})}},73053:function(T,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(89005),a=n(36036),t=n(98595),o=n(41874),m=r.GenericCrewManifest=function(){function b(y,B){return(0,e.createComponentVNode)(2,t.Window,{theme:"nologo",width:588,height:510,children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return b}()},42914:function(T,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.GhostHudPanel=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.data,c=i.security,p=i.medical,u=i.diagnostic,d=i.radioactivity,s=i.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,b,{label:"Medical",type:"medical",is_active:p}),(0,e.createComponentVNode)(2,b,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,b,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Antag HUD",is_active:s,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=B.label,p=B.type,u=p===void 0?null:p,d=B.is_active,s=B.act_on,l=s===void 0?"hud_on":s,h=B.act_off,N=h===void 0?"hud_off":h;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){function v(){return i(d?N:l,{hud_type:u})}return v}()})})]})}},25825:function(T,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.GlandDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.glands,p=c===void 0?[]:c;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:p.map(function(u){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:u.color,content:u.amount||"0",disabled:!u.amount,onClick:function(){function d(){return C("dispense",{gland_id:u.id})}return d}()},u.id)})})})})}return b}()},10270:function(T,r,n){"use strict";r.__esModule=!0,r.GravityGen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.GravityGen=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.charging_state,p=i.charge_count,u=i.breaker,d=i.ext_power,s=function(){function h(N){return N>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",N===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}return h}(),l=function(){function h(N){if(N>0)return(0,e.createComponentVNode)(2,t.NoticeBox,{danger:!0,p:1.5,children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[l(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u?"power-off":"times",content:u?"Online":"Offline",color:u?"green":"red",px:1.5,onClick:function(){function h(){return C("breaker")}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:d?"good":"bad",children:s(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}return b}()},48657:function(T,r,n){"use strict";r.__esModule=!0,r.GuestPass=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(49148),b=r.GuestPass=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:690,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){function p(){return i("mode",{mode:0})}return p}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function p(){return i("mode",{mode:1})}return p}(),children:["Records (",c.issue_log.length,")"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function p(){return i("scan")}return p}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!c.showlogs&&(0,e.createComponentVNode)(2,t.Section,{title:"Issue Guest Pass",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Issue To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){function p(){return i("giv_name")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reason",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){function p(){return i("reason")}return p}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){function p(){return i("duration")}return p}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function p(){return i("issue")}return p}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function p(u){return i("access",{access:u})}return p}(),grantAll:function(){function p(){return i("grant_all")}return p}(),denyAll:function(){function p(){return i("clear_all")}return p}(),grantDep:function(){function p(u){return i("grant_region",{region:u})}return p}(),denyDep:function(){function p(u){return i("deny_region",{region:u})}return p}()})}):(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card",size:5,color:"gray",mb:5}),(0,e.createVNode)(1,"br"),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){function p(){return i("print")}return p}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(p,u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:p},u)})})||(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No logs"]})})})})]})})})}return y}()},67834:function(T,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=[1,5,10,20,30,50],b=null,y=r.HandheldChemDispenser=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:390,height:430,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return C}(),B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.amount,l=d.energy,h=d.maxEnergy,N=d.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[l," / ",h," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:m.map(function(v,f){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:s===v,content:v,onClick:function(){function g(){return u("amount",{amount:v})}return g}()})},f)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:N==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function v(){return u("mode",{mode:"dispense"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:N==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function v(){return u("mode",{mode:"remove"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:N==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function v(){return u("mode",{mode:"isolate"})}return v}()})]})})]})})})},k=function(i,c){for(var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.chemicals,l=s===void 0?[]:s,h=d.current_reagent,N=[],v=0;v<(l.length+1)%3;v++)N.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d.glass?"Drink Selector":"Chemical Selector",children:[l.map(function(f,g){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:h===f.id,content:f.title,style:{"margin-left":"2px"},onClick:function(){function V(){return u("dispense",{reagent:f.id})}return V}()},g)}),N.map(function(f,g){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},g)})]})})}},46098:function(T,r,n){"use strict";r.__esModule=!0,r.HealthSensor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.HealthSensor=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.act,p=i.data,u=p.on,d=p.user_health,s=p.minHealth,l=p.maxHealth,h=p.alarm_health;return(0,e.createComponentVNode)(2,m.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanning",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){function N(){return c("scan_toggle")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health activation",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:s,maxValue:l,value:h,format:function(){function N(v){return(0,a.toFixed)(v,1)}return N}(),width:"80px",onDrag:function(){function N(v,f){return c("alarm_health",{alarm_health:f})}return N}()})}),d!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:y(d),bold:d>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:d})})})]})})})})}return B}(),y=function(k){return k>50?"green":k>0?"orange":"red"}},36771:function(T,r,n){"use strict";r.__esModule=!0,r.Holodeck=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Holodeck=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=(0,a.useLocalState)(k,"currentDeck",""),u=p[0],d=p[1],s=(0,a.useLocalState)(k,"showReload",!1),l=s[0],h=s[1],N=c.decks,v=c.ai_override,f=c.emagged,g=function(){function V(S){i("select_deck",{deck:S}),d(S),h(!0),setTimeout(function(){h(!1)},3e3)}return V}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[l&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Holodeck Control System",children:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",u]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[N.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:V,selected:V===u,onClick:function(){function S(){return g(V)}return S}()},V)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!v&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:f?"Turn On":"Turn Off",color:f?"good":"bad",onClick:function(){function V(){return i("ai_override")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:f?"bad":"good",children:[f?"Off":"On",!!f&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function V(){return i("wildlifecarp")}return V}()})]})})]})]})})]})})]})}return y}(),b=function(B,k){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"white",children:(0,e.createVNode)(1,"h1",null,"\xA0Recalibrating projection apparatus.\xA0",16)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,"Please, wait for 3 seconds.",16)})]})}},25471:function(T,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.Instrument=function(){function i(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data;return(0,e.createComponentVNode)(2,m.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,C)]})})]})}return i}(),y=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.help;if(l)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function h(){return d("help")}return h}()})]})})})},B=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.lines,h=s.playing,N=s.repeat,v=s.maxRepeats,f=s.tempo,g=s.minTempo,V=s.maxTempo,S=s.tickLag,I=s.volume,L=s.minVolume,w=s.maxVolume,A=s.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function x(){return d("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return d("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return d("import")}return x}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:h,disabled:l.length===0||N<0,icon:"play",content:"Play",onClick:function(){function x(){return d("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!h,icon:"stop",content:"Stop",onClick:function(){function x(){return d("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:v,value:N,stepPixelSize:59,onChange:function(){function x(E,P){return d("repeat",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:f>=V,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return d("tempo",{new:f+S})}return x}()}),(0,a.round)(600/f)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:f<=g,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return d("tempo",{new:f-S})}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:w,value:I,stepPixelSize:6,onDrag:function(){function x(E,P){return d("setvolume",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,k)]})},k=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.allowedInstrumentNames,h=s.instrumentLoaded,N=s.instrument,v=s.canNoteShift,f=s.noteShift,g=s.noteShiftMin,V=s.noteShiftMax,S=s.sustainMode,I=s.sustainLinearDuration,L=s.sustainExponentialDropoff,w=s.legacy,A=s.sustainDropoffVolume,x=s.sustainHeldNote,E,P;return S===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:I,step:.5,stepPixelSize:85,format:function(){function j(M){return(0,a.round)(M*100)/100+" seconds"}return j}(),onChange:function(){function j(M,O){return d("setlinearfalloff",{new:O/10})}return j}()})):S===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function j(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return j}(),onChange:function(){function j(M,O){return d("setexpfalloff",{new:O})}return j}()})),l.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:w?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:h?(0,e.createComponentVNode)(2,o.Dropdown,{options:l,selected:N,width:"50%",onSelected:function(){function j(M){return d("switchinstrument",{name:M})}return j}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&v)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:g,maxValue:V,value:f,stepPixelSize:2,format:function(){function j(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return j}(),onChange:function(){function j(M,O){return d("setnoteshift",{new:O})}return j}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,onSelected:function(){function j(M){return d("setsustainmode",{new:M})}return j}()}),P]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function j(M,O){return d("setdropoffvolume",{new:O})}return j}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){function j(){return d("togglesustainhold")}return j}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function j(){return d("reset")}return j}()})]})})})},C=function(c,p){var u=(0,t.useBackend)(p),d=u.act,s=u.data,l=s.playing,h=s.lines,N=s.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!N||l,icon:"plus",content:"Add Line",onClick:function(){function v(){return d("newline",{line:h.length+1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!N,icon:N?"chevron-up":"chevron-down",onClick:function(){function v(){return d("edit")}return v}()})],4),children:!!N&&(h.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:h.map(function(v,f){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:f+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:l,icon:"pen",onClick:function(){function g(){return d("modifyline",{line:f+1})}return g}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:l,icon:"trash",onClick:function(){function g(){return d("deleteline",{line:f+1})}return g}()})],4),children:v},f)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},52736:function(T,r,n){"use strict";r.__esModule=!0,r.Jukebox=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(72253),m=n(36036),b=n(98595),y=r.Jukebox=function(){function C(i,c){var p=(0,o.useBackend)(c),u=p.act,d=p.data,s=d.active,l=d.looping,h=d.track_selected,N=d.volume,v=d.max_volume,f=d.songs,g=d.startTime,V=d.endTime,S=d.worldTime,I=d.need_coin,L=d.payment,w=d.advanced_admin,A=35,x=!L&&I&&!w,E=(0,t.flow)([(0,a.sortBy)(function(F){return F.name})])(f),P=f.find(function(F){return F.name===h}),j=E.length,M=P?E.findIndex(function(F){return F.name===P.name})+1:0,O=function(){function F(W){var U=Math.floor(W/60),K=W%60,G=String(U).padStart(2,"0")+":"+String(K).padStart(2,"0");return G}return F}(),D=(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:[s?l?"\u221E":O(Math.round((S-g)/10)):l?"\u221E":O(P.length)," ","/ ",l?"\u221E":O(P.length)]});return(0,e.createComponentVNode)(2,b.Window,{width:350,height:435,title:"\u041C\u0443\u0437\u044B\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442",children:[x?(0,e.createComponentVNode)(2,k):null,(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack,{children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,title:"\u041F\u0440\u043E\u0438\u0433\u0440\u044B\u0432\u0430\u0442\u0435\u043B\u044C",children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{bold:!0,maxWidth:"240px",children:P.name.length>A?(0,e.createVNode)(1,"marquee",null,P.name,0):P.name}),(0,e.createComponentVNode)(2,m.Stack,{fill:!0,mt:1.5,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,m.Button,{fluid:!0,icon:s?"pause":"play",color:"transparent",content:s?"\u0421\u0442\u043E\u043F":"\u0421\u0442\u0430\u0440\u0442",selected:s,onClick:function(){function F(){return u("toggle")}return F}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,m.Button.Checkbox,{fluid:!0,icon:"undo",content:"\u041F\u043E\u0432\u0442\u043E\u0440",disabled:s||I&&!w,tooltip:I&&!w?"\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440 \u0437\u0430 \u043C\u043E\u043D\u0435\u0442\u043A\u0443":null,checked:l,onClick:function(){function F(){return u("loop",{looping:!l})}return F}()})})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.ProgressBar.Countdown,{start:g,current:l?V:S,end:V,children:D})})]})})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{children:[s?(0,e.createComponentVNode)(2,B):null,(0,e.createComponentVNode)(2,m.Stack,{fill:!0,mb:1.5,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,m.Button,{color:"transparent",icon:"fast-backward",onClick:function(){function F(){return u("set_volume",{volume:"min"})}return F}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,m.Button,{color:"transparent",icon:"undo",onClick:function(){function F(){return u("set_volume",{volume:"reset"})}return F}()})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,m:0,textAlign:"right",children:(0,e.createComponentVNode)(2,m.Button,{color:"transparent",icon:"fast-forward",onClick:function(){function F(){return u("set_volume",{volume:"max"})}return F}()})})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{textAlign:"center",textColor:"label",children:[(0,e.createComponentVNode)(2,m.Knob,{size:2,color:N<=25?"green":N<=50?"":N<=75?"orange":"red",value:N,unit:"%",minValue:0,maxValue:v,step:1,stepPixelSize:5,onDrag:function(){function F(W,U){return u("set_volume",{volume:U})}return F}()}),"Volume"]})]})})]}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,title:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0442\u0440\u0435\u043A\u0438",buttons:(0,e.createComponentVNode)(2,m.Button,{bold:!0,icon:"random",color:"transparent",content:M+"/"+j,tooltip:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0442\u0440\u0435\u043A",tooltipPosition:"top-end",onClick:function(){function F(){var W=Math.floor(Math.random()*j),U=E[W];u("select_track",{track:U.name})}return F}()}),children:E.map(function(F){return(0,e.createComponentVNode)(2,m.Stack.Item,{mb:.5,textAlign:"left",children:(0,e.createComponentVNode)(2,m.Button,{fluid:!0,selected:P.name===F.name,color:"translucent",content:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:F.name}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:O(F.length)})]}),onClick:function(){function W(){u("select_track",{track:F.name})}return W}()})},F.name)})})})]})})]})}return C}(),B=function(){return(0,e.createComponentVNode)(2,m.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"music",size:"3",color:"gray",mb:1}),(0,e.createComponentVNode)(2,m.Box,{color:"label",bold:!0,children:"\u0418\u0433\u0440\u0430\u0435\u0442 \u043C\u0443\u0437\u044B\u043A\u0430"})]})},k=function(){return(0,e.createComponentVNode)(2,m.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"coins",size:"6",color:"gold",mr:1}),(0,e.createComponentVNode)(2,m.Box,{color:"label",bold:!0,mt:5,fontSize:2,children:"\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043C\u043E\u043D\u0435\u0442\u043A\u0443"})]})}},13618:function(T,r,n){"use strict";r.__esModule=!0,r.KeyComboModal=void 0;var e=n(89005),a=n(70611),t=n(72253),o=n(36036),m=n(98595),b=n(19203),y=n(51057),B=function(u){return u.key!==a.KEY.Alt&&u.key!==a.KEY.Control&&u.key!==a.KEY.Shift&&u.key!==a.KEY.Escape},k={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},C=3,i=function(u){var d="";if(u.altKey&&(d+="Alt"),u.ctrlKey&&(d+="Ctrl"),u.shiftKey&&!(u.keyCode>=48&&u.keyCode<=57)&&(d+="Shift"),u.location===C&&(d+="Numpad"),B(u))if(u.shiftKey&&u.keyCode>=48&&u.keyCode<=57){var s=u.keyCode-48;d+="Shift"+s}else{var l=u.key.toUpperCase();d+=k[l]||l}return d},c=r.KeyComboModal=function(){function p(u,d){var s=(0,t.useBackend)(d),l=s.act,h=s.data,N=h.init_value,v=h.large_buttons,f=h.message,g=f===void 0?"":f,V=h.title,S=h.timeout,I=(0,t.useLocalState)(d,"input",N),L=I[0],w=I[1],A=(0,t.useLocalState)(d,"binding",!0),x=A[0],E=A[1],P=function(){function O(D){if(!x){D.key===a.KEY.Enter&&l("submit",{entry:L}),D.key===a.KEY.Escape&&l("cancel");return}if(D.preventDefault(),B(D)){j(i(D)),E(!1);return}else if(D.key===a.KEY.Escape){j(N),E(!1);return}}return O}(),j=function(){function O(D){D!==L&&w(D)}return O}(),M=130+(g.length>30?Math.ceil(g.length/3):0)+(g.length&&v?5:0);return(0,e.createComponentVNode)(2,m.Window,{title:V,width:240,height:M,children:[S&&(0,e.createComponentVNode)(2,y.Loader,{value:S}),(0,e.createComponentVNode)(2,m.Window.Content,{onKeyDown:function(){function O(D){P(D)}return O}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:g})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:x,content:x&&x!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function O(){j(N),E(!0)}return O}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,b.InputButtons,{input:L})})]})]})})]})}return p}()},35655:function(T,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.KeycardAuth=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!i.swiping&&!i.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!i.redAvailable,onClick:function(){function u(){return C("triggerevent",{triggerevent:"Red Alert"})}return u}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Emergency Response Team"})}return u}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return u}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return u}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function u(){return C("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return u}(),content:"Revoke"})]})]})})]})});var p=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!i.hasSwiped&&!i.ertreason&&i.event==="Emergency Response Team"?p=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):i.hasConfirm?p=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):i.isRemote?p=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):i.hasSwiped&&(p=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,i.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:i.ertreason?"":"red",icon:i.ertreason?"check":"pencil-alt",content:i.ertreason?i.ertreason:"-----",disabled:i.busy,onClick:function(){function u(){return C("ert")}return u}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:i.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:i.busy||i.hasConfirm,onClick:function(){function u(){return C("reset")}return u}()}),children:p})]})})}return b}()},62955:function(T,r,n){"use strict";r.__esModule=!0,r.KitchenMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(62411),b=r.KitchenMachine=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.data,p=i.config,u=c.ingredients,d=c.operating,s=p.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Operating,{operating:d,name:s}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,e.createComponentVNode)(2,t.Table,{className:"Ingredient__Table",children:u.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{tr:5,children:[(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:l.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[l.amount," ",l.units]}),2)]},l.name)})})})})]})})})}return B}(),y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.inactive,d=p.tooltip;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:u,tooltip:u?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){function s(){return c("cook")}return s}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:u,tooltip:u?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){function s(){return c("eject")}return s}()})})]})})}},9525:function(T,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.LawManager=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.isAdmin,s=u.isSlaved,l=u.isMalf,h=u.isAIMalf,N=u.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:l?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(d&&s)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",s,"."]}),!!(l||h)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:N===0,onClick:function(){function v(){return p("set_view",{set_view:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:N===1,onClick:function(){function v(){return p("set_view",{set_view:1})}return v}()})]}),N===0&&(0,e.createComponentVNode)(2,b),N===1&&(0,e.createComponentVNode)(2,y)]})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.has_zeroth_laws,s=u.zeroth_laws,l=u.has_ion_laws,h=u.ion_laws,N=u.ion_law_nr,v=u.has_inherent_laws,f=u.inherent_laws,g=u.has_supplied_laws,V=u.supplied_laws,S=u.channels,I=u.channel,L=u.isMalf,w=u.isAdmin,A=u.zeroth_law,x=u.ion_law,E=u.inherent_law,P=u.supplied_law,j=u.supplied_law_position;return(0,e.createFragment)([!!d&&(0,e.createComponentVNode)(2,B,{title:"ERR_NULL_VALUE",laws:s,ctx:i}),!!l&&(0,e.createComponentVNode)(2,B,{title:N,laws:h,ctx:i}),!!v&&(0,e.createComponentVNode)(2,B,{title:"Inherent",laws:f,ctx:i}),!!g&&(0,e.createComponentVNode)(2,B,{title:"Supplied",laws:V,ctx:i}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:S.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===I,onClick:function(){function O(){return p("law_channel",{law_channel:M.channel})}return O}()},M.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function M(){return p("state_laws")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function M(){return p("notify_laws")}return M}()})})]})}),!!L&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(w&&!d)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_zeroth_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_ion_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_inherent_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:P}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:j,onClick:function(){function M(){return p("change_supplied_law_position")}return M}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return p("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return p("add_supplied_law")}return M}()})]})]})]})})],0)},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name+" - "+s.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function l(){return p("transfer_laws",{transfer_laws:s.ref})}return l}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.laws.has_ion_laws>0&&s.laws.ion_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)}),s.laws.has_zeroth_laws>0&&s.laws.zeroth_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)}),s.laws.has_inherent_laws>0&&s.laws.inherent_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)}),s.laws.has_supplied_laws>0&&s.laws.inherent_laws.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.index,children:l.law},l.index)})]})},s.name)})})},B=function(C,i){var c=(0,a.useBackend)(C.ctx),p=c.act,u=c.data,d=u.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:C.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),C.laws.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:s.state?"Yes":"No",selected:s.state,onClick:function(){function l(){return p("state_law",{ref:s.ref,state_law:s.state?0:1})}return l}()}),!!d&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function l(){return p("edit_law",{edit_law:s.ref})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function l(){return p("delete_law",{delete_law:s.ref})}return l}()})],4)]})]},s.law)})]})})}},85066:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=r.LibraryComputer=function(){function N(v,f){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return N}(),y=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:I.summary}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!I.isProgrammatic&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Categories",children:I.categories.join(", ")})]}),(0,e.createVNode)(1,"br"),L===I.ckey&&(0,e.createComponentVNode)(2,t.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return V("delete_book",{bookid:I.id,user_ckey:L})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Report Book",icon:"flag",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,m.modalOpen)(f,"report_book",{bookid:I.id})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,m.modalOpen)(f,"rate_info",{bookid:I.id})}return w}()})]})},B=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=v.args,L=S.selected_report,w=S.report_categories,A=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reasons",children:(0,e.createComponentVNode)(2,t.Box,{children:w.map(function(x,E){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:x.category_id===L,onClick:function(){function P(){return V("set_report",{report_type:x.category_id})}return P}()}),(0,e.createVNode)(1,"br")],4,E)})})})]}),(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){function x(){return V("submit_report",{bookid:I.id,user_ckey:A})}return x}()})]})},k=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.selected_rating,L=Array(10).fill().map(function(w,A){return 1+A});return(0,e.createComponentVNode)(2,t.Stack,{children:[L.map(function(w,A){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{bold:!0,icon:"star",color:I>=w?"caution":"default",onClick:function(){function x(){return V("set_rating",{rating_value:w})}return x}()})},A)}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,ml:2,fontSize:"150%",children:[I+"/10",(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},C=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.current_rating?I.current_rating:0,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Ratings",children:I.total_ratings?I.total_ratings:0})]}),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,t.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){function w(){return V("rate_book",{bookid:I.id,user_ckey:L})}return w}()})]})},i=function(v,f){var g=(0,a.useBackend)(f),V=g.data,S=(0,a.useLocalState)(f,"tabIndex",0),I=S[0],L=S[1],w=V.login_state;return(0,e.createComponentVNode)(2,t.Stack.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===0,onClick:function(){function A(){return L(0)}return A}(),children:"Book Archives"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===1,onClick:function(){function A(){return L(1)}return A}(),children:"Corporate Literature"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===2,onClick:function(){function A(){return L(2)}return A}(),children:"Upload Book"}),w===1&&(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===3,onClick:function(){function A(){return L(3)}return A}(),children:"Patron Manager"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===4,onClick:function(){function A(){return L(4)}return A}(),children:"Inventory"})]})})},c=function(v,f){var g=(0,a.useLocalState)(f,"tabIndex",0),V=g[0];switch(V){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,d);case 2:return(0,e.createComponentVNode)(2,s);case 3:return(0,e.createComponentVNode)(2,l);case 4:return(0,e.createComponentVNode)(2,h);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},p=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.searchcontent,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.title||"Input Title",onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.author||"Input Author",onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Ratings",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:1,width:"min-content",content:I.ratingmin,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_ratingmin")}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"To"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:1,width:"min-content",content:I.ratingmax,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_search_ratingmax")}return x}()})})]})})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Dropdown,{mt:.6,width:"190px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_search_category",{category_id:A[E]})}return x}()})})})}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_search_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Search",icon:"eraser",onClick:function(){function x(){return V("clear_search")}return x}()}),I.ckey?(0,e.createComponentVNode)(2,t.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){function x(){return V("clear_ckey_search")}return x}()}):(0,e.createComponentVNode)(2,t.Button,{content:"Find My Books",icon:"search",onClick:function(){function x(){return V("find_users_books",{user_ckey:w})}return x}()})]})]})},u=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.external_booklist,L=S.archive_pagenumber,w=S.num_pages,A=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpagemax")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{bold:!0,content:L,onClick:function(){function x(){return(0,m.modalOpen)(f,"setpagenumber")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",disabled:L===w,onClick:function(){function x(){return V("incrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",disabled:L===w,onClick:function(){function x(){return V("incrementpagemax")}return x}()})],4),children:[(0,e.createComponentVNode)(2,p),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ratings"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Category"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(x){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:.5}),x.title.length>45?x.title.substr(0,45)+"...":x.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:x.author.length>30?x.author.substr(0,30)+"...":x.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[x.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.categories.join(", ").substr(0,45)}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[A===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function E(){return V("order_external_book",{bookid:x.id})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function E(){return(0,m.modalOpen)(f,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},d=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.programmatic_booklist,L=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(w,A){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:2}),w.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[L===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function x(){return V("order_programmatic_book",{bookid:w.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function x(){return(0,m.modalOpen)(f,"expand_info",{bookid:w.id})}return x}()})]})]},A)})]})})},s=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.selectedbook,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:I.copyright,content:"Upload Book",onClick:function(){function x(){return V("uploadbook",{user_ckey:w})}return x}()}),children:[I.copyright?(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.title,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_selected_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.author,onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_selected_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"240px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_upload_category",{category_id:A[E]})}return x}()})})})]}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,disabled:I.copyright,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_upload_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:75,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",disabled:I.copyright,content:"Edit Summary",onClick:function(){function x(){return(0,m.modalOpen)(f,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:I.summary})]})})]})]})},l=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.checkout_data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Patron"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-tag"}),L.patron_name]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.timeleft>=0?L.timeleft:"LATE"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:(0,e.createComponentVNode)(2,t.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:L.timeleft>=0,onClick:function(){function A(){return V("reportlost",{libraryid:L.libraryid})}return A}()})})]},w)})]})})},h=function(v,f){var g=(0,a.useBackend)(f),V=g.act,S=g.data,I=S.inventory_list;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"LIB ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.libraryid}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"})," ",L.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.checked_out?"Checked Out":"Available"})]},w)})]})})};(0,m.modalRegisterBodyOverride)("expand_info",y),(0,m.modalRegisterBodyOverride)("report_book",B),(0,m.modalRegisterBodyOverride)("rate_info",C)},9516:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=r.LibraryManager=function(){function i(c,p){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return i}(),y=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.pagestate;switch(l){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,C);case 3:return(0,e.createComponentVNode)(2,k);default:return"WE SHOULDN'T BE HERE!"}},B=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){function l(){return(0,m.modalOpen)(p,"specify_ssid_delete")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function l(){return(0,m.modalOpen)(p,"specify_ckey_delete")}return l}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function l(){return(0,m.modalOpen)(p,"specify_ckey_search")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function l(){return d("view_reported_books")}return l}()})]})},k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.reports;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"All Reported Books",(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function h(){return d("return")}return h}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Uploader CKEY"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Report Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reporter Ckey"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),l.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:h.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),h.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:h.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:h.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:h.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function N(){return d("delete_book",{bookid:h.id})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function N(){return d("unflag_book",{bookid:h.id})}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function N(){return d("view_book",{bookid:h.id})}return N}()})]})]},h.id)})]})})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.ckey,h=s.booklist;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"Books uploaded by ",l,(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function N(){return d("return")}return N}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),N.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:N.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function v(){return d("delete_book",{bookid:N.id})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function v(){return d("view_book",{bookid:N.id})}return v}()})]})]},N.id)})]})})}},90447:function(T,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),m=n(72253),b=n(92986),y=n(98595),B=r.ListInputModal=function(){function i(c,p){var u=(0,m.useBackend)(p),d=u.act,s=u.data,l=s.items,h=l===void 0?[]:l,N=s.message,v=N===void 0?"":N,f=s.init_value,g=s.timeout,V=s.title,S=(0,m.useLocalState)(p,"selected",h.indexOf(f)),I=S[0],L=S[1],w=(0,m.useLocalState)(p,"searchBarVisible",h.length>10),A=w[0],x=w[1],E=(0,m.useLocalState)(p,"searchQuery",""),P=E[0],j=E[1],M=function(){function $(Q){var Z=K.length-1;if(Q===b.KEY_DOWN)if(I===null||I===Z){var ie;L(0),(ie=document.getElementById("0"))==null||ie.scrollIntoView()}else{var ne;L(I+1),(ne=document.getElementById((I+1).toString()))==null||ne.scrollIntoView()}else if(Q===b.KEY_UP)if(I===null||I===0){var se;L(Z),(se=document.getElementById(Z.toString()))==null||se.scrollIntoView()}else{var ve;L(I-1),(ve=document.getElementById((I-1).toString()))==null||ve.scrollIntoView()}}return $}(),O=function(){function $(Q){Q!==I&&L(Q)}return $}(),D=function(){function $(){x(!1),x(!0)}return $}(),F=function(){function $(Q){var Z=String.fromCharCode(Q),ie=h.find(function(ve){return ve==null?void 0:ve.toLowerCase().startsWith(Z==null?void 0:Z.toLowerCase())});if(ie){var ne,se=h.indexOf(ie);L(se),(ne=document.getElementById(se.toString()))==null||ne.scrollIntoView()}}return $}(),W=function(){function $(Q){var Z;Q!==P&&(j(Q),L(0),(Z=document.getElementById("0"))==null||Z.scrollIntoView())}return $}(),U=function(){function $(){x(!A),j("")}return $}(),K=h.filter(function($){return $==null?void 0:$.toLowerCase().includes(P.toLowerCase())}),G=330+Math.ceil(v.length/3);return A||setTimeout(function(){var $;return($=document.getElementById(I.toString()))==null?void 0:$.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:V,width:325,height:G,children:[g&&(0,e.createComponentVNode)(2,a.Loader,{value:g}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function $(Q){var Z=window.event?Q.which:Q.keyCode;(Z===b.KEY_DOWN||Z===b.KEY_UP)&&(Q.preventDefault(),M(Z)),Z===b.KEY_ENTER&&(Q.preventDefault(),d("submit",{entry:K[I]})),!A&&Z>=b.KEY_A&&Z<=b.KEY_Z&&(Q.preventDefault(),F(Z)),Z===b.KEY_ESCAPE&&(Q.preventDefault(),d("cancel"))}return $}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function $(){return U()}return $}()}),className:"ListInput__Section",fill:!0,title:v,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k,{filteredItems:K,onClick:O,onFocusSearch:D,searchBarVisible:A,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,C,{filteredItems:K,onSearch:W,searchQuery:P,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:K[I]})})]})})})]})}return i}(),k=function(c,p){var u=(0,m.useBackend)(p),d=u.act,s=c.filteredItems,l=c.onClick,h=c.onFocusSearch,N=c.searchBarVisible,v=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:s.map(function(f,g){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:g,onClick:function(){function V(){return l(g)}return V}(),onDblClick:function(){function V(S){S.preventDefault(),d("submit",{entry:s[v]})}return V}(),onKeyDown:function(){function V(S){var I=window.event?S.which:S.keyCode;N&&I>=b.KEY_A&&I<=b.KEY_Z&&(S.preventDefault(),h())}return V}(),selected:g===v,style:{animation:"none",transition:"none"},children:f.replace(/^\w/,function(V){return V.toUpperCase()})},g)})})},C=function(c,p){var u=(0,m.useBackend)(p),d=u.act,s=c.filteredItems,l=c.onSearch,h=c.searchQuery,N=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function v(f){f.preventDefault(),d("submit",{entry:s[N]})}return v}(),onInput:function(){function v(f,g){return l(g)}return v}(),placeholder:"Search...",value:h})}},77613:function(T,r,n){"use strict";r.__esModule=!0,r.MODsuitContent=r.MODsuit=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:A,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(){function j(M,O){return P("configure",{key:w,value:O,ref:x})}return j}()})},b=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:A,onClick:function(){function j(){return P("configure",{key:w,value:!A,ref:x})}return j}()})},y=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"paint-brush",onClick:function(){function j(){return P("configure",{key:w,ref:x})}return j}()}),(0,e.createComponentVNode)(2,t.ColorBox,{color:A,mr:.5})],4)},B=function(I,L){var w=I.name,A=I.value,x=I.values,E=I.module_ref,P=(0,a.useBackend)(L),j=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(O){return j("configure",{key:w,value:O,ref:E})}return M}()})},k=function(I,L){var w=I.name,A=I.display_name,x=I.type,E=I.value,P=I.values,j=I.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,m,Object.assign({},I))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,b,Object.assign({},I))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,y,Object.assign({},I))),list:(0,e.normalizeProps)((0,e.createComponentVNode)(2,B,Object.assign({},I)))};return(0,e.createComponentVNode)(2,t.Box,{children:[A,": ",M[x]]})},C=function(I,L){var w=I.active,A=I.userradiated,x=I.usertoxins,E=I.usermaxtoxins,P=I.threatlevel;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Level",color:w&&A?"bad":"good",children:w&&A?"IRRADIATED!":"RADIATION-FREE"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxins Level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?x/E:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:x})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Hazard Level",color:w&&P?"bad":"good",bold:!0,children:w&&P?P:0})})]})},i=function(I,L){var w=I.active,A=I.userhealth,x=I.usermaxhealth,E=I.userbrute,P=I.userburn,j=I.usertoxin,M=I.useroxy;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?A/x:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?A:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?P/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?P:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?j/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?j:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})})]})],4)},c=function(I,L){var w=I.active,A=I.statustime,x=I.statusid,E=I.statushealth,P=I.statusmaxhealth,j=I.statusbrute,M=I.statusburn,O=I.statustoxin,D=I.statusoxy,F=I.statustemp,W=I.statusnutrition,U=I.statusfingerprints,K=I.statusdna,G=I.statusviruses;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Time",children:w?A:"00:00:00"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Number",children:w?x||"0":"???"})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/P:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?j/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?j:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?O/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:O})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:D})})})})]}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Body Temperature",children:w?F:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Nutrition Status",children:w?W:0})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"DNA",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:w?U:"???"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:w?K:"???"})]})}),!!w&&!!G&&(0,e.createComponentVNode)(2,t.Section,{title:"Diseases",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),G.map(function($){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:$.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:$.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[$.stage,"/",$.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:$.cure})]},$.name)})]})})],0)},p={rad_counter:C,health_analyzer:i,status_readout:c},u=function(){return(0,e.createComponentVNode)(2,t.Section,{align:"center",fill:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,e.createComponentVNode)(2,t.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},d=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data;return(0,e.createComponentVNode)(2,t.Dimmer,{children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},s=function(I,L){var w=I.configuration_data,A=I.module_ref,x=Object.keys(w);return(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[x.map(function(E){var P=w[E];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{name:E,display_name:P.display_name,type:P.type,value:P.value,values:P.values,module_ref:A})},P.key)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:I.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},l=function(I){switch(I){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},h=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.malfunctioning,j=x.locked,M=x.open,O=x.selected_module,D=x.complexity,F=x.complexity_max,W=x.wearer_name,U=x.wearer_job,K=P?"Malfunctioning":E?"Active":"Inactive";return(0,e.createComponentVNode)(2,t.Section,{title:"Parameters",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:E?"Deactivate":"Activate",onClick:function(){function G(){return A("activate")}return G}()}),children:K}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:j?"lock-open":"lock",content:j?"Unlock":"Lock",onClick:function(){function G(){return A("lock")}return G}()}),children:j?"Locked":"Unlocked"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover",children:M?"Open":"Closed"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Selected Module",children:O||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[D," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[W,", ",U]})]})})},N=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.control,j=x.helmet,M=x.chestplate,O=x.gauntlets,D=x.boots,F=x.core,W=x.charge;return(0,e.createComponentVNode)(2,t.Section,{title:"Hardware",children:[(0,e.createComponentVNode)(2,t.Collapsible,{title:"Parts",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Control Unit",children:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Helmet",children:j||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:O||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:D||"None"})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core",children:F&&(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Type",children:F}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:W/100,content:W+"%",ranges:{good:[.6,1/0],average:[.3,.6],bad:[-1/0,.3]}})})]})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},v=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.modules,j=P.filter(function(M){return!!M.id});return(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:j.length!==0&&j.map(function(M){var O=p[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,d),(0,e.normalizeProps)((0,e.createComponentVNode)(2,O,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},f=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.complexity_max,P=x.modules,j=(0,a.useLocalState)(L,"module_configuration",null),M=j[0],O=j[1];return(0,e.createComponentVNode)(2,t.Section,{title:"Modules",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:P.length!==0&&P.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:D.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===D.ref&&(0,e.createComponentVNode)(2,s,{configuration_data:D.configuration_data,module_ref:D.ref,onExit:function(){function F(){return O(null)}return F}()}),(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[D.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:D.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:D.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:D.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[D.cooldown>0&&D.cooldown/10||"0","/",D.cooldown_time/10,"s"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("select",{ref:D.ref})}return F}(),icon:"bullseye",selected:D.module_active,tooltip:l(D.module_type),tooltipPosition:"left",disabled:!D.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return O(D.ref)}return F}(),icon:"cog",selected:M===D.ref,tooltip:"Configure",tooltipPosition:"left",disabled:D.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:D.ref})}return F}(),icon:"thumbtack",selected:D.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!D.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:D.description})]})})},D.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},g=r.MODsuitContent=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!P,children:!!P&&(0,e.createComponentVNode)(2,u)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,h)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,N)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f)})]})})}return S}(),V=r.MODsuit=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,o.Window,{theme:E,width:400,height:620,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,g)})})})}return S}()},78624:function(T,r,n){"use strict";r.__esModule=!0,r.MagnetController=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=n(3939),y=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]),B=r.MagnetController=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.autolink,s=u.code,l=u.frequency,h=u.linkedMagnets,N=u.magnetConfiguration,v=u.path,f=u.pathPosition,g=u.probing,V=u.powerState,S=u.speed;return(0,e.createComponentVNode)(2,m.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:[!d&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:g?"spinner":"sync",iconSpin:!!g,disabled:g,onClick:function(){function I(){return p("probe_magnets")}return I}()}),title:"Magnet Linking",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,a.toFixed)(l/10,1)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:s})]})}),(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{icon:V?"power-off":"times",content:V?"On":"Off",selected:V,onClick:function(){function I(){return p("toggle_power")}return I}()}),title:"Controller Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:S.value,minValue:S.min,maxValue:S.max,onChange:function(){function I(L,w){return p("set_speed",{speed:w})}return I}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(y.entries()).map(function(I){var L=I[0],w=I[1],A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button,{icon:A,tooltip:x,onClick:function(){function E(){return p("path_add",{code:L})}return E}()},L)}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){function I(){return p("path_clear")}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){function I(){return(0,b.modalOpen)(i,"path_custom_input")}return I}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:v.map(function(I,L){var w=y.get(I)||{icon:"question"},A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:L+2===f,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return p("path_remove",{index:L+1,code:I})}return E}()},L)})})]})]})}),h.map(function(I,L){var w=I.uid,A=I.powerState,x=I.electricityLevel,E=I.magneticField;return(0,e.createComponentVNode)(2,o.Section,{title:"Magnet #"+(L+1)+" Configuration",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:A?"power-off":"times",content:A?"On":"Off",selected:A,onClick:function(){function P(){return p("toggle_magnet_power",{id:w})}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Move Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:x,minValue:N.electricityLevel.min,maxValue:N.electricityLevel.max,onChange:function(){function P(j,M){return p("set_electricity_level",{id:w,electricityLevel:M})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Field Size",children:(0,e.createComponentVNode)(2,o.Slider,{value:E,minValue:N.magneticField.min,maxValue:N.magneticField.max,onChange:function(){function P(j,M){return p("set_magnetic_field",{id:w,magneticField:M})}return P}()})})]})},w)})]})]})}return k}()},72106:function(T,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.MechBayConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.recharge_port,p=c&&c.mech,u=p&&p.cell,d=p&&p.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:155,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d?"Mech status: "+d:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function s(){return C("reconnect")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!p&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.health/p.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!p&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!u&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}return b}()},7466:function(T,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=n(25328),y=r.MechaControlConsole=function(){function B(k,C){var i=(0,t.useBackend)(C),c=i.act,p=i.data,u=p.beacons,d=p.stored_data;return d.length?(0,e.createComponentVNode)(2,m.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function s(){return c("clear_log")}return s}()}),children:d.map(function(s){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",s.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,b.decodeHtmlEntities)(s.message)})]},s.time)})})})}):(0,e.createComponentVNode)(2,m.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:u.length&&u.map(function(s){return(0,e.createComponentVNode)(2,o.Section,{title:s.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function l(){return c("send_message",{mt:s.uid})}return l}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function l(){return c("get_log",{mt:s.uid})}return l}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function l(){return c("shock",{mt:s.uid})}return l}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.maxHealth*.75,1/0],average:[s.maxHealth*.5,s.maxHealth*.75],bad:[-1/0,s.maxHealth*.5]},value:s.health,maxValue:s.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:s.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.cellMaxCharge*.75,1/0],average:[s.cellMaxCharge*.5,s.cellMaxCharge*.75],bad:[-1/0,s.cellMaxCharge*.5]},value:s.cellCharge,maxValue:s.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[s.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:s.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,b.toTitleCase)(s.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:s.active||"None"}),s.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[s.cargoMax*.75,1/0],average:[s.cargoMax*.5,s.cargoMax*.75],good:[-1/0,s.cargoMax*.5]},value:s.cargoUsed,maxValue:s.cargoMax})})||null]})},s.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return B}()},79625:function(T,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(3939),b=n(98595),y=n(321),B=n(5485),k=n(22091),C={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},i={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(A,x){(0,m.modalOpen)(A,"edit",{field:x.edit,value:x.value})},p=function(A,x){var E=A.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:E.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:E.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[E.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:E.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:E.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:C[E.severity],children:E.severity})]})})})},u=r.MedicalRecords=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,j=P.loginState,M=P.screen;if(!j.logged_in)return(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});var O;return M===2?O=(0,e.createComponentVNode)(2,d):M===3?O=(0,e.createComponentVNode)(2,s):M===4?O=(0,e.createComponentVNode)(2,l):M===5?O=(0,e.createComponentVNode)(2,f):M===6?O=(0,e.createComponentVNode)(2,g):M===7&&(O=(0,e.createComponentVNode)(2,V)),(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,L),O]})})]})}return w}(),d=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.records,O=(0,t.useLocalState)(x,"searchText",""),D=O[0],F=O[1],W=(0,t.useLocalState)(x,"sortId","name"),U=W[0],K=W[1],G=(0,t.useLocalState)(x,"sortOrder",!0),$=G[0],Q=G[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function Z(){return P("screen",{screen:3})}return Z}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function Z(ie,ne){return F(ne)}return Z}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,S,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,S,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,S,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,S,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,S,{id:"m_stat",children:"Mental Status"})]}),M.filter((0,a.createSearch)(D,function(Z){return Z.name+"|"+Z.id+"|"+Z.rank+"|"+Z.p_stat+"|"+Z.m_stat})).sort(function(Z,ie){var ne=$?1:-1;return Z[U].localeCompare(ie[U])*ne}).map(function(Z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+i[Z.p_stat],onClick:function(){function ie(){return P("view_record",{view_record:Z.ref})}return ie}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",Z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.m_stat})]},Z.id)})]})})})],4)},s=function(A,x){var E=(0,t.useBackend)(x),P=E.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,translucent:!0,lineHeight:3,icon:"trash",content:"Delete All Medical Records",onClick:function(){function j(){return P("del_all_med_records")}return j}()})})]})})},l=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medical,O=j.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:O?"spinner":"print",disabled:O,iconSpin:!!O,content:"Print Record",ml:"0.5rem",onClick:function(){function D(){return P("print_record")}return D}()}),children:(0,e.createComponentVNode)(2,h)})}),!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function D(){return P("new_med_record")}return D}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!M.empty,content:"Delete Medical Record",onClick:function(){function D(){return P("del_med_record")}return D}()}),children:(0,e.createComponentVNode)(2,N)})}),(0,e.createComponentVNode)(2,v)],4)],0)},h=function(A,x){var E=(0,t.useBackend)(x),P=E.data,j=P.general;return!j||!j.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:j.fields.map(function(M,O){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:M.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:M.value}),!!M.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function D(){return c(x,M)}return D}()})]},O)})})}),!!j.has_photos&&j.photos.map(function(M,O){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:M,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",O+1]},O)})]})},N=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medical;return!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"Medical records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:M.fields.map(function(O,D){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:O.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(O.value),!!O.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:O.line_break?"1rem":"initial",onClick:function(){function F(){return c(x,O)}return F}()})]},D)})})})})},v=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function O(){return(0,m.modalOpen)(x,"add_comment")}return O}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):M.comments.map(function(O,D){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:O.header}),(0,e.createVNode)(1,"br"),O.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function F(){return P("del_comment",{del_comment:D+1})}return F}()})]},D)})})})},f=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.virus,O=(0,t.useLocalState)(x,"searchText",""),D=O[0],F=O[1],W=(0,t.useLocalState)(x,"sortId2","name"),U=W[0],K=W[1],G=(0,t.useLocalState)(x,"sortOrder2",!0),$=G[0],Q=G[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function Z(ie,ne){return F(ne)}return Z}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,I,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,I,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,I,{id:"severity",children:"Severity"})]}),M.filter((0,a.createSearch)(D,function(Z){return Z.name+"|"+Z.max_stages+"|"+Z.severity})).sort(function(Z,ie){var ne=$?1:-1;return Z[U].localeCompare(ie[U])*ne}).map(function(Z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+Z.severity,onClick:function(){function ie(){return P("vir",{vir:Z.D})}return ie}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",Z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:Z.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:C[Z.severity],children:Z.severity})]},Z.id)})]})})})})],4)},g=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.goals;return(0,e.createComponentVNode)(2,o.Section,{title:"Virology Goals",fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:M.length!==0&&M.map(function(O){return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:O.name,children:[(0,e.createComponentVNode)(2,o.Table,{children:(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:O.delivered,minValue:0,maxValue:O.deliverygoal,ranges:{good:[O.deliverygoal*.5,1/0],average:[O.deliverygoal*.25,O.deliverygoal*.5],bad:[-1/0,O.deliverygoal*.25]},children:[O.delivered," / ",O.deliverygoal," Units"]})})})}),(0,e.createComponentVNode)(2,o.Box,{children:O.report})]})},O.id)})||(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:"No Goals Detected"})})})})},V=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.medbots;return M.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),M.map(function(O){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+O.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",O.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[O.area||"Unknown"," (",O.x,", ",O.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:O.use_beaker?"Reservoir: "+O.total_volume+"/"+O.maximum_volume:"Using internal synthesizer"})]},O.id)})]})})})},S=function(A,x){var E=(0,t.useLocalState)(x,"sortId","name"),P=E[0],j=E[1],M=(0,t.useLocalState)(x,"sortOrder",!0),O=M[0],D=M[1],F=A.id,W=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?D(!O):(j(F),D(!0))}return U}(),children:[W,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:O?"sort-up":"sort-down",ml:"0.25rem;"})]})})},I=function(A,x){var E=(0,t.useLocalState)(x,"sortId2","name"),P=E[0],j=E[1],M=(0,t.useLocalState)(x,"sortOrder2",!0),O=M[0],D=M[1],F=A.id,W=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?D(!O):(j(F),D(!0))}return U}(),children:[W,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:O?"sort-up":"sort-down",ml:"0.25rem;"})]})})},L=function(A,x){var E=(0,t.useBackend)(x),P=E.act,j=E.data,M=j.screen,O=j.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:M===2,onClick:function(){function D(){P("screen",{screen:2})}return D}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function D(){P("screen",{screen:5})}return D}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"vial",selected:M===6,onClick:function(){function D(){P("screen",{screen:6})}return D}(),children:"Virology Goals"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===7,onClick:function(){function D(){return P("screen",{screen:7})}return D}(),children:"Medibot Tracking"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"Record Maintenance"}),M===4&&O&&!O.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["Record: ",O.fields[0].value]})]})})};(0,m.modalRegisterBodyOverride)("virus",p)},54989:function(T,r,n){"use strict";r.__esModule=!0,r.MerchVendor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=C.product,s=C.productImage,l=C.productCategory,h=u.user_money;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:d.price>h,icon:"shopping-cart",content:d.price,textAlign:"left",onClick:function(){function N(){return p("purchase",{name:d.name,category:l})}return N}()})})]})},b=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=(0,a.useLocalState)(i,"tabIndex",1),d=u[0],s=p.products,l=p.imagelist,h=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:s[h[d]].map(function(N){return(0,e.createComponentVNode)(2,m,{product:N,productImage:l[N.path],productCategory:h[d]},N.name)})})},y=r.MerchVendor=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.user_cash,s=u.inserted_cash;return(0,e.createComponentVNode)(2,o.Window,{title:"Merch Computer",width:450,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,e.createVNode)(1,"b",null,s,0)," credits inserted."]}),(0,e.createComponentVNode)(2,t.Button,{disabled:!s,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){function l(){return p("change")}return l}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{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.",d!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[d||0,(0,e.createTextVNode)(" credits")],0),"."]})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,b)]})})]})})})}return k}(),B=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=(0,a.useLocalState)(i,"tabIndex",1),d=u[0],s=u[1],l=p.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:d===1,onClick:function(){function h(){return s(1)}return h}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:d===2,onClick:function(){function h(){return s(2)}return h}(),children:"Decorations"})]})}},87684:function(T,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=["title","items"];function y(u,d){if(u==null)return{};var s={};for(var l in u)if({}.hasOwnProperty.call(u,l)){if(d.includes(l))continue;s[l]=u[l]}return s}var B={Alphabetical:function(){function u(d,s){return d-s}return u}(),Availability:function(){function u(d,s){return-(d.affordable-s.affordable)}return u}(),Price:function(){function u(d,s){return d.price-s.price}return u}()},k=r.MiningVendor=function(){function u(d,s){return(0,e.createComponentVNode)(2,m.Window,{width:400,height:455,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)]})})})}return u}(),C=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.has_id,f=N.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:v,children:v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",f.name,".",(0,e.createVNode)(1,"br"),"You have ",f.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function g(){return h("logoff")}return g}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},i=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.has_id,f=N.id,g=N.items,V=(0,t.useLocalState)(s,"search",""),S=V[0],I=V[1],L=(0,t.useLocalState)(s,"sort","Alphabetical"),w=L[0],A=L[1],x=(0,t.useLocalState)(s,"descending",!1),E=x[0],P=x[1],j=(0,a.createSearch)(S,function(D){return D[0]}),M=!1,O=Object.entries(g).map(function(D,F){var W=Object.entries(D[1]).filter(j).map(function(U){return U[1].affordable=v&&f.points>=U[1].price,U[1]}).sort(B[w]);if(W.length!==0)return E&&(W=W.reverse()),M=!0,(0,e.createComponentVNode)(2,p,{title:D[0],items:W},D[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:M?O:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(d,s){var l=(0,t.useLocalState)(s,"search",""),h=l[0],N=l[1],v=(0,t.useLocalState)(s,"sort",""),f=v[0],g=v[1],V=(0,t.useLocalState)(s,"descending",!1),S=V[0],I=V[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{mt:.2,placeholder:"Search by item name..",width:"100%",onInput:function(){function L(w,A){return N(A)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(B),width:"100%",onSelected:function(){function L(w){return g(w)}return L}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:S?"arrow-down":"arrow-up",height:"21px",tooltip:S?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function L(){return I(!S)}return L}()})})]})})},p=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=d.title,f=d.items,g=y(d,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:v},g,{children:f.map(function(V){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:V.name}),(0,e.createComponentVNode)(2,o.Button,{disabled:!N.has_id||N.id.points0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+d+'"':"\u0412\u0441\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 - "+p.length,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:p.filter(function(h){return h.name&&(d.length>0?h.name.toLowerCase().includes(d.toLowerCase())||h.desc.toLowerCase().includes(d.toLowerCase())||h.author.toLowerCase().includes(d.toLowerCase()):!0)}).map(function(h){return(0,e.createComponentVNode)(2,o.Collapsible,{title:h.name,children:[(0,e.createComponentVNode)(2,o.Section,{title:"\u0410\u0432\u0442\u043E\u0440\u044B",children:h.author}),(0,e.createComponentVNode)(2,o.Section,{title:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",children:h.desc})]},h.name)})})})})})],4)}return y}()},59783:function(T,r,n){"use strict";r.__esModule=!0,r.NTRecruiter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.NTRecruiter=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.gamestatus,p=i.cand_name,u=i.cand_birth,d=i.cand_age,s=i.cand_species,l=i.cand_planet,h=i.cand_job,N=i.cand_records,v=i.cand_curriculum,f=i.total_curriculums,g=i.reason;if(c===0)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){function V(){return C("start_game")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){function V(){return C("instructions")}return V}()})]})]})})});if(c===1)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,color:"grey",title:"Guide",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){function V(){return C("back_to_menu")}return V}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss ",(0,e.createVNode)(1,"b",null,f,0)," candidates, one wrongly made choice leads to a game over."]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"3#",color:"silver",children:[(0,e.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{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,e.createComponentVNode)(2,t.LabeledList.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,e.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{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,e.createComponentVNode)(2,t.LabeledList.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,e.createVNode)(1,"b",null,"typos",16)," and ",(0,e.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for"," ",(0,e.createVNode)(1,"b",null,"jobs",16)," that they ",(0,e.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,e.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10#",color:"silver",children:["For some unknown reason ",(0,e.createVNode)(1,"b",null,"clowns",16)," are never denied by the company, no matter what."]})]})})})})});if(c===2)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",v]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",color:"silver",children:(0,e.createVNode)(1,"b",null,p,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",color:"silver",children:(0,e.createVNode)(1,"b",null,s,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",color:"silver",children:(0,e.createVNode)(1,"b",null,d,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Date of Birth",color:"silver",children:(0,e.createVNode)(1,"b",null,u,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Planet of Origin",color:"silver",children:(0,e.createVNode)(1,"b",null,l,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requested Job",color:"silver",children:(0,e.createVNode)(1,"b",null,h,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Employment Records",color:"silver",children:(0,e.createVNode)(1,"b",null,N,0)})]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){function V(){return C("dismiss")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){function V(){return C("hire")}return V}()})})]})})})]})})});if(c===3)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{pt:"40%",fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"15px",color:"label",textAlign:"center",children:g}),(0,e.createComponentVNode)(2,t.Stack.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",v-1,"/",f]})]})}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){function V(){return C("back_to_menu")}return V}()})})]})})})}return b}()},64713:function(T,r,n){"use strict";r.__esModule=!0,r.Newscaster=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(76910),b=n(98595),y=n(3939),B=n(22091),k=["icon","iconSpin","selected","security","onClick","title","children"],C=["name"];function i(I,L){if(I==null)return{};var w={};for(var A in I)if({}.hasOwnProperty.call(I,A)){if(L.includes(A))continue;w[A]=I[A]}return w}var c=128,p=["security","engineering","medical","science","service","supply"],u={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"}},d=r.Newscaster=function(){function I(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.is_security,j=E.is_admin,M=E.is_silent,O=E.is_printing,D=E.screen,F=E.channels,W=E.channel_idx,U=W===void 0?-1:W,K=(0,t.useLocalState)(w,"menuOpen",!1),G=K[0],$=K[1],Q=(0,t.useLocalState)(w,"viewingPhoto",""),Z=Q[0],ie=Q[1],ne=(0,t.useLocalState)(w,"censorMode",!1),se=ne[0],ve=ne[1],Ve;D===0||D===2?Ve=(0,e.createComponentVNode)(2,l):D===1&&(Ve=(0,e.createComponentVNode)(2,h));var ge=F.reduce(function(Ce,oe){return Ce+oe.unread},0);return(0,e.createComponentVNode)(2,b.Window,{theme:P&&"security",width:800,height:600,children:[Z?(0,e.createComponentVNode)(2,f):(0,e.createComponentVNode)(2,y.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Section,{fill:!0,className:(0,a.classes)(["Newscaster__menu",G&&"Newscaster__menu--open"]),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,s,{icon:"bars",title:"Toggle Menu",onClick:function(){function Ce(){return $(!G)}return Ce}()}),(0,e.createComponentVNode)(2,s,{icon:"newspaper",title:"Headlines",selected:D===0,onClick:function(){function Ce(){return x("headlines")}return Ce}(),children:ge>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:ge>=10?"9+":ge})}),(0,e.createComponentVNode)(2,s,{icon:"briefcase",title:"Job Openings",selected:D===1,onClick:function(){function Ce(){return x("jobs")}return Ce}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(Ce){return(0,e.createComponentVNode)(2,s,{icon:Ce.icon,title:Ce.name,selected:D===2&&F[U-1]===Ce,onClick:function(){function oe(){return x("channel",{uid:Ce.uid})}return oe}(),children:Ce.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:Ce.unread>=10?"9+":Ce.unread})},Ce)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!j)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function Ce(){return(0,y.modalOpen)(w,"wanted_notice")}return Ce}()}),(0,e.createComponentVNode)(2,s,{security:!0,icon:se?"minus-square":"minus-square-o",title:"Censor Mode: "+(se?"On":"Off"),mb:"0.5rem",onClick:function(){function Ce(){return ve(!se)}return Ce}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,s,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function Ce(){return(0,y.modalOpen)(w,"create_story")}return Ce}()}),(0,e.createComponentVNode)(2,s,{icon:"plus-circle",title:"New Channel",onClick:function(){function Ce(){return(0,y.modalOpen)(w,"create_channel")}return Ce}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,s,{icon:O?"spinner":"print",iconSpin:O,title:O?"Printing...":"Print Newspaper",onClick:function(){function Ce(){return x("print_newspaper")}return Ce}()}),(0,e.createComponentVNode)(2,s,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function Ce(){return x("toggle_mute")}return Ce}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,B.TemporaryNotice),Ve]})]})})]})}return I}(),s=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=L.icon,P=E===void 0?"":E,j=L.iconSpin,M=L.selected,O=M===void 0?!1:M,D=L.security,F=D===void 0?!1:D,W=L.onClick,U=L.title,K=L.children,G=i(L,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",O&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:W},G,{children:[O&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:j,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:U}),K]})))},l=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.screen,j=E.is_admin,M=E.channel_idx,O=E.channel_can_manage,D=E.channels,F=E.stories,W=E.wanted,U=(0,t.useLocalState)(w,"fullStories",[]),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"censorMode",!1),Q=$[0],Z=$[1],ie=P===2&&M>-1?D[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!W&&(0,e.createComponentVNode)(2,N,{story:W,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:ie?ie.icon:"newspaper",mr:"0.5rem"}),ie?ie.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ne){return!K.includes(ne.uid)&&ne.body.length+3>c?Object.assign({},ne,{body_short:ne.body.substr(0,c-4)+"..."}):ne}).map(function(ne,se){return(0,e.createComponentVNode)(2,N,{story:ne},se)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!ie&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([Q&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!ie.admin&&!j,selected:ie.censored,icon:ie.censored?"comment-slash":"comment",content:ie.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ne(){return x("censor_channel",{uid:ie.uid})}return ne}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!O,icon:"cog",content:"Manage",onClick:function(){function ne(){return(0,y.modalOpen)(w,"manage_channel",{uid:ie.uid})}return ne}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:ie.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:ie.author||"N/A"}),!!j&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:ie.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:ie.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),F.reduce(function(ne,se){return ne+se.view_count},0).toLocaleString()]})]})})]})},h=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.jobs,j=E.wanted,M=Object.entries(P).reduce(function(O,D){var F=D[0],W=D[1];return O+W.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!j&&(0,e.createComponentVNode)(2,N,{story:j,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:M>0?p.map(function(O){return Object.assign({},u[O],{id:O,jobs:P[O]})}).filter(function(O){return!!O&&O.jobs.length>0}).map(function(O){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+O.id]),title:O.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:O.fluff_text}),children:O.jobs.map(function(D){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!D.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",D.title]},D.title)})},O.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.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."})]})]})},N=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=L.story,j=L.wanted,M=j===void 0?!1:j,O=E.is_admin,D=(0,t.useLocalState)(w,"fullStories",[]),F=D[0],W=D[1],U=(0,t.useLocalState)(w,"censorMode",!1),K=U[0],G=U[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",M&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([M&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),P.censor_flags&2&&"[REDACTED]"||P.title||"News from "+P.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!M&&K&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:P.censor_flags&2,icon:P.censor_flags&2?"comment-slash":"comment",content:P.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function $(){return x("censor_story",{uid:P.uid})}return $}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!O&&(0,e.createFragment)([(0,e.createTextVNode)("ckey: "),P.author_ckey,(0,e.createTextVNode)(" |\xA0")],0),!M&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),P.view_count.toLocaleString(),(0,e.createTextVNode)(" |\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,m.timeAgo)(P.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:P.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!P.has_photo&&(0,e.createComponentVNode)(2,v,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function($,Q){return(0,e.createComponentVNode)(2,o.Box,{children:$||(0,e.createVNode)(1,"br")},Q)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function $(){return W([].concat(F,[P.uid]))}return $}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},v=function(L,w){var A=L.name,x=i(L,C),E=(0,t.useLocalState)(w,"viewingPhoto",""),P=E[0],j=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function M(){return j(A)}return M}()},x)))},f=function(L,w){var A=(0,t.useLocalState)(w,"viewingPhoto",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:x}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function P(){return E("")}return P}()})]})},g=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=!!L.args.uid&&E.channels.filter(function(te){return te.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!P){(0,y.modalClose)(w);return}var j=L.id==="manage_channel",M=!!L.args.is_admin,O=L.args.scanned_user,D=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||O||"Unknown"),F=D[0],W=D[1],U=(0,t.useLocalState)(w,"name",(P==null?void 0:P.name)||""),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"description",(P==null?void 0:P.description)||""),Q=$[0],Z=$[1],ie=(0,t.useLocalState)(w,"icon",(P==null?void 0:P.icon)||"newspaper"),ne=ie[0],se=ie[1],ve=(0,t.useLocalState)(w,"isPublic",j?!!(P!=null&&P.public):!1),Ve=ve[0],ge=ve[1],Ce=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin)===1||!1),oe=Ce[0],ce=Ce[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:j?"Manage "+P.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function te(fe,ue){return W(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:K,onInput:function(){function te(fe,ue){return G(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Q,onInput:function(){function te(fe,ue){return Z(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ne,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,ue){return se(ue)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ne,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:Ve,icon:Ve?"toggle-on":"toggle-off",content:Ve?"Yes":"No",onClick:function(){function te(){return ge(!Ve)}return te}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ce(!oe)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||K.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:K.substr(0,49),description:Q.substr(0,128),icon:ne,public:Ve?1:0,admin_locked:oe?1:0})}return te}()})]})},V=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,j=E.channels,M=E.channel_idx,O=M===void 0?-1:M,D=!!L.args.is_admin,F=L.args.scanned_user,W=j.slice().sort(function(te,fe){if(O<0)return 0;var ue=j[O-1];if(ue.uid===te.uid)return-1;if(ue.uid===fe.uid)return 1}).filter(function(te){return D||!te.frozen&&(te.author===F||!!te.public)}),U=(0,t.useLocalState)(w,"author",F||"Unknown"),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"channel",W.length>0?W[0].name:""),Q=$[0],Z=$[1],ie=(0,t.useLocalState)(w,"title",""),ne=ie[0],se=ie[1],ve=(0,t.useLocalState)(w,"body",""),Ve=ve[0],ge=ve[1],Ce=(0,t.useLocalState)(w,"adminLocked",!1),oe=Ce[0],ce=Ce[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!D,width:"100%",value:K,onInput:function(){function te(fe,ue){return G(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Q,options:W.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return Z(fe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:ne,onInput:function(){function te(fe,ue){return se(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:Ve,onInput:function(){function te(fe,ue){return ge(ue)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function te(){return x(P?"eject_photo":"attach_photo")}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:ne,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"}),Ve.split("\n").map(function(te,fe){return(0,e.createComponentVNode)(2,o.Box,{children:te||(0,e.createVNode)(1,"br")},fe)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),D&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ce(!oe)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:K.trim().length===0||Q.trim().length===0||ne.trim().length===0||Ve.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,"create_story","",{author:K,channel:Q,title:ne.substr(0,127),body:Ve.substr(0,1023),admin_locked:oe?1:0})}return te}()})]})},S=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,j=E.wanted,M=!!L.args.is_admin,O=L.args.scanned_user,D=(0,t.useLocalState)(w,"author",(j==null?void 0:j.author)||O||"Unknown"),F=D[0],W=D[1],U=(0,t.useLocalState)(w,"name",(j==null?void 0:j.title.substr(8))||""),K=U[0],G=U[1],$=(0,t.useLocalState)(w,"description",(j==null?void 0:j.body)||""),Q=$[0],Z=$[1],ie=(0,t.useLocalState)(w,"adminLocked",(j==null?void 0:j.admin_locked)===1||!1),ne=ie[0],se=ie[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function ve(Ve,ge){return W(ge)}return ve}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:K,maxLength:"128",onInput:function(){function ve(Ve,ge){return G(ge)}return ve}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Q,maxLength:"512",rows:"4",onInput:function(){function ve(Ve,ge){return Z(ge)}return ve}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function ve(){return x(P?"eject_photo":"attach_photo")}return ve}()}),!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"})]}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:ne,icon:ne?"lock":"lock-open",content:ne?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function ve(){return se(!ne)}return ve}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!j,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function ve(){x("clear_wanted_notice"),(0,y.modalClose)(w)}return ve}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||K.trim().length===0||Q.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function ve(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:K.substr(0,127),description:Q.substr(0,511),admin_locked:ne?1:0})}return ve}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",g),(0,y.modalRegisterBodyOverride)("manage_channel",g),(0,y.modalRegisterBodyOverride)("create_story",V),(0,y.modalRegisterBodyOverride)("wanted_notice",S)},48286:function(T,r,n){"use strict";r.__esModule=!0,r.Noticeboard=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=r.Noticeboard=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data,p=c.papers;return(0,e.createComponentVNode)(2,m.Window,{width:600,height:300,theme:"noticeboard",children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:p.map(function(u){return(0,e.createComponentVNode)(2,o.Stack.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){function d(){return i("interact",{paper:u.ref})}return d}(),onContextMenu:function(){function d(s){s.preventDefault(),i("showFull",{paper:u.ref})}return d}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,fontSize:.75,title:u.name,children:(0,a.decodeHtmlEntities)(u.contents)})},u.ref)})})})})}return y}()},41166:function(T,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.NuclearBomb=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return i.extended?(0,e.createComponentVNode)(2,o.Window,{width:350,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authdisk?"eject":"id-card",selected:i.authdisk,content:i.diskname?i.diskname:"-----",tooltip:i.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return C("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!i.authdisk,selected:i.authcode,content:i.codemsg,onClick:function(){function c(){return C("code")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.anchored?"check":"times",selected:i.anchored,disabled:!i.authdisk,content:i.anchored?"YES":"NO",onClick:function(){function c(){return C("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:i.time,disabled:!i.authfull,tooltip:"Set Timer",onClick:function(){function c(){return C("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.safety?"check":"times",selected:i.safety,disabled:!i.authfull,content:i.safety?"ON":"OFF",tooltip:i.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return C("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(i.timer,"bomb"),disabled:i.safety||!i.authfull,color:"red",content:i.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return C("toggle_armed")}return c}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:350,height:115,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function c(){return C("deploy")}return c}()})})})})}return b}()},52416:function(T,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(92986),m=n(72253),b=n(36036),y=n(98595),B=r.NumberInputModal=function(){function C(i,c){var p=(0,m.useBackend)(c),u=p.act,d=p.data,s=d.init_value,l=d.large_buttons,h=d.message,N=h===void 0?"":h,v=d.timeout,f=d.title,g=(0,m.useLocalState)(c,"input",s),V=g[0],S=g[1],I=function(){function A(x){x!==V&&S(x)}return A}(),L=function(){function A(x){x!==V&&S(x)}return A}(),w=140+Math.max(Math.ceil(N.length/3),N.length>0&&l?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:f,width:270,height:w,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&u("submit",{entry:V}),E===o.KEY_ESCAPE&&u("cancel")}return A}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:N})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{input:V,onClick:L,onChange:I})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return C}(),k=function(i,c){var p=(0,m.useBackend)(c),u=p.act,d=p.data,s=d.min_value,l=d.max_value,h=d.init_value,N=d.round_value,v=i.input,f=i.onClick,g=i.onChange,V=Math.round(v!==s?Math.max(v/2,s):l/2),S=v===s&&s>0||v===1;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===s,icon:"angle-double-left",onClick:function(){function I(){return f(s)}return I}(),tooltip:v===s?"Min":"Min ("+s+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!N,minValue:s,maxValue:l,onChange:function(){function I(L,w){return g(w)}return I}(),onEnter:function(){function I(L,w){return u("submit",{entry:w})}return I}(),value:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===l,icon:"angle-double-right",onClick:function(){function I(){return f(l)}return I}(),tooltip:v===l?"Max":"Max ("+l+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:S,icon:"divide",onClick:function(){function I(){return f(V)}return I}(),tooltip:S?"Split":"Split ("+V+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===h,icon:"redo",onClick:function(){function I(){return f(h)}return I}(),tooltip:h?"Reset ("+h+")":"Reset"})})]})}},1218:function(T,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(98595),m=n(36036),b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],C=r.OperatingComputer=function(){function u(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.hasOccupant,f=N.choice,g;return f?g=(0,e.createComponentVNode)(2,p):g=v?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Tabs,{children:[(0,e.createComponentVNode)(2,m.Tabs.Tab,{selected:!f,icon:"user",onClick:function(){function V(){return h("choiceOff")}return V}(),children:"Patient"}),(0,e.createComponentVNode)(2,m.Tabs.Tab,{selected:!!f,icon:"cog",onClick:function(){function V(){return h("choiceOn")}return V}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,scrollable:!0,children:g})})]})})})}return u}(),i=function(d,s){var l=(0,t.useBackend)(s),h=l.data,N=h.occupant;return(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Name",children:N.name}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Status",color:b[N.stat][0],children:b[N.stat][1]}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:N.maxHealth,value:N.health/N.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(v,f){return(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:v[0]+" Damage",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:"100",value:N[v[1]]/100,ranges:B,children:(0,a.round)(N[v[1]])},f)},f)}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:N.maxTemp,value:N.bodyTemperature/N.maxTemp,color:k[N.temperatureSuitability+3],children:[(0,a.round)(N.btCelsius),"\xB0C, ",(0,a.round)(N.btFaren),"\xB0F"]})}),!!N.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,m.ProgressBar,{min:"0",max:N.bloodMax,value:N.bloodLevel/N.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[N.bloodPercent,"%, ",N.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Pulse",children:[N.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Section,{title:"Current Procedure",level:"2",children:N.inSurgery?(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Procedure",children:N.surgeryName}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Next Step",children:N.stepName})]}):(0,e.createComponentVNode)(2,m.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,m.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},p=function(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.verbose,f=N.health,g=N.healthAlarm,V=N.oxy,S=N.oxyAlarm,I=N.crit;return(0,e.createComponentVNode)(2,m.LabeledList,{children:[(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,m.Button,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"On":"Off",onClick:function(){function L(){return h(v?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,m.Button,{selected:f,icon:f?"toggle-on":"toggle-off",content:f?"On":"Off",onClick:function(){function L(){return h(f?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,m.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:g,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return h("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,m.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function L(){return h(V?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,m.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:S,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return h("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,m.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,m.Button,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"On":"Off",onClick:function(){function L(){return h(I?"critOff":"critOn")}return L}()})})]})}},46892:function(T,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(35840);function y(l,h){var N=typeof Symbol!="undefined"&&l[Symbol.iterator]||l["@@iterator"];if(N)return(N=N.call(l)).next.bind(N);if(Array.isArray(l)||(N=B(l))||h&&l&&typeof l.length=="number"){N&&(l=N);var v=0;return function(){return v>=l.length?{done:!0}:{done:!1,value:l[v++]}}}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 B(l,h){if(l){if(typeof l=="string")return k(l,h);var N={}.toString.call(l).slice(8,-1);return N==="Object"&&l.constructor&&(N=l.constructor.name),N==="Map"||N==="Set"?Array.from(l):N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?k(l,h):void 0}}function k(l,h){(h==null||h>l.length)&&(h=l.length);for(var N=0,v=Array(h);NN},p=function(h,N){var v=h.name,f=N.name;if(!v||!f)return 0;var g=v.match(C),V=f.match(C);if(g&&V&&v.replace(C,"")===f.replace(C,"")){var S=parseInt(g[1],10),I=parseInt(V[1],10);return S-I}return c(v,f)},u=function(h,N){var v=h.searchText,f=h.source,g=h.title,V=h.color,S=h.sorted,I=f.filter(i(v));return S&&I.sort(p),f.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:g+" - ("+f.length+")",children:I.map(function(L){return(0,e.createComponentVNode)(2,d,{thing:L,color:V},L.name)})})},d=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=h.color,V=h.thing;return(0,e.createComponentVNode)(2,o.Button,{color:g,tooltip:V.assigned_role?(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",mr:"0.5em",className:(0,b.classes)(["orbit_job16x16",V.assigned_role_sprite])})," ",V.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){function S(){return f("orbit",{ref:V.ref})}return S}(),children:[V.name,V.orbiters&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,children:["(",V.orbiters," ",(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),")"]})]})},s=r.Orbit=function(){function l(h,N){for(var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.alive,S=g.antagonists,I=g.highlights,L=g.response_teams,w=g.tourist,A=g.auto_observe,x=g.dead,E=g.ssd,P=g.ghosts,j=g.misc,M=g.npcs,O=(0,t.useLocalState)(N,"searchText",""),D=O[0],F=O[1],W={},U=y(S),K;!(K=U()).done;){var G=K.value;W[G.antag]===void 0&&(W[G.antag]=[]),W[G.antag].push(G)}var $=Object.entries(W);$.sort(function(Z,ie){return c(Z[0],ie[0])});var Q=function(){function Z(ie){for(var ne=0,se=[$.map(function(ge){var Ce=ge[0],oe=ge[1];return oe}),w,I,V,P,E,x,M,j];ne0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:$.map(function(Z){var ie=Z[0],ne=Z[1];return(0,e.createComponentVNode)(2,o.Section,{title:ie+" - ("+ne.length+")",level:2,children:ne.filter(i(D)).sort(p).map(function(se){return(0,e.createComponentVNode)(2,d,{color:"bad",thing:se},se.name)})},ie)})}),I.length>0&&(0,e.createComponentVNode)(2,u,{title:"Highlights",source:I,searchText:D,color:"teal"}),(0,e.createComponentVNode)(2,u,{title:"Response Teams",source:L,searchText:D,color:"purple"}),(0,e.createComponentVNode)(2,u,{title:"Tourists",source:w,searchText:D,color:"violet"}),(0,e.createComponentVNode)(2,u,{title:"Alive",source:V,searchText:D,color:"good"}),(0,e.createComponentVNode)(2,u,{title:"Ghosts",source:P,searchText:D,color:"grey"}),(0,e.createComponentVNode)(2,u,{title:"SSD",source:E,searchText:D,color:"grey"}),(0,e.createComponentVNode)(2,u,{title:"Dead",source:x,searchText:D,sorted:!1}),(0,e.createComponentVNode)(2,u,{title:"NPCs",source:M,searchText:D,sorted:!1}),(0,e.createComponentVNode)(2,u,{title:"Misc",source:j,searchText:D,sorted:!1})]})})}return l}()},15421:function(T,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=n(9394);function y(l){if(l==null)throw new TypeError("Cannot destructure "+l)}var B=(0,b.createLogger)("OreRedemption"),k=function(h){return h.toLocaleString("en-US")+" pts"},C=r.OreRedemption=function(){function l(h,N){return(0,e.createComponentVNode)(2,m.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,p)]})})})}return l}(),i=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.id,S=g.points,I=g.disk,L=Object.assign({},(y(h),h));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:S>0?"good":"grey",bold:S>0&&"good",children:k(S)})}),(0,e.createComponentVNode)(2,o.Divider),I?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:I.name,tooltip:"Ejects the design disk.",onClick:function(){function w(){return f("eject_disk")}return w}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!I.design||!I.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function w(){return f("download")}return w}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:I.design&&(I.compatible?"good":"bad"),children:I.design||"N/A"})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},c=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.sheets,S=Object.assign({},(y(h),h));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,u,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,d,{ore:I},I.id)})]})))})},p=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.alloys,S=Object.assign({},(y(h),h));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,u,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,s,{ore:I},I.id)})]})))})},u=function(h,N){var v;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:h.title}),(v=h.columns)==null?void 0:v.map(function(f){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:f[1],textAlign:"center",color:"label",bold:!0,children:f[0]},f)})]})})},d=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=h.ore;if(!(g.value&&g.amount<=0&&!(["metal","glass"].indexOf(g.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",g.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:g.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:g.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(g.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return f(g.value?"sheet":"alloy",{id:g.id,amount:I})}return V}()})})]})})},s=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=h.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",g.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:g.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:g.amount>=1?"good":"gray",align:"center",children:g.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:g.amount>=1?"good":"gray",bold:g.amount>=1,align:"center",children:g.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(g.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return f(g.value?"sheet":"alloy",{id:g.id,amount:I})}return V}()})})]})})}},52754:function(T,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(71253),b=n(70752),y=function(C){var i;try{i=b("./"+C+".js")}catch(p){if(p.code==="MODULE_NOT_FOUND")return(0,m.routingError)("notFound",C);throw p}var c=i[C];return c||(0,m.routingError)("missingExport",C)},B=r.PAI=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.app_template,s=u.app_icon,l=u.app_title,h=y(d);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{p:1,fill:!0,scrollable:!0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s,mr:1}),l,d!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function N(){return p("Back")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function N(){return p("MASTER_back")}return N}()})],4)]}),children:(0,e.createComponentVNode)(2,h)})})})})})}return k}()},85175:function(T,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(71253),b=n(59395),y=function(c){var p;try{p=b("./"+c+".js")}catch(d){if(d.code==="MODULE_NOT_FOUND")return(0,m.routingError)("notFound",c);throw d}var u=p[c];return u||(0,m.routingError)("missingExport",c)},B=r.PDA=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.app,h=s.owner;if(!h)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var N=y(l.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:l.icon,mr:1}),l.name]}),children:(0,e.createComponentVNode)(2,N)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,C)})]})})})}return i}(),k=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.idInserted,h=s.idLink,N=s.stationTime,v=s.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function f(){return d("Authenticate")}return f}(),content:l?h:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function f(){return d("Eject")}return f}(),content:v?["Eject "+v]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:N})]})},C=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!l.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function h(){return d("Back")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:l.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.is_home?"disabled":"white",icon:"home",onClick:function(){function h(){d("Home")}return h}()})})]})})}},68654:function(T,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(49968),b=r.Pacman=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.active,u=c.anchored,d=c.broken,s=c.emagged,l=c.fuel_type,h=c.fuel_usage,N=c.fuel_stored,v=c.fuel_cap,f=c.is_ai,g=c.tmp_current,V=c.tmp_max,S=c.tmp_overheat,I=c.output_max,L=c.power_gen,w=c.output_set,A=c.has_fuel,x=N/v,E=g/V,P=w*L,j=Math.round(N/h),M=Math.round(j/60),O=j>120?M+" minutes":j+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(d||!u)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!d&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!d&&!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!d&&!!u&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:p?"power-off":"times",content:p?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:p,onClick:function(){function D(){return i("toggle_power")}return D}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:w,minValue:1,maxValue:I*(s?2.5:1),step:1,className:"mt-1",onDrag:function(){function D(F,W){return i("change_power",{change_power:W})}return D}()}),"(",(0,m.formatPower)(P),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[g," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[S>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),S>20&&S<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),S>1&&S<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),S===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:p||f||!A,onClick:function(){function D(){return i("eject_fuel")}return D}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(N/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[h/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(h?O:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return y}()},1701:function(T,r,n){"use strict";r.__esModule=!0,r.PanDEMIC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.PanDEMIC=function(){function u(d,s){var l=(0,a.useBackend)(s),h=l.data,N=h.beakerLoaded,v=h.beakerContainsBlood,f=h.beakerContainsVirus,g=h.resistances,V=g===void 0?[]:g,S;return N?v?v&&!f&&(S=(0,e.createFragment)([(0,e.createTextVNode)("No disease detected in provided blood sample.")],4)):S=(0,e.createFragment)([(0,e.createTextVNode)("No blood sample found in the loaded container.")],4):S=(0,e.createFragment)([(0,e.createTextVNode)("No container loaded.")],4),(0,e.createComponentVNode)(2,o.Window,{width:575,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[S&&!f?(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b,{fill:!0,vertical:!0}),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:S})}):(0,e.createComponentVNode)(2,k),(V==null?void 0:V.length)>0&&(0,e.createComponentVNode)(2,p,{align:"bottom"})]})})})}return u}(),b=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.beakerLoaded;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function f(){return h("eject_beaker")}return f}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!v,onClick:function(){function f(){return h("destroy_eject_beaker")}return f}()})],4)},y=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.beakerContainsVirus,f=d.strain,g=f.commonName,V=f.description,S=f.diseaseAgent,I=f.bloodDNA,L=f.bloodType,w=f.possibleTreatments,A=f.transmissionRoute,x=f.isAdvanced,E=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",children:I?(0,e.createVNode)(1,"span",null,I,0,{style:{"font-family":"'Courier New', monospace"}}):"Undetectable"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:L!=null?L:"Undetectable"}})})],4);if(!v)return(0,e.createComponentVNode)(2,t.LabeledList,{children:E});var P;return x&&(g!=null&&g!=="Unknown"?P=(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print Release Forms",onClick:function(){function j(){return h("print_release_forms",{strain_index:d.strainIndex})}return j}(),style:{"margin-left":"auto"}}):P=(0,e.createComponentVNode)(2,t.Button,{icon:"pen",content:"Name Disease",onClick:function(){function j(){return h("name_strain",{strain_index:d.strainIndex})}return j}(),style:{"margin-left":"auto"}})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Common Name",className:"common-name-label",children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,align:"center",children:[g!=null?g:"Unknown",P]})}),V&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:V}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Disease Agent",children:S}),E,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Spread Vector",children:A!=null?A:"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Possible Cures",children:w!=null?w:"None"})]})},B=function(d,s){var l,h=(0,a.useBackend)(s),N=h.act,v=h.data,f=!!v.synthesisCooldown,g=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:f?"spinner":"clone",iconSpin:f,content:"Clone",disabled:f,onClick:function(){function V(){return N("clone_strain",{strain_index:d.strainIndex})}return V}()}),d.sectionButtons],0);return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:(l=d.sectionTitle)!=null?l:"Strain Information",buttons:g,children:(0,e.createComponentVNode)(2,y,{strain:d.strain,strainIndex:d.strainIndex})})})},k=function(d,s){var l,h=(0,a.useBackend)(s),N=h.act,v=h.data,f=v.selectedStrainIndex,g=v.strains,V=g[f-1];if(g.length===0)return(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No disease detected in provided blood sample."})});if(g.length===1){var S;return(0,e.createFragment)([(0,e.createComponentVNode)(2,B,{strain:g[0],strainIndex:1,sectionButtons:(0,e.createComponentVNode)(2,b)}),((S=g[0].symptoms)==null?void 0:S.length)>0&&(0,e.createComponentVNode)(2,i,{strain:g[0]})],0)}var I=(0,e.createComponentVNode)(2,b);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Culture Information",fill:!0,buttons:I,children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",style:{height:"100%"},children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:g.map(function(L,w){var A;return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"virus",selected:f-1===w,onClick:function(){function x(){return N("switch_strain",{strain_index:w+1})}return x}(),children:(A=L.commonName)!=null?A:"Unknown"},w)})})}),(0,e.createComponentVNode)(2,B,{strain:V,strainIndex:f}),((l=V.symptoms)==null?void 0:l.length)>0&&(0,e.createComponentVNode)(2,i,{className:"remove-section-bottom-padding",strain:V})]})})})},C=function(d){return d.reduce(function(s,l){return s+l},0)},i=function(d){var s=d.strain.symptoms;return(0,e.createComponentVNode)(2,t.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Infection Symptoms",fill:!0,className:d.className,children:(0,e.createComponentVNode)(2,t.Table,{className:"symptoms-table",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stealth"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Resistance"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stage Speed"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Transmissibility"})]}),s.map(function(l,h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.stealth}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.resistance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.stageSpeed}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.transmissibility})]},h)}),(0,e.createComponentVNode)(2,t.Table.Row,{className:"table-spacer"}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"font-weight":"bold"},children:"Total"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.stealth}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.resistance}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.stageSpeed}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C(s.map(function(l){return l.transmissibility}))})]})]})})})},c=["flask","vial","eye-dropper"],p=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.synthesisCooldown,f=N.beakerContainsVirus,g=N.resistances;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Antibodies",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,wrap:!0,children:g.map(function(V,S){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:c[S%c.length],disabled:!!v,onClick:function(){function I(){return h("clone_vaccine",{resistance_index:S+1})}return I}(),mr:"0.5em"}),V]},S)})})})})}},67921:function(T,r,n){"use strict";r.__esModule=!0,r.ParticleAccelerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ParticleAccelerator=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.assembled,p=i.power,u=i.strength,d=i.max_strength;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:160,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Connect",onClick:function(){function s(){return C("scan")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",mb:"5px",children:(0,e.createComponentVNode)(2,t.Box,{color:c?"good":"bad",children:c?"Operational":"Error: Verify Configuration"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:!c,onClick:function(){function s(){return C("power")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!c||u===0,onClick:function(){function s(){return C("remove_strength")}return s}(),mr:"4px"}),u,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!c||u===d,onClick:function(){function s(){return C("add_strength")}return s}(),ml:"4px"})]})]})})})})}return b}()},71432:function(T,r,n){"use strict";r.__esModule=!0,r.PdaPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.PdaPainter=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:u?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,b)})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"download",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){function u(){return p("insert_pda")}return u}()})]})})})},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.pda_colors;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,B)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Table,{className:"PdaPainter__list",children:Object.keys(d).map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function l(){return p("choose_pda",{selectedPda:s})}return l}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+d[s][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s})]},s)})})})})]})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.current_appearance,s=u.preview_appearance;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Current PDA",children:[(0,e.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","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){function l(){return p("eject_pda")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function l(){return p("paint_pda")}return l}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Preview",children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})})]})}},33388:function(T,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.PersonalCrafting=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.busy,d=p.category,s=p.display_craftable_only,l=p.display_compact,h=p.prev_cat,N=p.next_cat,v=p.subcategory,f=p.prev_subcat,g=p.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:d,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:s?"check-square-o":"square-o",selected:s,onClick:function(){function V(){return c("toggle_recipes")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:l?"check-square-o":"square-o",selected:l,onClick:function(){function V(){return c("toggle_compact")}return V}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function V(){return c("backwardCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function V(){return c("forwardCat")}return V}()})]}),v&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:f,icon:"arrow-left",onClick:function(){function V(){return c("backwardSubCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:g,icon:"arrow-right",onClick:function(){function V(){return c("forwardSubCat")}return V}()})]}),l?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})]})})}return B}(),b=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.display_craftable_only,d=p.can_craft,s=p.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return c("make",{make:l.ref})}return h}()}),l.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:l.req_text,content:"Requirements",color:"transparent"}),l.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.tool_text,content:"Tools",color:"transparent"})]},l.name)}),!u&&s.map(function(l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),l.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:l.req_text,content:"Requirements",color:"transparent"}),l.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:l.tool_text,content:"Tools",color:"transparent"})]},l.name)})]})})},y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.display_craftable_only,d=p.can_craft,s=p.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[d.map(function(l){return(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function h(){return c("make",{make:l.ref})}return h}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[l.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:l.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:l.req_text}),l.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:l.tool_text})]})},l.name)}),!u&&s.map(function(l){return(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[l.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:l.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:l.req_text}),l.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:l.tool_text})]})},l.name)})]})}},56150:function(T,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Photocopier=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:440,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Photocopier",color:"silver",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Copies:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"2em",bold:!0,children:p.copynumber}),(0,e.createComponentVNode)(2,t.Stack.Item,{float:"right",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"minus",textAlign:"center",content:"",onClick:function(){function u(){return c("minus")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function u(){return c("add")}return u}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Toner:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,children:p.toner})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Document:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!p.copyitem&&!p.mob,content:p.copyitem?p.copyitem:p.mob?p.mob+"'s ass!":"document",onClick:function(){function u(){return c("removedocument")}return u}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Folder:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!p.folder,content:p.folder?p.folder:"folder",onClick:function(){function u(){return c("removefolder")}return u}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,y)]})})})}return B}(),b=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function d(){return c("copy")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function d(){return c("scandocument")}return d}()}),!!u&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){function d(){return c("ai_text")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function d(){return c("ai_pic")}return d}()})],4)],0)},y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:p.files.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:p.toner<=0,onClick:function(){function d(){return c("filecopy",{uid:u.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function d(){return c("deletefile",{uid:u.uid})}return d}()})]})},u.name)})})}},8340:function(T,r,n){"use strict";r.__esModule=!0,r.Photocopier220=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(88510),b=n(64795),y=n(25328);function B(p,u){var d=typeof Symbol!="undefined"&&p[Symbol.iterator]||p["@@iterator"];if(d)return(d=d.call(p)).next.bind(d);if(Array.isArray(p)||(d=k(p))||u&&p&&typeof p.length=="number"){d&&(p=d);var s=0;return function(){return s>=p.length?{done:!0}:{done:!1,value:p[s++]}}}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 k(p,u){if(p){if(typeof p=="string")return C(p,u);var d={}.toString.call(p).slice(8,-1);return d==="Object"&&p.constructor&&(d=p.constructor.name),d==="Map"||d==="Set"?Array.from(p):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?C(p,u):void 0}}function C(p,u){(u==null||u>p.length)&&(u=p.length);for(var d=0,s=Array(u);dp?this.substring(0,p)+"...":this};var i=function(u,d){d===void 0&&(d="");var s=(0,y.createSearch)(d,function(l){return l.altername});return(0,b.flow)([(0,m.filter)(function(l){return l==null?void 0:l.altername}),d&&(0,m.filter)(s),(0,m.sortBy)(function(l){return l.id})])(u)},c=r.Photocopier220=function(){function p(u,d){for(var s=(0,a.useBackend)(d),l=s.act,h=s.data,N=h.copies,v=h.maxcopies,f=(0,a.useLocalState)(d,"searchText",""),g=f[0],V=f[1],S=i((0,m.sortBy)(function(M){return M.category})(h.forms||[]),g),I=[],L=B(S),w;!(w=L()).done;){var A=w.value;I.includes(A.category)||I.push(A.category)}var x=(0,a.useLocalState)(d,"number",0),E=x[0],P=x[1],j;return h.category===""?j=S:j=S.filter(function(M){return M.category===h.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:h.ui_theme,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"40%",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mt:.3,color:"grey",children:"\u0417\u0430\u0440\u044F\u0434 \u0442\u043E\u043D\u0435\u0440\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{minValue:0,maxValue:30,value:h.toner})})]}),(0,e.createComponentVNode)(2,t.Stack,{mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mb:.3,color:"grey",children:"\u0424\u043E\u0440\u043C\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",textAlign:"center",bold:!0,children:h.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":h.form_id})]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!h.copyitem&&!h.mob,icon:h.copyitem||h.mob?"eject":"times",content:h.copyitem?h.copyitem:h.mob?"\u0416\u043E\u043F\u0430 "+h.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function M(){return l("removedocument")}return M}()})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!h.folder,icon:h.folder?"eject":"times",content:h.folder?h.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function M(){return l("removefolder")}return M}()})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:h.toner===0||h.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function M(){return l("print_form")}return M}()})}),!!h.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:h.toner<5,content:"\u0424\u043E\u0442\u043E",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0444\u043E\u0442\u043E \u0441 \u0411\u0430\u0437\u044B \u0414\u0430\u043D\u043D\u044B\u0445",onClick:function(){function M(){return l("ai_pic")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041A\u043E\u043F\u0438\u044F",disabled:h.toner===0||!h.copyitem&&!h.mob,onClick:function(){function M(){return l("copy")}return M}()})}),!!h.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043A\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0442\u0435\u043A\u0441\u0442",disabled:h.toner===0,onClick:function(){function M(){return l("ai_text")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:1.5,mt:1.2,width:"50%",color:"grey",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"}),(0,e.createComponentVNode)(2,t.Slider,{mt:.75,width:"50%",animated:!0,minValue:1,maxValue:v,value:N,stepPixelSize:10,onChange:function(){function M(O,D){return l("copies",{new:D})}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0411\u044E\u0440\u043E\u043A\u0440\u0430\u0442\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:-.5,icon:"chevron-right",color:"transparent",content:"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",selected:!h.category,onClick:function(){function M(){return l("choose_category",{category:""})}return M}()})}),I.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"chevron-right",mb:-.5,color:"transparent",content:M,selected:h.category===M,onClick:function(){function O(){return l("choose_category",{category:M})}return O}()},M)},M)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:h.category||"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",buttons:(0,e.createComponentVNode)(2,t.Input,{mr:18.5,width:"100%",placeholder:"\u041F\u043E\u0438\u0441\u043A \u0444\u043E\u0440\u043C\u044B",onInput:function(){function M(O,D){return V(D)}return M}()}),children:j.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:M.altername.trimLongStr(37),tooltip:M.altername,selected:h.form_id===M.id,onClick:function(){function O(){return l("choose_form",{path:M.path,id:M.id})}return O}()})},M.path)})})})]})})})}return p}()},84676:function(T,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=["tempKey"];function b(C,i){if(C==null)return{};var c={};for(var p in C)if({}.hasOwnProperty.call(C,p)){if(i.includes(p))continue;c[p]=C[p]}return c}var y={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}},B=function(i,c){var p=i.tempKey,u=b(i,m),d=y[p];if(!d)return null;var s=(0,a.useBackend)(c),l=s.data,h=s.act,N=l.currentTemp,v=d.label,f=d.icon,g=p===N,V=function(){h("setTemp",{temp:p})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:g,onClick:V},u,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:f}),v]})))},k=r.PoolController=function(){function C(i,c){for(var p=(0,a.useBackend)(c),u=p.data,d=u.emagged,s=u.currentTemp,l=y[s]||y.normal,h=l.label,N=l.color,v=[],f=0,g=Object.entries(y);f50?"battery-half":"battery-quarter")||N==="C"&&"bolt"||N==="F"&&"battery-full"||N==="M"&&"slash",color:N==="N"&&(v>50?"yellow":"red")||N==="C"&&"yellow"||N==="F"&&"green"||N==="M"&&"orange"}),(0,e.createComponentVNode)(2,B.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(v)+"%"})],4)};d.defaultHooks=m.pureComponentHooks;var s=function(h){var N,v,f=h.status;switch(f){case"AOn":N=!0,v=!0;break;case"AOff":N=!0,v=!1;break;case"On":N=!1,v=!0;break;case"Off":N=!1,v=!1;break}var g=(v?"On":"Off")+(" ["+(N?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,B.ColorBox,{color:v?"good":"bad",content:N?void 0:"M",title:g})};s.defaultHooks=m.pureComponentHooks},50992:function(T,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(29319),m=n(3939),b=n(321),y=n(5485),B=n(98595),k=r.PrisonerImplantManager=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.loginState,l=d.prisonerInfo,h=d.chemicalInfo,N=d.trackingInfo,v;if(!s.logged_in)return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.LoginScreen)})});var f=[1,5,10];return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.name?"eject":"id-card",selected:l.name,content:l.name?l.name:"-----",tooltip:l.name?"Eject ID":"Insert ID",onClick:function(){function g(){return u("id_card")}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[l.points!==null?l.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:l.points===null,content:"Reset",onClick:function(){function g(){return u("reset_points")}return g}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[l.goal!==null?l.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:l.goal===null,content:"Edit",onClick:function(){function g(){return(0,m.modalOpen)(c,"set_points")}return g}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:l.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:N.map(function(g){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",g.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:g.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:g.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function V(){return(0,m.modalOpen)(c,"warn",{uid:g.uid})}return V}()})})]})]},g.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:h.map(function(g){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",g.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:g.volume})}),f.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:g.volumec;return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:!0,asset:["prize_counter64x64",g.imageID],title:g.name,buttonsAlt:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{bold:!0,translucent:!0,fontSize:1.5,tooltip:V&&"Not enough tickets",disabled:V,onClick:function(){function S(){return C("purchase",{purchase:g.itemID})}return S}(),children:[g.cost,(0,e.createComponentVNode)(2,t.Icon,{m:0,mt:.25,name:"ticket",color:V?"bad":"good",size:1.6})]}),children:g.desc},g.name)})})})})})})}return b}()},94813:function(T,r,n){"use strict";r.__esModule=!0,r.RCD=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(3939),b=n(49148),y=r.RCD=function(){function u(d,s){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:670,children:[(0,e.createComponentVNode)(2,m.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return u}(),B=function(d,s){var l=(0,a.useBackend)(s),h=l.data,N=h.matter,v=h.max_matter,f=v*.7,g=v*.25;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Matter Storage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[f,1/0],average:[g,f],bad:[-1/0,g]},value:N,maxValue:v,children:(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:N+" / "+v+" units"})})})})},k=function(){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Construction Type",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,C,{mode_type:"Floors and Walls"}),(0,e.createComponentVNode)(2,C,{mode_type:"Airlocks"}),(0,e.createComponentVNode)(2,C,{mode_type:"Windows"}),(0,e.createComponentVNode)(2,C,{mode_type:"Deconstruction"})]})})})},C=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=d.mode_type,f=N.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",content:v,selected:f===v?1:0,onClick:function(){function g(){return h("mode",{mode:v})}return g}()})})},i=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.door_name,f=N.electrochromic,g=N.airlock_glass;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Airlock Settings",children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,e.createFragment)([(0,e.createTextVNode)("Rename: "),(0,e.createVNode)(1,"b",null,v,0)],0),onClick:function(){function V(){return(0,m.modalOpen)(s,"renameAirlock")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:g===1&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:f?"toggle-on":"toggle-off",content:"Electrochromic",selected:f,onClick:function(){function V(){return h("electrochromic")}return V}()})})]})})})},c=function(d,s){var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.tab,f=N.locked,g=N.one_access,V=N.selected_accesses,S=N.regions;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"cog",selected:v===1,onClick:function(){function I(){return h("set_tab",{tab:1})}return I}(),children:"Airlock Types"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===2,icon:"list",onClick:function(){function I(){return h("set_tab",{tab:2})}return I}(),children:"Airlock Access"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v===1?(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Types",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p,{check_number:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p,{check_number:1})})]})}):v===2&&f?(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Access",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock-open",content:"Unlock",onClick:function(){function I(){return h("set_lock",{new_lock:"unlock"})}return I}()}),children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Airlock access selection is currently locked."]})})}):(0,e.createComponentVNode)(2,b.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock",content:"Lock",onClick:function(){function I(){return h("set_lock",{new_lock:"lock"})}return I}()}),usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:g,content:"One",onClick:function(){function I(){return h("set_one_access",{access:"one"})}return I}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!g,width:4,content:"All",onClick:function(){function I(){return h("set_one_access",{access:"all"})}return I}()})],4),accesses:S,selectedList:V,accessMod:function(){function I(L){return h("set",{access:L})}return I}(),grantAll:function(){function I(){return h("grant_all")}return I}(),denyAll:function(){function I(){return h("clear_all")}return I}(),grantDep:function(){function I(L){return h("grant_region",{region:L})}return I}(),denyDep:function(){function I(L){return h("deny_region",{region:L})}return I}()})})],4)},p=function(d,s){for(var l=(0,a.useBackend)(s),h=l.act,N=l.data,v=N.door_types_ui_list,f=N.door_type,g=d.check_number,V=[],S=0;S=m?w=(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"There are new messages"}):S===B?w=(0,e.createComponentVNode)(2,t.Blink,{children:(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"NEW PRIORITY MESSAGES"})}):w=(0,e.createComponentVNode)(2,t.Box,{color:"label",mb:1,children:"There are no new messages"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,e.createComponentVNode)(2,t.Button,{width:9,content:L?"Speaker Off":"Speaker On",selected:!L,icon:L?"volume-mute":"volume-up",onClick:function(){function A(){return g("toggleSilent")}return A}()}),children:[w,(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Messages",icon:S>m?"envelope-open-text":"envelope",onClick:function(){function A(){return g("setScreen",{setScreen:6})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Assistance",icon:"hand-paper",onClick:function(){function A(){return g("setScreen",{setScreen:1})}return A}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Supplies",icon:"box",onClick:function(){function A(){return g("setScreen",{setScreen:2})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Secondary Goal",icon:"clipboard-list",onClick:function(){function A(){return g("setScreen",{setScreen:11})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Relay Anonymous Information",icon:"comment",onClick:function(){function A(){return g("setScreen",{setScreen:3})}return A}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Print Shipping Label",icon:"tag",onClick:function(){function A(){return g("setScreen",{setScreen:9})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function A(){return g("setScreen",{setScreen:10})}return A}()})]})}),!!I&&(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function A(){return g("setScreen",{setScreen:8})}return A}()})})]})})},i=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.department,I=[],L;switch(N.purpose){case"ASSISTANCE":I=V.assist_dept,L="Request assistance from another department";break;case"SUPPLIES":I=V.supply_dept,L="Request supplies from another department";break;case"INFO":I=V.info_dept,L="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:L,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return g("setScreen",{setScreen:0})}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:I.filter(function(w){return w!==S}).map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function A(){return g("writeInput",{write:w,priority:y})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function A(){return g("writeInput",{write:w,priority:B})}return A}()})]},w)})})})})},c=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S;switch(N.type){case"SUCCESS":S="Message sent successfully";break;case"FAIL":S="Unable to contact messaging server";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:S,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function I(){return g("setScreen",{setScreen:0})}return I}()})})},p=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S,I;switch(N.type){case"MESSAGES":S=V.message_log,I="Message Log";break;case"SHIPPING":S=V.shipping_log,I="Shipping label print log";break}return S.reverse(),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:I,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return g("setScreen",{setScreen:0})}return L}()}),children:S.map(function(L){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"left",children:[L.map(function(w,A){return(0,e.createVNode)(1,"div",null,w,0,null,A)}),(0,e.createVNode)(1,"hr")]},L)})})})},u=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.recipient,I=V.message,L=V.msgVerified,w=V.msgStamped;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function A(){return g("setScreen",{setScreen:0})}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:w})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function A(){return g("department",{department:S})}return A}()})})})],4)},d=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.message,I=V.announceAuth;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return g("setScreen",{setScreen:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function L(){return g("writeAnnouncement")}return L}()})],4),children:S})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(I&&S),onClick:function(){function L(){return g("sendAnnouncement")}return L}()})]})})],4)},s=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.shipDest,I=V.msgVerified,L=V.ship_dept;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return g("setScreen",{setScreen:0})}return w}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:I})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(S&&I),onClick:function(){function w(){return g("printLabel")}return w}()})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Destinations",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:L.map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:(0,e.createComponentVNode)(2,t.Button,{content:S===w?"Selected":"Select",selected:S===w,onClick:function(){function A(){return g("shipSelect",{shipSelect:w})}return A}()})},w)})})})})],4)},l=function(N,v){var f=(0,a.useBackend)(v),g=f.act,V=f.data,S=V.secondaryGoalAuth,I=V.secondaryGoalEnabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return g("setScreen",{setScreen:0})}return L}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?S?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Request Secondary Goal",icon:"clipboard-list",disabled:!(S&&I),onClick:function(){function L(){return g("requestSecondaryGoal")}return L}()})]})})],4)}},9861:function(T,r,n){"use strict";r.__esModule=!0,r.RndBackupConsole=r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.RndBackupConsole=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.network_name,u=c.has_disk,d=c.disk_name,s=c.linked,l=c.techs,h=c.last_timestamp;return(0,e.createComponentVNode)(2,o.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Device Info",children:[(0,e.createComponentVNode)(2,t.Box,{mb:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Network",children:s?(0,e.createComponentVNode)(2,t.Button,{content:p,icon:"unlink",selected:1,onClick:function(){function N(){return i("unlink")}return N}()}):"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Loaded Disk",children:u?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:d+" (Last backup: "+h+")",icon:"save",selected:1,onClick:function(){function N(){return i("eject_disk")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Save all",onClick:function(){function N(){return i("saveall2disk")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load all",onClick:function(){function N(){return i("saveall2network")}return N}()})],4):"None"})]})}),!!s||(0,e.createComponentVNode)(2,b)]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Section,{title:"Tech Info",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Tech Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Disk Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),Object.keys(l).map(function(N){return!(l[N].network_level>0||l[N].disk_level>0)||(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l[N].name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l[N].network_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l[N].disk_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Load to network",disabled:!u||!s,onClick:function(){function v(){return i("savetech2network",{tech:N})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load to disk",disabled:!u||!s,onClick:function(){function v(){return i("savetech2disk",{tech:N})}return v}()})]})]},N)})]})})})]})})}return y}(),b=r.LinkMenu=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.controllers;return(0,e.createComponentVNode)(2,t.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),p.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function d(){return i("linktonetworkcontroller",{target_controller:u.addr})}return d}()})})]},u.addr)})]})})}return y}()},37556:function(T,r,n){"use strict";r.__esModule=!0,r.DataDiskMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o="design",m="tech",b=function(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.act,l=d.disk_data;return l?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:l.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:l.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function h(){return s("updt_tech")}return h}()})})]}):null},y=function(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.act,l=d.disk_data;if(!l)return null;var h=l.name,N=l.lathe_types,v=l.materials,f=N.join(", ");return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:h}),f?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:f}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),v.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,g.name,0,{style:{"text-transform":"capitalize"}})," x ",g.amount]},g.name)}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function g(){return s("updt_design")}return g}()})})]})},B=function(c,p){var u=(0,a.useBackend)(p),d=u.act,s=u.data,l=s.disk_data;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Section,Object.assign({buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Erase",icon:"eraser",disabled:!l,onClick:function(){function h(){return d("erase_disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",icon:"eject",onClick:function(){function h(){d("eject_disk")}return h}()})],4)},c)))},k=function(c,p){var u=(0,a.useBackend)(p),d=u.data,s=u.act,l=d.disk_type,h=d.to_copy,N=c.title;return(0,e.createComponentVNode)(2,B,{title:N,children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:h.sort(function(v,f){return v.name.localeCompare(f.name)}).map(function(v){var f=v.name,g=v.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:f,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function V(){l===m?s("copy_tech",{id:g}):s("copy_design",{id:g})}return V}()})},g)})})})})},C=r.DataDiskMenu=function(){function i(c,p){var u=(0,a.useBackend)(p),d=u.data,s=d.disk_type,l=d.disk_data;if(!s)return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",children:"No disk loaded."});switch(s){case o:return l?(0,e.createComponentVNode)(2,B,{title:"Design Disk",children:(0,e.createComponentVNode)(2,y)}):(0,e.createComponentVNode)(2,k,{title:"Design Disk"});case m:return l?(0,e.createComponentVNode)(2,B,{title:"Technology Disk",children:(0,e.createComponentVNode)(2,b)}):(0,e.createComponentVNode)(2,k,{title:"Technology Disk"});default:return(0,e.createFragment)([(0,e.createTextVNode)("UNRECOGNIZED DISK TYPE")],4)}}return i}()},58147:function(T,r,n){"use strict";r.__esModule=!0,r.DeconstructionMenu=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=r.DeconstructionMenu=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.data,c=C.act,p=i.tech_levels,u=i.loaded_item,d=i.linked_destroy;return d?u?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Object Analysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Deconstruct",icon:"microscope",onClick:function(){function s(){c("deconstruct")}return s}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Eject",icon:"eject",onClick:function(){function s(){c("eject_item")}return s}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:u.name})})}),(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Current Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Object Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"New Level"})]}),p.map(function(s){return(0,e.createComponentVNode)(2,b,{techLevel:s},s.id)})]})})],4):(0,e.createComponentVNode)(2,o.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,o.Section,{title:"Deconstruction Menu",children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}return y}(),b=function(B,k){var C=B.techLevel,i=C.name,c=C.desc,p=C.level,u=C.object_level,d=C.ui_icon,s=u!=null,l=s&&u>=p?Math.max(u,p+1):p;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:c})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:d})," ",i]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:p}),s?(0,e.createComponentVNode)(2,o.Table.Cell,{children:u}):(0,e.createComponentVNode)(2,o.Table.Cell,{className:"research-level-no-effect",children:"-"}),(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)([l!==p&&"upgraded-level"]),children:l})]})}},16830:function(T,r,n){"use strict";r.__esModule=!0,r.LatheCategory=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),m=r.LatheCategory=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.data,i=k.act,c=C.category,p=C.matching_designs,u=C.menu,d=u===4,s=d?"build":"imprint";return(0,e.createComponentVNode)(2,t.Section,{title:c,children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,t.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:p.map(function(l){var h=l.id,N=l.name,v=l.can_build,f=l.materials;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:N,disabled:v<1,onClick:function(){function g(){return i(s,{id:h,amount:1})}return g}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function g(){return i(s,{id:h,amount:5})}return g}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function g(){return i(s,{id:h,amount:10})}return g}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:f.map(function(g){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",g.is_red?"color-red":null,[g.amount,(0,e.createTextVNode)(" "),g.name],0)],0)})})]},h)})})]})}return b}()},70497:function(T,r,n){"use strict";r.__esModule=!0,r.LatheChemicalStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheChemicalStorage=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data,C=B.act,i=k.loaded_chemicals,c=k.menu===4;return(0,e.createComponentVNode)(2,t.Section,{title:"Chemical Storage",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Purge All",icon:"trash",onClick:function(){function p(){var u=c?"disposeallP":"disposeallI";C(u)}return p}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(p){var u=p.volume,d=p.name,s=p.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+u+" of "+d,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function l(){var h=c?"disposeP":"disposeI";C(h,{id:s})}return l}()})},s)})})]})}return m}()},70864:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMainMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),m=n(68198),b=r.LatheMainMenu=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.data,c=C.act,p=i.menu,u=i.categories,d=p===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:d+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,m.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:s,onClick:function(){function l(){c("setCategory",{category:s})}return l}()})},s)})})]})}return y}()},42878:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterialStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterialStorage=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data,C=B.act,i=k.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:i.map(function(c){var p=c.id,u=c.amount,d=c.name,s=function(){function v(f){var g=k.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";C(g,{id:p,amount:f})}return v}(),l=Math.floor(u/2e3),h=u<1,N=l===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:h?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",u," of ",d]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",l," sheet",N,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function v(){return s(1)}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function v(){return s("custom")}return v}()}),u>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function v(){return s(5)}return v}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function v(){return s(50)}return v}()})],0):null})]},p)})})})}return m}()},52662:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterials=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterials=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data,C=k.total_materials,i=k.max_materials,c=k.max_chemicals,p=k.total_chemicals;return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,e.createComponentVNode)(2,t.Table,{width:"auto",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C}),i?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+i}):null]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return m}()},9681:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(12644),m=n(70864),b=n(16830),y=n(42878),B=n(70497),k=["menu"];function C(d,s){if(d==null)return{};var l={};for(var h in d)if({}.hasOwnProperty.call(d,h)){if(s.includes(h))continue;l[h]=d[h]}return l}var i=t.Tabs.Tab,c=function(s,l){var h=(0,a.useBackend)(l),N=h.act,v=h.data,f=v.menu===o.MENU.LATHE?["nav_protolathe",v.submenu_protolathe]:["nav_imprinter",v.submenu_imprinter],g=f[0],V=f[1],S=s.menu,I=C(s,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,i,Object.assign({selected:V===S,onClick:function(){function L(){return N(g,{menu:S})}return L}()},I)))},p=function(s){switch(s){case o.PRINTER_MENU.MAIN:return(0,e.createComponentVNode)(2,m.LatheMainMenu);case o.PRINTER_MENU.SEARCH:return(0,e.createComponentVNode)(2,b.LatheCategory);case o.PRINTER_MENU.MATERIALS:return(0,e.createComponentVNode)(2,y.LatheMaterialStorage);case o.PRINTER_MENU.CHEMICALS:return(0,e.createComponentVNode)(2,B.LatheChemicalStorage)}},u=r.LatheMenu=function(){function d(s,l){var h=(0,a.useBackend)(l),N=h.data,v=N.menu,f=N.linked_lathe,g=N.linked_imprinter;return v===o.MENU.LATHE&&!f?(0,e.createComponentVNode)(2,t.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):v===o.MENU.IMPRINTER&&!g?(0,e.createComponentVNode)(2,t.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MAIN,icon:"bars",children:"Main Menu"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MATERIALS,icon:"layer-group",children:"Materials"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.CHEMICALS,icon:"flask-vial",children:"Chemicals"})]}),p(N.menu===o.MENU.LATHE?N.submenu_protolathe:N.submenu_imprinter)]})}return d}()},68198:function(T,r,n){"use strict";r.__esModule=!0,r.LatheSearch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheSearch=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function C(i,c){return k("search",{to_search:c})}return C}()})})}return m}()},81421:function(T,r,n){"use strict";r.__esModule=!0,r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),m=r.LinkMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.controllers;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),c.map(function(p){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:p.addr}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:p.net_id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function u(){return C("linktonetworkcontroller",{target_controller:p.addr})}return u}()})})]},p.addr)})]})})})})}return b}()},6256:function(T,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.SettingsMenu=function(){function y(B,k){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,b)]})}return y}(),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.sync,u=c.admin;return(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",align:"flex-start",children:(0,e.createComponentVNode)(2,t.Button,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){function d(){i("unlink")}return d}()})})})},b=function(B,k){var C=(0,a.useBackend)(k),i=C.data,c=C.act,p=i.linked_destroy,u=i.linked_lathe,d=i.linked_imprinter;return(0,e.createComponentVNode)(2,t.Section,{title:"Linked Devices",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){function s(){return c("find_device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destructive Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!p,content:p?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"destroy"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!u,content:u?"Unlink":"Undetected",onClick:function(){function s(){c("disconnect",{item:"lathe"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Circuit Imprinter",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!d,content:d?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"imprinter"})}return s}()})})]})})}},12644:function(T,r,n){"use strict";r.__esModule=!0,r.RndConsole=r.PRINTER_MENU=r.MENU=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),m=n(35840),b=n(37556),y=n(9681),B=n(81421),k=n(6256),C=n(58147),i=["menu"];function c(f,g){if(f==null)return{};var V={};for(var S in f)if({}.hasOwnProperty.call(f,S)){if(g.includes(S))continue;V[S]=f[S]}return V}var p=o.Tabs.Tab,u=r.MENU={MAIN:0,DISK:2,DESTROY:3,LATHE:4,IMPRINTER:5,SETTINGS:6},d=r.PRINTER_MENU={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},s=function(g){switch(g){case u.MAIN:return(0,e.createComponentVNode)(2,v);case u.DISK:return(0,e.createComponentVNode)(2,b.DataDiskMenu);case u.DESTROY:return(0,e.createComponentVNode)(2,C.DeconstructionMenu);case u.LATHE:case u.IMPRINTER:return(0,e.createComponentVNode)(2,y.LatheMenu);case u.SETTINGS:return(0,e.createComponentVNode)(2,k.SettingsMenu);default:return"UNKNOWN MENU"}},l=function(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.menu,A=g.menu,x=c(g,i);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p,Object.assign({selected:w===A,onClick:function(){function E(){return I("nav",{menu:A})}return E}()},x)))},h=r.RndConsole=function(){function f(g,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data;if(!L.linked)return(0,e.createComponentVNode)(2,B.LinkMenu);var w=L.menu,A=L.linked_destroy,x=L.linked_lathe,E=L.linked_imprinter,P=L.wait_message;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,l,{icon:"flask",menu:u.MAIN,children:"Research"}),!!A&&(0,e.createComponentVNode)(2,l,{icon:"microscope",menu:u.DESTROY,children:"Analyze"}),!!x&&(0,e.createComponentVNode)(2,l,{icon:"print",menu:u.LATHE,children:"Protolathe"}),!!E&&(0,e.createComponentVNode)(2,l,{icon:"memory",menu:u.IMPRINTER,children:"Imprinter"}),(0,e.createComponentVNode)(2,l,{icon:"floppy-disk",menu:u.DISK,children:"Disk"}),(0,e.createComponentVNode)(2,l,{icon:"cog",menu:u.SETTINGS,children:"Settings"})]}),s(w),(0,e.createComponentVNode)(2,N)]})})})}return f}(),N=function(g,V){var S=(0,a.useBackend)(V),I=S.data,L=I.wait_message;return L?(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay",children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay__Wrapper",children:(0,e.createComponentVNode)(2,o.NoticeBox,{color:"black",children:L})})}):null},v=function(g,V){var S=(0,a.useBackend)(V),I=S.data,L=I.tech_levels;return(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Level"})]}),L.map(function(w){var A=w.id,x=w.name,E=w.desc,P=w.level,j=w.ui_icon;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:E})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:j})," ",x]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P})]},A)})]})})}},29205:function(T,r,n){"use strict";r.__esModule=!0,r.RndNetController=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=r.RndNetController=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.ion,s=(0,t.useLocalState)(i,"mainTabIndex",0),l=s[0],h=s[1],N=function(){function v(f){switch(f){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return v}();return(0,e.createComponentVNode)(2,m.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:l===0,onClick:function(){function v(){return h(0)}return v}(),children:"Network Management"},"ConfigPage"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"floppy-disk",selected:l===1,onClick:function(){function v(){return h(1)}return v}(),children:"Design Management"},"DesignPage")]}),N(l)]})})}return k}(),y=function(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=(0,t.useLocalState)(i,"filterType","ALL"),s=d[0],l=d[1],h=u.network_password,N=u.network_name,v=u.devices,f=[];f.push(s),s==="MSC"&&(f.push("BCK"),f.push("PGN"));var g=s==="ALL"?v:v.filter(function(V){return f.indexOf(V.dclass)>-1});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Network Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Name",children:(0,e.createComponentVNode)(2,o.Button,{content:N||"Unset",selected:N,icon:"edit",onClick:function(){function V(){return p("network_name")}return V}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Password",children:(0,e.createComponentVNode)(2,o.Button,{content:h||"Unset",selected:h,icon:"lock",onClick:function(){function V(){return p("network_password")}return V}()})})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Connected Devices",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="ALL",onClick:function(){function V(){return l("ALL")}return V}(),icon:"network-wired",children:"All Devices"},"AllDevices"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="SRV",onClick:function(){function V(){return l("SRV")}return V}(),icon:"server",children:"R&D Servers"},"RNDServers"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="RDC",onClick:function(){function V(){return l("RDC")}return V}(),icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MFB",onClick:function(){function V(){return l("MFB")}return V}(),icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MSC",onClick:function(){function V(){return l("MSC")}return V}(),icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Unlink"})]}),g.map(function(V){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function S(){return p("unlink_device",{dclass:V.dclass,uid:V.id})}return S}()})})]},V.id)})]})]})],4)},B=function(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.designs,s=(0,t.useLocalState)(i,"searchText",""),l=s[0],h=s[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Design Management",children:[(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search for designs",mb:2,onInput:function(){function N(v,f){return h(f)}return N}()}),d.filter((0,a.createSearch)(l,function(N){return N.name})).map(function(N){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,content:N.name,checked:!N.blacklisted,onClick:function(){function v(){return p(N.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:N.uid})}return v}()},N.name)})]})}},63315:function(T,r,n){"use strict";r.__esModule=!0,r.RndServer=void 0;var e=n(89005),a=n(72253),t=n(44879),o=n(36036),m=n(98595),b=r.RndServer=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.active,s=u.network_name;return(0,e.createComponentVNode)(2,m.Window,{width:600,height:500,resizable:!0,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Section,{title:"Server Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Machine power",children:(0,e.createComponentVNode)(2,o.Button,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){function l(){return p("toggle_active")}return l}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Link status",children:s===null?(0,e.createComponentVNode)(2,o.Box,{color:"red",children:"Unlinked"}):(0,e.createComponentVNode)(2,o.Box,{color:"green",children:"Linked"})})]})}),s===null?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})})}return k}(),y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.network_name;return(0,e.createComponentVNode)(2,o.Section,{title:"Network Info",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Connected network ID",children:d}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function s(){return p("unlink")}return s}()})})]})})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.controllers;return(0,e.createComponentVNode)(2,o.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),d.map(function(s){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:s.netname}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function l(){return p("link",{addr:s.addr})}return l}()})})]},s.addr)})]})})}},26109:function(T,r,n){"use strict";r.__esModule=!0,r.RobotSelfDiagnosis=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(25328),b=function(k,C){var i=k/C;return i<=.2?"good":i<=.5?"average":"bad"},y=r.RobotSelfDiagnosis=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.data,p=c.component_data;return(0,e.createComponentVNode)(2,o.Window,{width:280,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:p.map(function(u,d){return(0,e.createComponentVNode)(2,t.Section,{title:(0,m.capitalize)(u.name),children:u.installed<=0?(0,e.createComponentVNode)(2,t.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:u.installed===-1?"Destroyed":"Missing"})})}):(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"72%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",color:b(u.brute_damage,u.max_damage),children:u.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:b(u.electronic_damage,u.max_damage),children:u.electronic_damage})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Powered",color:u.powered?"good":"bad",children:u.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:u.status?"good":"bad",children:u.status?"Yes":"No"})]})})]})},d)})})})}return B}()},97997:function(T,r,n){"use strict";r.__esModule=!0,r.RoboticsControlConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.RoboticsControlConsole=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.can_hack,u=c.safety,d=c.show_lock_all,s=c.cyborgs,l=s===void 0?[]:s;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:460,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!d&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){function h(){return i("arm",{})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:u,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function h(){return i("masslock",{})}return h}()})]}),(0,e.createComponentVNode)(2,b,{cyborgs:l,can_hack:p})]})})}return y}(),b=function(B,k){var C=B.cyborgs,i=B.can_hack,c=(0,a.useBackend)(k),p=c.act,u=c.data,d="Detonate";return u.detonate_cooldown>0&&(d+=" ("+u.detonate_cooldown+"s)"),C.length?C.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createFragment)([!!s.hackable&&!s.emagged&&(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){function l(){return p("hackbot",{uid:s.uid})}return l}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:s.locked_down?"unlock":"lock",color:s.locked_down?"good":"default",content:s.locked_down?"Release":"Lockdown",disabled:!u.auth,onClick:function(){function l(){return p("stopbot",{uid:s.uid})}return l}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:d,disabled:!u.auth||u.detonate_cooldown>0,color:"bad",onClick:function(){function l(){return p("killbot",{uid:s.uid})}return l}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Box,{color:s.status?"bad":s.locked_down?"average":"good",children:s.status?"Not Responding":s.locked_down?"Locked Down":"Nominal"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:(0,e.createComponentVNode)(2,t.Box,{children:s.locstring})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.health>50?"good":"bad",value:s.health/100})}),typeof s.charge=="number"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.charge>30?"good":"bad",value:s.charge/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Capacity",children:(0,e.createComponentVNode)(2,t.Box,{color:s.cell_capacity<3e4?"average":"good",children:s.cell_capacity})})],4)||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"No Power Cell"})}),!!s.is_hacked&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safeties",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"DISABLED"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Module",children:s.module}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:(0,e.createComponentVNode)(2,t.Box,{color:s.synchronization?"default":"average",children:s.synchronization||"None"})})]})},s.uid)}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cyborg units detected within access parameters."})}},54431:function(T,r,n){"use strict";r.__esModule=!0,r.Safe=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Safe=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.dial,s=u.open,l=u.locked,h=u.contents;return(0,e.createComponentVNode)(2,o.Window,{theme:"safe",width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving",children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,e.createComponentVNode)(2,t.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,e.createVNode)(1,"br"),s?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*d+"deg)","z-index":0}})]}),!s&&(0,e.createComponentVNode)(2,B)]})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.dial,s=u.open,l=u.locked,h=function(v,f){return(0,e.createComponentVNode)(2,t.Button,{disabled:s||f&&!l,icon:"arrow-"+(f?"right":"left"),content:(f?"Right":"Left")+" "+v,iconRight:f,onClick:function(){function g(){return p(f?"turnleft":"turnright",{num:v})}return g}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:l,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){function N(){return p("open")}return N}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[h(50),h(10),h(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[h(1,!0),h(10,!0),h(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:d})]})},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:d.map(function(s,l){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function h(){return p("retrieve",{index:l+1})}return h}(),children:[(0,e.createComponentVNode)(2,t.Box,{as:"img",src:s.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),s.name]}),(0,e.createVNode)(1,"br")],4,s)})})},B=function(C,i){return(0,e.createComponentVNode)(2,t.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,e.createComponentVNode)(2,t.Box,{children:["1. Turn the dial left to the first number.",(0,e.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,e.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,e.createVNode)(1,"br"),"4. Open the safe."]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},29740:function(T,r,n){"use strict";r.__esModule=!0,r.SatelliteControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SatelliteControl=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.satellites,p=i.notice,u=i.meteor_shield,d=i.meteor_shield_coverage,s=i.meteor_shield_coverage_max,l=i.meteor_shield_coverage_percentage;return(0,e.createComponentVNode)(2,o.Window,{width:475,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[u&&(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:l>=100?"good":"average",value:d,maxValue:s,children:[l," %"]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alert",color:"red",children:i.notice}),c.map(function(h){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+h.id,children:[h.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:h.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function N(){return C("toggle",{id:h.id})}return N}()})]},h.id)})]})})]})})}return b}()},44162:function(T,r,n){"use strict";r.__esModule=!0,r.SecureStorage=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),m=n(98595),b=n(36352),y=n(92986),B=r.SecureStorage=function(){function c(p,u){return(0,e.createComponentVNode)(2,m.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,C)})})})})}return c}(),k=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=window.event?p.which:p.keyCode;if(l===y.KEY_ENTER){p.preventDefault(),s("keypad",{digit:"E"});return}if(l===y.KEY_ESCAPE){p.preventDefault(),s("keypad",{digit:"C"});return}if(l===y.KEY_BACKSPACE){p.preventDefault(),s("backspace");return}if(l>=y.KEY_0&&l<=y.KEY_9){p.preventDefault(),s("keypad",{digit:l-y.KEY_0});return}if(l>=y.KEY_NUMPAD_0&&l<=y.KEY_NUMPAD_9){p.preventDefault(),s("keypad",{digit:l-y.KEY_NUMPAD_0});return}},C=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=l.locked,N=l.no_passcode,v=l.emagged,f=l.user_entered_code,g=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],V=N?"":h?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function S(I){return k(I,u)}return S}(),children:[(0,e.createComponentVNode)(2,o.Stack.Item,{height:7.3,children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+V]),height:"100%",children:v?"ERROR":f})}),(0,e.createComponentVNode)(2,o.Table,{children:g.map(function(S){return(0,e.createComponentVNode)(2,b.TableRow,{children:S.map(function(I){return(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,i,{number:I})},I)})},S[0])})})]})},i=function(p,u){var d=(0,t.useBackend)(u),s=d.act,l=d.data,h=p.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:h,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+h]),onClick:function(){function N(){return s("keypad",{digit:h})}return N}()})}},6272:function(T,r,n){"use strict";r.__esModule=!0,r.SecurityRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(3939),y=n(321),B=n(5485),k=n(22091),C={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},i=function(f,g){(0,b.modalOpen)(f,"edit",{field:g.edit,value:g.value})},c=r.SecurityRecords=function(){function v(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.loginState,w=I.currentPage,A;if(L.logged_in)w===1?A=(0,e.createComponentVNode)(2,u):w===2&&(A=(0,e.createComponentVNode)(2,l));else return(0,e.createComponentVNode)(2,m.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});return(0,e.createComponentVNode)(2,m.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,p),A]})})]})}return v}(),p=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.currentPage,w=I.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:L===1,onClick:function(){function A(){return S("page",{page:1})}return A}(),children:"List Records"}),L===2&&w&&!w.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:L===2,children:["Record: ",w.fields[0].value]})]})})},u=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.records,w=(0,t.useLocalState)(g,"searchText",""),A=w[0],x=w[1],E=(0,t.useLocalState)(g,"sortId","name"),P=E[0],j=E[1],M=(0,t.useLocalState)(g,"sortOrder",!0),O=M[0],D=M[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,s)}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"SecurityRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,d,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,d,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,d,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,d,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,d,{id:"status",children:"Criminal Status"})]}),L.filter((0,a.createSearch)(A,function(F){return F.name+"|"+F.id+"|"+F.rank+"|"+F.fingerprint+"|"+F.status})).sort(function(F,W){var U=O?1:-1;return F[P].localeCompare(W[P])*U}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+C[F.status],onClick:function(){function W(){return S("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return W}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",F.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.fingerprint}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.status})]},F.id)})]})})})],4)},d=function(f,g){var V=(0,t.useLocalState)(g,"sortId","name"),S=V[0],I=V[1],L=(0,t.useLocalState)(g,"sortOrder",!0),w=L[0],A=L[1],x=f.id,E=f.children;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:S!==x&&"transparent",fluid:!0,onClick:function(){function P(){S===x?A(!w):(I(x),A(!0))}return P}(),children:[E,S===x&&(0,e.createComponentVNode)(2,o.Icon,{name:w?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},s=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.isPrinting,w=(0,t.useLocalState)(g,"searchText",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:"0.25rem",content:"New Record",icon:"plus",onClick:function(){function E(){return S("new_general")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Cell Log",onClick:function(){function E(){return(0,b.modalOpen)(g,"print_cell_log")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",fluid:!0,onInput:function(){function E(P,j){return x(j)}return E}()})})]})},l=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.isPrinting,w=I.general,A=I.security;return!w||!w.fields?(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"General records lost!"}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Record",onClick:function(){function x(){return S("print_record")}return x}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated with this crew member!",tooltipPosition:"bottom-start",content:"Delete Record",onClick:function(){function x(){return S("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,h)})}),!A||!A.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function x(){return S("new_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Security records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:A.empty,content:"Delete Record",onClick:function(){function x(){return S("delete_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:A.fields.map(function(x,E){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:x.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(x.value),!!x.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:x.line_break?"1rem":"initial",onClick:function(){function P(){return i(g,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,N)],4)],0)},h=function(f,g){var V=(0,t.useBackend)(g),S=V.data,I=S.general;return!I||!I.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:I.fields.map(function(L,w){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(""+L.value),!!L.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:L.line_break?"1rem":"initial",onClick:function(){function A(){return i(g,L)}return A}()})]},w)})})}),!!I.has_photos&&I.photos.map(function(L,w){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:L,style:{width:"96px","margin-top":"5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",w+1]},w)})]})},N=function(f,g){var V=(0,t.useBackend)(g),S=V.act,I=V.data,L=I.security;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function w(){return(0,b.modalOpen)(g,"comment_add")}return w}()}),children:L.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):L.comments.map(function(w,A){return(0,e.createComponentVNode)(2,o.Box,{preserveWhitespace:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:w.header||"Auto-generated"}),(0,e.createVNode)(1,"br"),w.text||w,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function x(){return S("comment_delete",{id:A+1})}return x}()})]},A)})})})}},5099:function(T,r,n){"use strict";r.__esModule=!0,r.SeedExtractor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=n(98595),b=n(3939);function y(d,s){var l=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(l)return(l=l.call(d)).next.bind(l);if(Array.isArray(d)||(l=B(d))||s&&d&&typeof d.length=="number"){l&&(d=l);var h=0;return function(){return h>=d.length?{done:!0}:{done:!1,value:d[h++]}}}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 B(d,s){if(d){if(typeof d=="string")return k(d,s);var l={}.toString.call(d).slice(8,-1);return l==="Object"&&d.constructor&&(l=d.constructor.name),l==="Map"||l==="Set"?Array.from(d):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?k(d,s):void 0}}function k(d,s){(s==null||s>d.length)&&(s=d.length);for(var l=0,h=Array(s);l=A},N=function(w,A){return w<=A},v=s.split(" "),f=[],g=function(){var w=I.value,A=w.split(":");if(A.length===0)return 0;if(A.length===1)return f.push(function(P){return(P.name+" ("+P.variant+")").toLocaleLowerCase().includes(A[0].toLocaleLowerCase())}),0;if(A.length>2)return{v:function(){function P(j){return!1}return P}()};var x,E=l;if(A[1][A[1].length-1]==="-"?(E=N,x=Number(A[1].substring(0,A[1].length-1))):A[1][A[1].length-1]==="+"?(E=h,x=Number(A[1].substring(0,A[1].length-1))):x=Number(A[1]),isNaN(x))return{v:function(){function P(j){return!1}return P}()};switch(A[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":f.push(function(P){return E(P.lifespan,x)});break;case"e":case"end":case"endurance":f.push(function(P){return E(P.endurance,x)});break;case"m":case"mat":case"maturation":f.push(function(P){return E(P.maturation,x)});break;case"pr":case"prod":case"production":f.push(function(P){return E(P.production,x)});break;case"y":case"yield":f.push(function(P){return E(P.yield,x)});break;case"po":case"pot":case"potency":f.push(function(P){return E(P.potency,x)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":f.push(function(P){return E(P.amount,x)});break;default:return{v:function(){function P(j){return!1}return P}()}}},V,S=y(v),I;!(I=S()).done;)if(V=g(),V!==0&&V)return V.v;return function(L){for(var w=0,A=f;w=1?Number(E):1)}return A}()})]})]})}},17474:function(T,r,n){"use strict";r.__esModule=!0,r.Shop=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(25328),m=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(h){switch(h){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);default:return"\u041E\u0428\u0418\u0411\u041A\u0410, \u0421\u041E\u041E\u0411\u0429\u0418\u0422\u0415 \u0420\u0410\u0417\u0420\u0410\u0411\u041E\u0422\u0427\u0418\u041A\u0423"}},C=r.Shop=function(){function l(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.cart,S=(0,m.useLocalState)(N,"tabIndex",0),I=S[0],L=S[1];return(0,e.createComponentVNode)(2,y.Window,{width:900,height:600,theme:"abductor",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Tabs,{children:[(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:I===0,onClick:function(){function w(){L(0)}return w}(),icon:"store",children:"\u0422\u043E\u0440\u0433\u043E\u0432\u043B\u044F"},"PurchasePage"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:I===1,onClick:function(){function w(){L(1)}return w}(),icon:"shopping-cart",children:["\u041A\u043E\u0440\u0437\u0438\u043D\u0430 ",V&&V.length?"("+V.length+")":""]},"Cart")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(I)})]})})]})}return l}(),i=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.cash,S=g.cats,I=(0,m.useLocalState)(N,"shopItems",S[0].items),L=I[0],w=I[1],A=(0,m.useLocalState)(N,"showDesc",1),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430: "+V+"\u043A",buttons:(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438",checked:x,onClick:function(){function P(){return E(!x)}return P}()})})})}),(0,e.createComponentVNode)(2,b.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:S.map(function(P){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:P.items===L,onClick:function(){function j(){w(P.items)}return j}(),children:P.cat},P)})})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:L.map(function(P){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,p,{i:P,showDecription:x},(0,o.decodeHtmlEntities)(P.name))},(0,o.decodeHtmlEntities)(P.name))})})})})]})]})},c=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=g.cart,S=g.cash,I=g.cart_price,L=(0,m.useLocalState)(N,"showDesc",0),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430: "+S+"\u043A",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438",checked:w,onClick:function(){function x(){return A(!w)}return x}()}),(0,e.createComponentVNode)(2,b.Button,{content:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",icon:"trash",onClick:function(){function x(){return f("empty_cart")}return x}(),disabled:!V}),(0,e.createComponentVNode)(2,b.Button,{content:"\u041E\u043F\u043B\u0430\u0442\u0438\u0442\u044C ("+I+"\u043A)",icon:"shopping-cart",onClick:function(){function x(){return f("purchase_cart")}return x}(),disabled:!V||I>S})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:V?V.map(function(x){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,p,{i:x,showDecription:w,buttons:(0,e.createComponentVNode)(2,d,{i:x})})},(0,o.decodeHtmlEntities)(x.name))}):(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:"\u0412\u0430\u0448\u0430 \u043A\u043E\u0440\u0437\u0438\u043D\u0430 \u043F\u0443\u0441\u0442\u0430!"})})})})})},p=function(h,N){var v=h.i,f=h.showDecription,g=f===void 0?1:f,V=h.buttons,S=V===void 0?(0,e.createComponentVNode)(2,u,{i:v}):V;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(v.name),showBottom:g,buttons:S,children:[g?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(v.desc)}):null,g?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(v.content)}):null]})},u=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=h.i,S=g.cash;return(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",content:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443 ("+V.cost+" \u041A\u0438\u043A\u0438\u0440\u0438\u0434\u0438\u0442\u043E\u0432)",color:V.limit!==-1&&"red",tooltip:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0442\u043E\u0432\u0430\u0440 \u0432 \u043A\u043E\u0440\u0437\u0438\u043D\u0443, \u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0432 \u043E\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043B\u043E \u0434\u0430\u043D\u043D\u043E\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430. \u0426\u0435\u043D\u0430 \u0442\u043E\u0432\u0430\u0440\u0430 \u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438 \u043E\u0442 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u044B\u0445 \u0446\u0435\u043D\u043D\u043E\u0441\u0442\u0435\u0439 \u0432 \u0420\u0430\u0441\u0447\u0438\u0447\u0435\u0442\u0447\u0438\u043A\u0438\u043A\u0435.",tooltipPosition:"left",onClick:function(){function I(){return f("add_to_cart",{item:V.obj_path})}return I}(),disabled:V.cost>S||V.limit!==-1&&V.purchased>=V.limit||V.is_time_available===!1})},d=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=h.i;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+V.cost*V.amount+"\u043A)",tooltip:"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u043A\u043E\u0440\u0437\u0438\u043D\u044B.",tooltipPosition:"left",onClick:function(){function S(){return f("remove_from_cart",{item:V.obj_path})}return S}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",ml:"5px",onClick:function(){function S(){return f("set_cart_item_quantity",{item:V.obj_path,quantity:--V.amount})}return S}(),disabled:V.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:V.amount,width:"45px",tooltipPosition:"bottom-end",onCommit:function(){function S(I,L){return f("set_cart_item_quantity",{item:V.obj_path,quantity:L})}return S}(),disabled:V.limit!==-1&&V.amount>=V.limit&&V.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:V.limit===0&&"Discount already redeemed!",onClick:function(){function S(){return f("set_cart_item_quantity",{item:V.obj_path,quantity:++V.amount})}return S}(),disabled:V.limit!==-1&&V.amount>=V.limit})]})},s=function(h,N){var v=(0,m.useBackend)(N),f=v.act,g=v.data,V=h.pack;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,horizontal:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{width:"70%",children:V.content_images.map(function(S){return(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+S,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})},S.ref)})})})}},2916:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ShuttleConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:i.status?i.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!i.shuttle&&(!!i.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:i.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function p(){return C("move",{move:c.id})}return p}()},c.name)})})||(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:"red",children:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!i.admin_controlled&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorization",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!i.status,onClick:function(){function c(){return C("request")}return c}()})})],0))]})})})})}return b}()},39401:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleManipulator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.ShuttleManipulator=function(){function k(C,i){var c=(0,a.useLocalState)(i,"tabIndex",0),p=c[0],u=c[1],d=function(){function s(l){switch(l){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,y);case 2:return(0,e.createComponentVNode)(2,B);default:return"WE SHOULDN'T BE HERE!"}}return s}();return(0,e.createComponentVNode)(2,o.Window,{width:650,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===0,onClick:function(){function s(){return u(0)}return s}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===1,onClick:function(){function s(){return u(1)}return s}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===2,onClick:function(){function s(){return u(2)}return s}(),icon:"tools",children:"Modification"},"Modification")]}),d(p)]})})})}return k}(),b=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID",children:s.id}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Timer",children:s.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Mode",children:s.mode}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Status",children:s.status}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function l(){return p("jump_to",{type:"mobile",id:s.id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function l(){return p("fast_travel",{id:s.id})}return l}()})]})]})},s.name)})})},y=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.templates_tabs,s=u.existing_shuttle,l=u.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:d.map(function(h){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===s.id,icon:"file",onClick:function(){function N(){return p("select_template_category",{cat:h})}return N}(),children:h},h)})}),!!s&&l[s.id].templates.map(function(h){return(0,e.createComponentVNode)(2,t.Section,{title:h.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[h.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:h.description}),h.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:h.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Load Template",icon:"download",onClick:function(){function N(){return p("select_template",{shuttle_id:h.shuttle_id})}return N}()})})]})},h.name)})]})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.existing_shuttle,s=u.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[d?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+d.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d.status}),d.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:d.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function l(){return p("jump_to",{type:"mobile",id:d.id})}return l}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: None"}),s?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: "+s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:s.description}),s.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:s.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Preview",icon:"eye",onClick:function(){function l(){return p("preview",{shuttle_id:s.shuttle_id})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function l(){return p("load",{shuttle_id:s.shuttle_id})}return l}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},88284:function(T,r,n){"use strict";r.__esModule=!0,r.Sleeper=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],C=r.Sleeper=function(){function l(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.hasOccupant,S=V?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,s);return(0,e.createComponentVNode)(2,m.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,m.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:S}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,u)})]})})})}return l}(),i=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,d)],4)},c=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.occupant,S=g.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:"Auto-eject if dead:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{icon:S?"toggle-on":"toggle-off",selected:S,content:S?"On":"Off",onClick:function(){function I(){return f("auto_eject_dead_"+(S?"off":"on"))}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function I(){return f("ejectify")}return I}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:V.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxHealth,value:V.health/V.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]},children:(0,a.round)(V.health,0)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:b[V.stat][0],children:b[V.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxTemp,value:V.bodyTemperature/V.maxTemp,color:k[V.temperatureSuitability+3],children:[(0,a.round)(V.btCelsius,0),"\xB0C,",(0,a.round)(V.btFaren,0),"\xB0F"]})}),!!V.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.bloodMax,value:V.bloodLevel/V.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[V.bloodPercent,"%, ",V.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[V.pulse," BPM"]})],4)]})})},p=function(h,N){var v=(0,t.useBackend)(N),f=v.data,g=f.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:y.map(function(V,S){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:g[V[1]]/100,ranges:B,children:(0,a.round)(g[V[1]],0)},S)},S)})})})},u=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.hasOccupant,S=g.isBeakerLoaded,I=g.beakerMaxSpace,L=g.beakerFreeSpace,w=g.dialysis,A=w&&L>0;return(0,e.createComponentVNode)(2,o.Section,{title:"Dialysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!S||L<=0||!V,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return f("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!S,icon:"eject",content:"Eject",onClick:function(){function x(){return f("removebeaker")}return x}()})],4),children:S?(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:L/I,ranges:{good:[.5,1/0],average:[.25,.5],bad:[-1/0,.25]},children:[L,"u"]})})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No beaker loaded."})})},d=function(h,N){var v=(0,t.useBackend)(N),f=v.act,g=v.data,V=g.occupant,S=g.chemicals,I=g.maxchem,L=g.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:S.map(function(w,A){var x="",E;return w.overdosing?(x="bad",E=(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle"}),"\xA0 Overdosing!"]})):w.od_warning&&(x="average",E=(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle"}),"\xA0 Close to overdosing"]})),(0,e.createComponentVNode)(2,o.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{title:w.title,level:"3",mx:"0",lineHeight:"18px",buttons:E,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:w.occ_amount/I,color:x,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[w.pretty_amount,"/",I,"u"]}),L.map(function(P,j){return(0,e.createComponentVNode)(2,o.Button,{disabled:!w.injectable||w.occ_amount+P>I||V.stat===2,icon:"syringe",content:"Inject "+P+"u",title:"Inject "+P+"u of "+w.title+" into the occupant",mb:"0",height:"19px",onClick:function(){function M(){return f("chemical",{chemid:w.id,amount:P})}return M}()},j)})]})})},A)})})},s=function(h,N){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},21597:function(T,r,n){"use strict";r.__esModule=!0,r.SlotMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SlotMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;if(i.money===null)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:90,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Could not scan your card or could not find account!"}),(0,e.createComponentVNode)(2,t.Box,{children:"Please wear or hold your ID and try again."})]})})});var c;return i.plays===1?c=i.plays+" player has tried their luck today!":c=i.plays+" players have tried their luck today!",(0,e.createComponentVNode)(2,o.Window,{width:300,height:151,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{lineHeight:2,children:c}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Credits Remaining",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:i.working,content:i.working?"Spinning...":"Spin",onClick:function(){function p(){return C("spin")}return p}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:i.resultlvl,children:i.result})]})})})}return b}()},46348:function(T,r,n){"use strict";r.__esModule=!0,r.Smartfridge=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Smartfridge=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.secure,p=i.can_dry,u=i.drying,d=i.contents;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Secure Access: Please have your identification ready."}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:p?"Drying rack":"Contents",buttons:!!p&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){function s(){return C("drying")}return s}()}),children:[!d&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cookie-bite",size:5,color:"brown"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No products loaded."]})}),!!d&&d.slice().sort(function(s,l){return s.display_name.localeCompare(l.display_name)}).map(function(s){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"55%",children:s.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"25%",children:["(",s.quantity," in stock)"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:13,children:[(0,e.createComponentVNode)(2,t.Button,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){function l(){return C("vend",{index:s.vend,amount:1})}return l}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:s.quantity,step:1,stepPixelSize:3,onChange:function(){function l(h,N){return C("vend",{index:s.vend,amount:N})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function l(){return C("vend",{index:s.vend,amount:s.quantity})}return l}()})]})]},s)})]})]})})})}return b}()},86162:function(T,r,n){"use strict";r.__esModule=!0,r.Smes=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),m=n(98595),b=1e3,y=r.Smes=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.capacityPercent,d=p.capacity,s=p.charge,l=p.inputAttempt,h=p.inputting,N=p.inputLevel,v=p.inputLevelMax,f=p.inputAvailable,g=p.outputPowernet,V=p.outputAttempt,S=p.outputting,I=p.outputLevel,L=p.outputLevelMax,w=p.outputUsed,A=u>=100&&"good"||h&&"average"||"bad",x=S&&"good"||s>0&&"average"||"bad";return(0,e.createComponentVNode)(2,m.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stored Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:u*.01,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l?"sync-alt":"times",selected:l,onClick:function(){function E(){return c("tryinput")}return E}(),children:l?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:u>=100&&"Fully Charged"||h&&"Charging"||"Not Charging"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Input",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:N===0,onClick:function(){function E(){return c("input",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:N===0,onClick:function(){function E(){return c("input",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:N/b,fillValue:f/b,minValue:0,maxValue:v/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,j){return c("input",{target:j*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:N===v,onClick:function(){function E(){return c("input",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:N===v,onClick:function(){function E(){return c("input",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(f)})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Output Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:V?"power-off":"times",selected:V,onClick:function(){function E(){return c("tryoutput")}return E}(),children:V?"On":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:x,children:g?S?"Sending":s>0?"Not Sending":"No Charge":"Not Connected"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Output",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:I===0,onClick:function(){function E(){return c("output",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:I===0,onClick:function(){function E(){return c("output",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:I/b,minValue:0,maxValue:L/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,j){return c("output",{target:j*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:I===L,onClick:function(){function E(){return c("output",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:I===L,onClick:function(){function E(){return c("output",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Outputting",children:(0,o.formatPower)(w)})]})})]})})})}return B}()},63584:function(T,r,n){"use strict";r.__esModule=!0,r.SolarControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SolarControl=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=0,p=1,u=2,d=i.generated,s=i.generated_ratio,l=i.tracking_state,h=i.tracking_rate,N=i.connected_panels,v=i.connected_tracker,f=i.cdir,g=i.direction,V=i.rotating_direction;return(0,e.createComponentVNode)(2,o.Window,{width:490,height:277,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){function S(){return C("refresh")}return S}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar tracker",color:v?"good":"bad",children:v?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:N>0?"good":"bad",children:N})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power output",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:s,children:d+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[f,"\xB0 (",g,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[l===u&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),l===p&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",h,"\xB0/h (",V,")"," "]}),l===c&&(0,e.createComponentVNode)(2,t.Box,{children:" Tracker offline "})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[l!==u&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(){function S(I,L){return C("cdir",{cdir:L})}return S}()}),l===u&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:l===c,onClick:function(){function S(){return C("track",{track:c})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:l===p,onClick:function(){function S(){return C("track",{track:p})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:l===u,disabled:!v,onClick:function(){function S(){return C("track",{track:u})}return S}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[l===p&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:h,format:function(){function S(I){var L=Math.sign(I)>0?"+":"-";return L+Math.abs(I)}return S}(),onDrag:function(){function S(I,L){return C("tdir",{tdir:L})}return S}()}),l===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),l===u&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}return b}()},38096:function(T,r,n){"use strict";r.__esModule=!0,r.SpawnersMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SpawnersMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.spawners||[];return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{children:c.map(function(p){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:p.name+" ("+p.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function u(){return C("jump",{ID:p.uids})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function u(){return C("spawn",{ID:p.uids})}return u}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:p.desc}),!!p.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:p.fluff}),!!p.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:p.important_info})]},p.name)})})})})}return b}()},30586:function(T,r,n){"use strict";r.__esModule=!0,r.SpecMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SpecMenu=function(){function C(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:1100,height:600,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return C}(),b=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("hemomancer")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Vampiric claws",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood Barrier",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood tendrils",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Sanguine pool",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Predator senses",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood eruption",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"The blood bringers rite",16),(0,e.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)]})})},y=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("umbrae")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Cloak of darkness",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow anchor",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow snare",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Dark passage",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Extinguish",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Eternal darkness",16),(0,e.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,e.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16)]})})},B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("gargantua")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rejuvenate",16),(0,e.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Seismic stomp",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood rush",16),(0,e.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell II",16),(0,e.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Overwhelming force",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Demonic grasp",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Charge",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Desecrated Duel",16),(0,e.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4)]})})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function l(){return u("dantalion")}return l}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Enthrall",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall cap",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall commune",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Subspace swap",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Pacify",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Decoy",16),(0,e.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rally thralls",16),(0,e.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood bond",16),(0,e.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,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Mass Hysteria",16),(0,e.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4)]})})}},95152:function(T,r,n){"use strict";r.__esModule=!0,r.StackCraft=void 0;var e=n(89005),a=n(72253),t=n(88510),o=n(64795),m=n(25328),b=n(98595),y=n(36036),B=r.StackCraft=function(){function s(){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:500,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return s}(),k=function(l,h){var N=(0,a.useBackend)(h),v=N.data,f=v.amount,g=v.recipes,V=(0,a.useLocalState)(h,"searchText",""),S=V[0],I=V[1],L=C(g,(0,m.createSearch)(S)),w=(0,a.useLocalState)(h,"",!1),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,title:"Amount: "+f,buttons:(0,e.createFragment)([A&&(0,e.createComponentVNode)(2,y.Input,{width:12.5,value:S,placeholder:"Find recipe",onInput:function(){function E(P,j){return I(j)}return E}()}),(0,e.createComponentVNode)(2,y.Button,{ml:.5,tooltip:"Search",tooltipPosition:"bottom-end",icon:"magnifying-glass",selected:A,onClick:function(){function E(){return x(!A)}return E}()})],0),children:L?(0,e.createComponentVNode)(2,u,{recipes:L}):(0,e.createComponentVNode)(2,y.NoticeBox,{children:"No recipes found!"})})},C=function s(l,h){var N=(0,o.flow)([(0,t.map)(function(v){var f=v[0],g=v[1];return i(g)?h(f)?v:[f,s(g,h)]:h(f)?v:[f,void 0]}),(0,t.filter)(function(v){var f=v[0],g=v[1];return g!==void 0}),(0,t.sortBy)(function(v){var f=v[0],g=v[1];return f}),(0,t.sortBy)(function(v){var f=v[0],g=v[1];return!i(g)}),(0,t.reduce)(function(v,f){var g=f[0],V=f[1];return v[g]=V,v},{})])(Object.entries(l));return Object.keys(N).length?N:void 0},i=function(l){return l.uid===void 0},c=function(l,h){return l.required_amount>h?0:Math.floor(h/l.required_amount)},p=function(l,h){for(var N=(0,a.useBackend)(h),v=N.act,f=l.recipe,g=l.max_possible_multiplier,V=Math.min(g,Math.floor(f.max_result_amount/f.result_amount)),S=[5,10,25],I=[],L=function(){var E=A[w];V>=E&&I.push((0,e.createComponentVNode)(2,y.Button,{bold:!0,translucent:!0,fontSize:.85,width:"32px",content:E*f.result_amount+"x",onClick:function(){function P(){return v("make",{recipe_uid:f.uid,multiplier:E})}return P}()}))},w=0,A=S;w1?I+"x ":"",P=L>1?"s":"",j=""+E+V,M=L+" sheet"+P,O=c(S,g);return(0,e.createComponentVNode)(2,y.ImageButton,{fluid:!0,base64:x,imageSize:32,disabled:!O,tooltip:M,buttons:w>1&&O>1&&(0,e.createComponentVNode)(2,p,{recipe:S,max_possible_multiplier:O}),onClick:function(){function D(){return v("make",{recipe_uid:A,multiplier:1})}return D}(),children:j})}},38307:function(T,r,n){"use strict";r.__esModule=!0,r.StationAlertConsoleContent=r.StationAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.StationAlertConsole=function(){function y(){return(0,e.createComponentVNode)(2,o.Window,{width:325,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b)})})}return y}(),b=r.StationAlertConsoleContent=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.data,c=i.alarms||[],p=c.Fire||[],u=c.Atmosphere||[],d=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[p.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),p.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Atmospherics Alarms",children:(0,e.createVNode)(1,"ul",null,[u.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),u.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Alarms",children:(0,e.createVNode)(1,"ul",null,[d.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),d.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)})],4)}return y}()},96091:function(T,r,n){"use strict";r.__esModule=!0,r.StationTraitsPanel=void 0;var e=n(89005),a=n(88510),t=n(42127),o=n(72253),m=n(36036),b=n(98595),y=function(i){return i[i.SetupFutureStationTraits=0]="SetupFutureStationTraits",i[i.ViewStationTraits=1]="ViewStationTraits",i}(y||{}),B=function(c,p){var u=(0,o.useBackend)(p),d=u.act,s=u.data,l=s.future_station_traits,h=(0,o.useLocalState)(p,"selectedFutureTrait",null),N=h[0],v=h[1],f=Object.fromEntries(s.valid_station_traits.map(function(V){return[V.name,V.path]})),g=Object.keys(f);return g.sort(),(0,e.createComponentVNode)(2,m.Box,{children:[(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m.Dropdown,{displayText:!N&&"Select trait to add...",onSelected:v,options:g,selected:N,width:"100%"})}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:"green",icon:"plus",onClick:function(){function V(){if(N){var S=f[N],I=[S];if(l){var L,w=l.map(function(A){return A.path});if(w.indexOf(S)!==-1)return;I=(L=I).concat.apply(L,w)}d("setup_future_traits",{station_traits:I})}}return V}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,m.Divider),Array.isArray(l)?l.length>0?(0,e.createComponentVNode)(2,m.Stack,{vertical:!0,fill:!0,children:l.map(function(V){return(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:V.name}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button,{color:"red",icon:"times",onClick:function(){function S(){d("setup_future_traits",{station_traits:(0,a.filterMap)(l,function(I){if(I.path!==V.path)return I.path})})}return S}(),children:"Delete"})})]})},V.path)})}):(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,m.Button,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){function V(){return d("clear_future_traits")}return V}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,m.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,m.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function V(){return d("setup_future_traits",{station_traits:[]})}return V}(),children:"Prevent station traits from running next round"})]})]})},k=function(c,p){var u=(0,o.useBackend)(p),d=u.act,s=u.data;return s.current_traits.length>0?(0,e.createComponentVNode)(2,m.Stack,{vertical:!0,fill:!0,children:s.current_traits.map(function(l){return(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{grow:!0,children:l.name}),(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Button.Confirm,{content:"Revert",color:"red",disabled:s.too_late_to_revert||!l.can_revert,tooltip:!l.can_revert&&"This trait is not revertable."||s.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){function h(){return d("revert",{ref:l.ref})}return h}()})})]})},l.ref)})}):(0,e.createComponentVNode)(2,m.Box,{textAlign:"center",children:"There are no active station traits."})},C=r.StationTraitsPanel=function(){function i(c,p){var u=(0,o.useLocalState)(p,"station_traits_tab",y.ViewStationTraits),d=u[0],s=u[1],l;switch(d){case y.SetupFutureStationTraits:l=(0,e.createComponentVNode)(2,B);break;case y.ViewStationTraits:l=(0,e.createComponentVNode)(2,k);break;default:(0,t.exhaustiveCheck)(d)}return(0,e.createComponentVNode)(2,b.Window,{title:"Modify Station Traits",height:350,width:350,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,m.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,m.Stack.Item,{children:(0,e.createComponentVNode)(2,m.Tabs,{children:[(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"eye",selected:d===y.ViewStationTraits,onClick:function(){function h(){return s(y.ViewStationTraits)}return h}(),children:"View"}),(0,e.createComponentVNode)(2,m.Tabs.Tab,{icon:"edit",selected:d===y.SetupFutureStationTraits,onClick:function(){function h(){return s(y.SetupFutureStationTraits)}return h}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,m.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,m.Divider),l]})]})})})}return i}()},39409:function(T,r,n){"use strict";r.__esModule=!0,r.StripMenu=void 0;var e=n(89005),a=n(88510),t=n(79140),o=n(72253),m=n(36036),b=n(98595),y=5,B=9,k=function(N){return N===0?5:9},C="64px",i=function(N){return N[0]+"/"+N[1]},c=function(N){var v=N.align,f=N.children;return(0,e.createComponentVNode)(2,m.Box,{style:{position:"absolute",left:v==="left"?"6px":"48px","text-align":v,"text-shadow":"2px 2px 2px #000",top:"2px"},children:f})},p={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},u={eyes:{displayName:"eyewear",gridSpot:i([1,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,4]),image:"inventory-pda.png"}},d={eyes:{displayName:"eyewear",gridSpot:i([1,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,8]),image:"inventory-pda.png"}},s=function(h){return h[h.Completely=1]="Completely",h[h.Hidden=2]="Hidden",h}(s||{}),l=r.StripMenu=function(){function h(N,v){var f=(0,o.useBackend)(v),g=f.act,V=f.data,S=new Map;if(V.show_mode===0)for(var I=0,L=Object.keys(V.items);I=.01})},(0,a.sortBy)(function(w){return-w.amount})])(N.gases||[]),L=Math.max.apply(Math,[1].concat(I.map(function(w){return w.amount})));return(0,e.createComponentVNode)(2,B.Window,{width:550,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:f/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Relative EER",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:g,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(g)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(V),minValue:0,maxValue:i(1e4),ranges:{teal:[-1/0,i(80)],good:[i(80),i(373)],average:[i(373),i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(V)+" K"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(S),minValue:0,maxValue:i(5e4),ranges:{good:[i(1),i(300)],average:[-1/0,i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(S)+" kPa"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function w(){return h("back")}return w}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:I.map(function(w){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:(0,y.getGasLabel)(w.name),children:(0,e.createComponentVNode)(2,b.ProgressBar,{color:(0,y.getGasColor)(w.name),value:w.amount,minValue:0,maxValue:L,children:(0,o.toFixed)(w.amount,2)+"%"})},w.name)})})})})]})})})}},46029:function(T,r,n){"use strict";r.__esModule=!0,r.SyndicateComputerSimple=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.SyndicateComputerSimple=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i.rows.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.title,buttons:(0,e.createComponentVNode)(2,t.Button,{content:c.buttontitle,disabled:c.buttondisabled,tooltip:c.buttontooltip,tooltipPosition:"left",onClick:function(){function p(){return C(c.buttonact)}return p}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(p){return(0,e.createComponentVNode)(2,t.Box,{children:p},p)})})]},c.title)})})})}return b}()},36372:function(T,r,n){"use strict";r.__esModule=!0,r.TEG=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(B){return B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},b=r.TEG=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data;return c.error?(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[c.error,(0,e.createComponentVNode)(2,t.Button,{icon:"circle",content:"Recheck",onClick:function(){function p(){return i("check")}return p}()})]})})}):(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cold Loop ("+c.cold_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Inlet",children:[m(c.cold_inlet_temp)," K, ",m(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[m(c.cold_outlet_temp)," K, ",m(c.cold_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Hot Loop ("+c.hot_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Inlet",children:[m(c.hot_inlet_temp)," K, ",m(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[m(c.hot_outlet_temp)," K, ",m(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[m(c.output_power)," W",!!c.warning_switched&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}return y}()},23190:function(T,r,n){"use strict";r.__esModule=!0,r.TTSSeedsExplorerContent=r.TTSSeedsExplorer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(46095),m=n(98595),b={0:"Free",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV",5:"Tier V"},y={male:"\u041C\u0443\u0436\u0441\u043A\u043E\u0439",female:"\u0416\u0435\u043D\u0441\u043A\u0438\u0439"},B={\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"}},k=function(p,u,d,s){return s===void 0&&(s=null),p.map(function(l){var h,N=(h=l[s])!=null?h:l;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:u.includes(l),content:N,onClick:function(){function v(){u.includes(l)?d(u.filter(function(f){var g;return((g=f[s])!=null?g:f)!==l})):d([l].concat(u))}return v}()},N)})},C=r.TTSSeedsExplorer=function(){function c(){return(0,e.createComponentVNode)(2,m.Window,{width:1e3,height:685,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,i)})})})}return c}(),i=r.TTSSeedsExplorerContent=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l=d.data,h=l.providers,N=l.seeds,v=l.selected_seed,f=l.phrases,g=l.donator_level,V=l.character_gender,S=N.map(function(Y){return Y.category}).filter(function(Y,he,de){return de.indexOf(Y)===he}).sort(function(Y,he){return Y.localeCompare(he)}),I=N.map(function(Y){return Y.gender}).filter(function(Y,he,de){return de.indexOf(Y)===he}),L=N.map(function(Y){return Y.required_donator_level}).filter(function(Y,he,de){return de.indexOf(Y)===he}).sort(function(Y,he){return Y-he}).map(function(Y){return b[Y]}),w=(0,a.useLocalState)(u,"selectedProviders",h),A=w[0],x=w[1],E=(0,a.useLocalState)(u,"selectedGenders",I.includes(y[V])?[y[V]]:I),P=E[0],j=E[1],M=(0,a.useLocalState)(u,"selectedCategories",S),O=M[0],D=M[1],F=(0,a.useLocalState)(u,"selectedDonatorLevels",L.includes(b[g])?L.slice(0,L.indexOf(b[g])+1):L),W=F[0],U=F[1],K=(0,a.useLocalState)(u,"selectedPhrase",f[0]),G=K[0],$=K[1],Q=(0,a.useLocalState)(u,"searchtext",""),Z=Q[0],ie=Q[1],ne=(0,a.useLocalState)(u,"searchToggle",!1),se=ne[0],ve=ne[1],Ve=k(h,A,x,"name"),ge=k(I,P,j),Ce=k(S,O,D),oe=k(L,W,U),ce=(0,e.createComponentVNode)(2,t.Dropdown,{options:f,selected:G.replace(/(.{60})..+/,"$1..."),width:"21.3em",onSelected:function(){function Y(he){return $(he)}return Y}()}),te=(0,e.createFragment)([se&&(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435...",width:20,onInput:function(){function Y(he,de){return ie(de)}return Y}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"magnifying-glass",tooltip:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0438\u0441\u043A",tooltipPosition:"bottom-end",selected:se,onClick:function(){function Y(){return ve(!se)}return Y}()})],0),fe=N.sort(function(Y,he){var de=Y.name.toLowerCase(),Ne=he.name.toLowerCase();return de>Ne?1:de0&&v!==Y.name?"orange":"white",children:Y.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:v===Y.name?.5:.25,textAlign:"left",children:Y.category}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:v===Y.name?"white":B[Y.gender].color,textAlign:"left",children:(0,e.createComponentVNode)(2,t.Icon,{mx:1,size:1.2,name:B[Y.gender].icon})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:Y.required_donator_level>0&&(0,e.createFragment)([b[Y.required_donator_level],(0,e.createComponentVNode)(2,t.Icon,{ml:1,mr:2,name:"coins"})],0)})]},Y.name)});return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"30.25em",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u044B",children:Ve}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u043B",children:ge}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0422\u0438\u0440",children:oe}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:ce})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"times",disabled:O.length===0,onClick:function(){function Y(){return D([])}return Y}(),children:"\u0423\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451"}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",disabled:O.length===S.length,onClick:function(){function Y(){return D(S)}return Y}(),children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451"})],4),children:Ce})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.BlockQuote,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"11px",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,e.createComponentVNode)(2,t.Box,{mt:1.5,italic:!0,color:"gray",fontSize:"10px",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."})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0413\u043E\u043B\u043E\u0441\u0430 ("+fe.length+"/"+N.length+")",buttons:te,children:(0,e.createComponentVNode)(2,t.Table,{children:(0,e.createComponentVNode)(2,o.VirtualList,{children:ue})})})})],4)}return c}()},56441:function(T,r,n){"use strict";r.__esModule=!0,r.TachyonArrayContent=r.TachyonArray=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TachyonArray=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.records,u=p===void 0?[]:p,d=c.explosion_target,s=c.toxins_tech,l=c.printing;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shift's Target",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Toxins Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Administration",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print All Logs",disabled:!u.length||l,align:"center",onClick:function(){function h(){return i("print_logs")}return h}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){function h(){return i("delete_logs")}return h}()})]})]})}),u.length?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return y}(),b=r.TachyonArrayContent=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.records,u=p===void 0?[]:p;return(0,e.createComponentVNode)(2,t.Section,{title:"Logged Explosions",children:(0,e.createComponentVNode)(2,t.Flex,{children:(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Epicenter"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actual Size"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Theoretical Size"})]}),u.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.theoretical_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){function s(){return i("delete_record",{index:d.index})}return s}()})})]},d.index)})]})})})})}return y}()},1754:function(T,r,n){"use strict";r.__esModule=!0,r.Tank=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Tank=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c;return i.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:i.connected?"check":"times",content:i.connected?"Internals On":"Internals Off",selected:i.connected,onClick:function(){function p(){return C("internals")}return p}()})}):c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.createComponentVNode)(2,o.Window,{width:325,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tank Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:i.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:i.ReleasePressure===i.minReleasePressure,tooltip:"Min",onClick:function(){function p(){return C("pressure",{pressure:"min"})}return p}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(i.releasePressure),width:"65px",unit:"kPa",minValue:i.minReleasePressure,maxValue:i.maxReleasePressure,onChange:function(){function p(u,d){return C("pressure",{pressure:d})}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:i.ReleasePressure===i.maxReleasePressure,tooltip:"Max",onClick:function(){function p(){return C("pressure",{pressure:"max"})}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:i.ReleasePressure===i.defaultReleasePressure,tooltip:"Reset",onClick:function(){function p(){return C("pressure",{pressure:"reset"})}return p}()})]}),c]})})})})}return b}()},7579:function(T,r,n){"use strict";r.__esModule=!0,r.TankDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TankDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.o_tanks,p=i.p_tanks;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:c===0,icon:"arrow-circle-down",onClick:function(){function u(){return C("oxygen")}return u}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+p+")",disabled:p===0,icon:"arrow-circle-down",onClick:function(){function u(){return C("plasma")}return u}()})})]})})})}return b}()},16136:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsCore=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TcommsCore=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.ion,l=(0,a.useLocalState)(c,"tabIndex",0),h=l[0],N=l[1],v=function(){function f(g){switch(g){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return f}();return(0,e.createComponentVNode)(2,o.Window,{width:900,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[s===1&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"wrench",selected:h===0,onClick:function(){function f(){return N(0)}return f}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:h===1,onClick:function(){function f(){return N(1)}return f}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:h===2,onClick:function(){function f(){return N(2)}return f}(),children:"User Filtering"},"FilterPage")]}),v(h)]})})}return C}(),b=function(){return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},y=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.active,l=d.sectors_available,h=d.nttc_toggle_jobs,N=d.nttc_toggle_job_color,v=d.nttc_toggle_name_color,f=d.nttc_toggle_command_bold,g=d.nttc_job_indicator_type,V=d.nttc_setting_language,S=d.network_id;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"On":"Off",selected:s,icon:"power-off",onClick:function(){function I(){return u("toggle_active")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:l})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Radio Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcements",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"user-tag",onClick:function(){function I(){return u("nttc_toggle_jobs")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:N?"On":"Off",selected:N,icon:"clipboard-list",onClick:function(){function I(){return u("nttc_toggle_job_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function I(){return u("nttc_toggle_name_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:f?"On":"Off",selected:f,icon:"volume-up",onClick:function(){function I(){return u("nttc_toggle_command_bold")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Advanced",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcement Format",children:(0,e.createComponentVNode)(2,t.Button,{content:g||"Unset",selected:g,icon:"pencil-alt",onClick:function(){function I(){return u("nttc_job_indicator_type")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Language Conversion",children:(0,e.createComponentVNode)(2,t.Button,{content:V||"Unset",selected:V,icon:"globe",onClick:function(){function I(){return u("nttc_setting_language")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:S||"Unset",selected:S,icon:"server",onClick:function(){function I(){return u("network_id")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){function I(){return u("import")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function I(){return u("export")}return I}()})]})],4)},B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.link_password,l=d.relay_entries;return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linkage Password",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"lock",onClick:function(){function h(){return u("change_password")}return h}()})})}),(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Unlink"})]}),l.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.status===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Online"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Offline"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",onClick:function(){function N(){return u("unlink",{addr:h.addr})}return N}()})})]},h.addr)})]})]})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=p.data,s=d.filtered_users;return(0,e.createComponentVNode)(2,t.Section,{title:"User Filtering",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Add User",icon:"user-plus",onClick:function(){function l(){return u("add_filter")}return l}()}),children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"90%"},children:"User"}),(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),s.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function h(){return u("remove_filter",{user:l})}return h}()})})]},l)})]})})}},88046:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsRelay=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TcommsRelay=function(){function B(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.linked,d=p.active,s=p.network_id;return(0,e.createComponentVNode)(2,o.Window,{width:600,height:292,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Relay Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){function l(){return c("toggle_active")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"server",onClick:function(){function l(){return c("network_id")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:u===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),u===1?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})})}return B}(),b=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.linked_core_id,d=p.linked_core_addr,s=p.hidden_link;return(0,e.createComponentVNode)(2,t.Section,{title:"Link Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core ID",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hidden Link",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){function l(){return c("toggle_hidden_link")}return l}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function l(){return c("unlink")}return l}()})})]})})},y=function(k,C){var i=(0,a.useBackend)(C),c=i.act,p=i.data,u=p.cores;return(0,e.createComponentVNode)(2,t.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),u.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function s(){return c("link",{addr:d.addr})}return s}()})})]},d.addr)})]})})}},20802:function(T,r,n){"use strict";r.__esModule=!0,r.Teleporter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Teleporter=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.targetsTeleport?i.targetsTeleport:{},p=0,u=1,d=2,s=i.calibrated,l=i.calibrating,h=i.powerstation,N=i.regime,v=i.teleporterhub,f=i.target,g=i.locked,V=i.adv_beacon_allowed,S=i.advanced_beacon_locking;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:270,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:[(!h||!v)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[v,!h&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),h&&!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),h&&v&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Status",buttons:(0,e.createFragment)(!!V&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xA0"}),(0,e.createComponentVNode)(2,t.Button,{selected:S,icon:S?"toggle-on":"toggle-off",content:S?"Enabled":"Disabled",onClick:function(){function I(){return C("advanced_beacon_locking",{on:S?0:1})}return I}()})],4),0),children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[N===p&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:f,disabled:l,options:Object.keys(c),color:f!=="None"?"default":"bad",onSelected:function(){function I(L){return C("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),N===u&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:f,disabled:l,options:Object.keys(c),color:f!=="None"?"default":"bad",onSelected:function(){function I(L){return C("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),N===d&&(0,e.createComponentVNode)(2,t.Box,{children:f})]})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Regime:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:N===u?"good":null,onClick:function(){function I(){return C("setregime",{regime:u})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:N===p?"good":null,onClick:function(){function I(){return C("setregime",{regime:p})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:N===d?"good":null,disabled:!g,onClick:function(){function I(){return C("setregime",{regime:d})}return I}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{label:"Calibration",mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[f!=="None"&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:15.8,textAlign:"center",mt:.5,children:l&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"In Progress"})||s&&(0,e.createComponentVNode)(2,t.Box,{color:"good",children:"Optimal"})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Sub-Optimal"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!(s||l),onClick:function(){function I(){return C("calibrate")}return I}()})})]}),f==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(g&&h&&v&&N===d)&&(0,e.createComponentVNode)(2,t.Section,{title:"GPS",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){function I(){return C("load")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function I(){return C("eject")}return I}()})]})})]})})})})}return b}()},48517:function(T,r,n){"use strict";r.__esModule=!0,r.TelescienceConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TelescienceConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.last_msg,p=i.linked_pad,u=i.held_gps,d=i.lastdata,s=i.power_levels,l=i.current_max_power,h=i.current_power,N=i.current_bearing,v=i.current_elevation,f=i.current_sector,g=i.working,V=i.max_z,S=(0,a.useLocalState)(B,"dummyrot",N),I=S[0],L=S[1];return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createFragment)([c,!(d.length>0)||(0,e.createVNode)(1,"ul",null,d.map(function(w){return(0,e.createVNode)(1,"li",null,w,0,null,w)}),0)],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Telepad Status",children:p===1?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Bearing",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:g,value:N,onDrag:function(){function w(A,x){return L(x)}return w}(),onChange:function(){function w(A,x){return C("setbear",{bear:x})}return w}()}),(0,e.createComponentVNode)(2,t.Icon,{ml:1,size:1,name:"arrow-up",rotation:I})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Elevation",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:g,value:v,onChange:function(){function w(A,x){return C("setelev",{elev:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Level",children:s.map(function(w,A){return(0,e.createComponentVNode)(2,t.Button,{content:w,selected:h===w,disabled:A>=l-1||g,onClick:function(){function x(){return C("setpwr",{pwr:A+1})}return x}()},w)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Sector",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:V,value:f,disabled:g,onChange:function(){function w(A,x){return C("setz",{newz:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Telepad Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Send",disabled:g,onClick:function(){function w(){return C("pad_send")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Receive",disabled:g,onClick:function(){function w(){return C("pad_receive")}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Crystal Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Recalibrate Crystals",disabled:g,onClick:function(){function w(){return C("recal_crystals")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Crystals",disabled:g,onClick:function(){function w(){return C("eject_crystals")}return w}()})]})]}):(0,e.createFragment)([(0,e.createTextVNode)("No pad linked to console. Please use a multitool to link a pad.")],4)}),(0,e.createComponentVNode)(2,t.Section,{title:"GPS Actions",children:u===1?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{disabled:u===0||g,content:"Eject GPS",onClick:function(){function w(){return C("eject_gps")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===0||g,content:"Store Coordinates",onClick:function(){function w(){return C("store_to_gps")}return w}()})],4):(0,e.createFragment)([(0,e.createTextVNode)("Please insert a GPS to store coordinates to it.")],4)})]})})}return b}()},21800:function(T,r,n){"use strict";r.__esModule=!0,r.TempGun=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.TempGun=function(){function C(i,c){var p=(0,t.useBackend)(c),u=p.act,d=p.data,s=d.target_temperature,l=d.temperature,h=d.max_temp,N=d.min_temp;return(0,e.createComponentVNode)(2,m.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:N,maxValue:h,value:s,format:function(){function v(f){return(0,a.toFixed)(f,2)}return v}(),width:"50px",onDrag:function(){function v(f,g){return u("target_temperature",{target_temperature:g})}return v}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:y(l),bold:l>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(l,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:k(l),children:B(l)})})]})})})})}return C}(),y=function(i){return i<=-100?"blue":i<=0?"teal":i<=100?"green":i<=200?"orange":"red"},B=function(i){return i<=100-273.15?"High":i<=250-273.15?"Medium":i<=300-273.15?"Low":i<=400-273.15?"Medium":"High"},k=function(i){return i<=100-273.15?"red":i<=250-273.15?"orange":i<=300-273.15?"green":i<=400-273.15?"orange":"red"}},24410:function(T,r,n){"use strict";r.__esModule=!0,r.sanitizeMultiline=r.removeAllSkiplines=r.TextInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(72253),m=n(92986),b=n(36036),y=n(98595),B=r.sanitizeMultiline=function(){function c(p){return p.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),k=r.removeAllSkiplines=function(){function c(p){return p.replace(/[\r\n]+/,"")}return c}(),C=r.TextInputModal=function(){function c(p,u){var d=(0,o.useBackend)(u),s=d.act,l=d.data,h=l.max_length,N=l.message,v=N===void 0?"":N,f=l.multiline,g=l.placeholder,V=l.timeout,S=l.title,I=(0,o.useLocalState)(u,"input",g||""),L=I[0],w=I[1],A=function(){function P(j){if(j!==L){var M=f?B(j):k(j);w(M)}}return P}(),x=f||L.length>=40,E=130+(v.length>40?Math.ceil(v.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,y.Window,{title:S,width:325,height:E,children:[V&&(0,e.createComponentVNode)(2,a.Loader,{value:V}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function P(j){var M=window.event?j.which:j.keyCode;M===m.KEY_ENTER&&(!x||!j.shiftKey)&&s("submit",{entry:L}),M===m.KEY_ESCAPE&&s("cancel")}return P}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{input:L,onType:A})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:L,message:L.length+"/"+h})})]})})})]})}return c}(),i=function(p,u){var d=(0,o.useBackend)(u),s=d.act,l=d.data,h=l.max_length,N=l.multiline,v=p.input,f=p.onType,g=N||v.length>=40;return(0,e.createComponentVNode)(2,b.TextArea,{autoFocus:!0,autoSelect:!0,height:N||v.length>=40?"100%":"1.8rem",maxLength:h,onEscape:function(){function V(){return s("cancel")}return V}(),onEnter:function(){function V(S){g&&S.shiftKey||(S.preventDefault(),s("submit",{entry:v}))}return V}(),onInput:function(){function V(S,I){return f(I)}return V}(),placeholder:"Type something...",value:v})}},25036:function(T,r,n){"use strict";r.__esModule=!0,r.ThermoMachine=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=n(98595),b=r.ThermoMachine=function(){function y(B,k){var C=(0,t.useBackend)(k),i=C.act,c=C.data;return(0,e.createComponentVNode)(2,m.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,m.Window.Content,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"Status",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.temperature,format:function(){function p(u){return(0,a.toFixed)(u,2)}return p}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function p(u){return(0,a.toFixed)(u,2)}return p}()})," kPa"]})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Controls",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){function p(){return i("power")}return p}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Setting",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){function p(){return i("cooling")}return p}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){function p(){return i("target",{target:c.min})}return p}()}),(0,e.createComponentVNode)(2,o.NumberInput,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onDrag:function(){function p(u,d){return i("target",{target:d})}return p}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function p(){return i("target",{target:c.max})}return p}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function p(){return i("target",{target:c.initial})}return p}()})]})]})})]})})}return y}()},20035:function(T,r,n){"use strict";r.__esModule=!0,r.TransferValve=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.TransferValve=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.tank_one,p=i.tank_two,u=i.attached_device,d=i.valve;return(0,e.createComponentVNode)(2,o.Window,{width:460,height:285,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Valve Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!p,onClick:function(){function s(){return C("toggle")}return s}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!u,onClick:function(){function s(){return C("device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:u?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){function s(){return C("remove_device")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Assembly"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment One",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:c?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:c,disabled:!c,onClick:function(){function s(){return C("tankone")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment Two",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:p?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:p,disabled:!p,onClick:function(){function s(){return C("tanktwo")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})})]})})}return b}()},78166:function(T,r,n){"use strict";r.__esModule=!0,r.TurbineComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=n(44879),b=r.TurbineComputer=function(){function k(C,i){var c=(0,a.useBackend)(i),p=c.act,u=c.data,d=u.compressor,s=u.compressor_broken,l=u.turbine,h=u.turbine_broken,N=u.online,v=!!(d&&!s&&l&&!h);return(0,e.createComponentVNode)(2,o.Window,{width:400,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:N?"power-off":"times",content:N?"Online":"Offline",selected:N,disabled:!v,onClick:function(){function f(){return p("toggle_power")}return f}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function f(){return p("disconnect")}return f}()})],4),children:v?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)})})})}return k}(),y=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.compressor,d=p.compressor_broken,s=p.turbine,l=p.turbine_broken,h=p.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!u||d?"bad":"good",children:d?u?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!s||l?"bad":"good",children:l?s?"Offline":"Missing":"Online"})]})},B=function(C,i){var c=(0,a.useBackend)(i),p=c.data,u=p.rpm,d=p.temperature,s=p.power,l=p.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[u," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[d," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Generated Power",children:[s," W"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bearing Heat",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,m.toFixed)(l)+"%"})})]})}},52847:function(T,r,n){"use strict";r.__esModule=!0,r.Uplink=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(25328),m=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(N){switch(N){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,l);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},C=r.Uplink=function(){function h(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.cart,I=(0,m.useLocalState)(v,"tabIndex",0),L=I[0],w=I[1],A=(0,m.useLocalState)(v,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,y.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Tabs,{children:[(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0),E("")}return P}(),icon:"store",children:"View Market"},"PurchasePage"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1),E("")}return P}(),icon:"shopping-cart",children:["View Shopping Cart ",S&&S.length?"("+S.length+")":""]},"Cart"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2),E("")}return P}(),icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{onClick:function(){function P(){return g("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(L)})]})})]})}return h}(),i=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.crystals,I=V.cats,L=(0,m.useLocalState)(v,"uplinkItems",I[0].items),w=L[0],A=L[1],x=(0,m.useLocalState)(v,"searchText",""),E=x[0],P=x[1],j=function(U,K){K===void 0&&(K="");var G=(0,o.createSearch)(K,function($){var Q=$.hijack_only===1?"|hijack":"";return $.name+"|"+$.desc+"|"+$.cost+"tc"+Q});return(0,t.flow)([(0,a.filter)(function($){return $==null?void 0:$.name}),K&&(0,a.filter)(G),(0,a.sortBy)(function($){return $==null?void 0:$.name})])(U)},M=function(U){if(P(U),U==="")return A(I[0].items);A(j(I.map(function(K){return K.items}).flat(),U))},O=(0,m.useLocalState)(v,"showDesc",1),D=O[0],F=O[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Current Balance: "+S+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:D,onClick:function(){function W(){return F(!D)}return W}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Random Item",icon:"question",onClick:function(){function W(){return g("buyRandom")}return W}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function W(){return g("refund")}return W}()})],4),children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function W(U,K){M(K)}return W}(),value:E})})})}),(0,e.createComponentVNode)(2,b.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:I.map(function(W){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:E!==""?!1:W.items===w,onClick:function(){function U(){A(W.items),P("")}return U}(),children:W.cat},W)})})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:w.map(function(W){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,u,{i:W,showDecription:D},(0,o.decodeHtmlEntities)(W.name))},(0,o.decodeHtmlEntities)(W.name))})})})})]})]})},c=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.cart,I=V.crystals,L=V.cart_price,w=(0,m.useLocalState)(v,"showDesc",0),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Current Balance: "+I+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:A,onClick:function(){function E(){return x(!A)}return E}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Empty Cart",icon:"trash",onClick:function(){function E(){return g("empty_cart")}return E}(),disabled:!S}),(0,e.createComponentVNode)(2,b.Button,{content:"Purchase Cart ("+L+"TC)",icon:"shopping-cart",onClick:function(){function E(){return g("purchase_cart")}return E}(),disabled:!S||L>I})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:S?S.map(function(E){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,u,{i:E,showDecription:A,buttons:(0,e.createComponentVNode)(2,s,{i:E})})},(0,o.decodeHtmlEntities)(E.name))}):(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,e.createComponentVNode)(2,p)]})},p=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.cats,I=V.lucky_numbers;return(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"dice",content:"See more suggestions",onClick:function(){function L(){return g("shuffle_lucky_numbers")}return L}()}),children:(0,e.createComponentVNode)(2,b.Stack,{wrap:!0,children:I.map(function(L){return S[L.cat].items[L.item]}).filter(function(L){return L!=null}).map(function(L,w){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",children:(0,e.createComponentVNode)(2,u,{grow:!0,i:L})},w)})})})})},u=function(N,v){var f=N.i,g=N.showDecription,V=g===void 0?1:g,S=N.buttons,I=S===void 0?(0,e.createComponentVNode)(2,d,{i:f}):S;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(f.name),showBottom:V,buttons:I,children:V?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(f.desc)}):null})},d=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=N.i,I=V.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",color:S.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function L(){return g("add_to_cart",{item:S.obj_path})}return L}(),disabled:S.cost>I}),(0,e.createComponentVNode)(2,b.Button,{content:"Buy ("+S.cost+"TC)"+(S.refundable?" [Refundable]":""),color:S.hijack_only===1&&"red",tooltip:S.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function L(){return g("buyItem",{item:S.obj_path})}return L}(),disabled:S.cost>I})],4)},s=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=N.i,I=V.exploitable;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+S.cost*S.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function L(){return g("remove_from_cart",{item:S.obj_path})}return L}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",tooltip:S.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function L(){return g("set_cart_item_quantity",{item:S.obj_path,quantity:--S.amount})}return L}(),disabled:S.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:S.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:S.limit===0&&"Discount already redeemed!",onCommit:function(){function L(w,A){return g("set_cart_item_quantity",{item:S.obj_path,quantity:A})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit&&S.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:S.limit===0&&"Discount already redeemed!",onClick:function(){function L(){return g("set_cart_item_quantity",{item:S.obj_path,quantity:++S.amount})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit})]})},l=function(N,v){var f=(0,m.useBackend)(v),g=f.act,V=f.data,S=V.exploitable,I=(0,m.useLocalState)(v,"selectedRecord",S[0]),L=I[0],w=I[1],A=(0,m.useLocalState)(v,"searchText",""),x=A[0],E=A[1],P=function(O,D){D===void 0&&(D="");var F=(0,o.createSearch)(D,function(W){return W.name});return(0,t.flow)([(0,a.filter)(function(W){return W==null?void 0:W.name}),D&&(0,a.filter)(F),(0,a.sortBy)(function(W){return W.name})])(O)},j=P(S,x);return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(){function M(O,D){return E(D)}return M}()}),(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:j.map(function(M){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:M===L,onClick:function(){function O(){return w(M)}return O}(),children:M.name},M)})})]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:L.name,children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:L.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:L.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:L.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:L.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:L.species})]})})})]})}},12261:function(T,r,n){"use strict";r.__esModule=!0,r.Vending=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=B.product,u=B.productStock,d=B.productImage,s=c.chargesMoney,l=c.user,h=c.usermoney,N=c.inserted_cash,v=c.vend_ready,f=c.inserted_item_name,g=!s||p.price===0,V="ERROR!",S="";g?(V="FREE",S="arrow-circle-down"):(V=p.price,S="shopping-cart");var I=!v||u===0||!g&&p.price>h&&p.price>N;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:u<=0&&"bad"||u<=p.max_amount/2&&"average"||"good",children:[u," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:I,icon:S,content:V,textAlign:"left",onClick:function(){function L(){return i("vend",{inum:p.inum})}return L}()})})]})},b=r.Vending=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.user,u=c.usermoney,d=c.inserted_cash,s=c.chargesMoney,l=c.product_records,h=l===void 0?[]:l,N=c.hidden_records,v=N===void 0?[]:N,f=c.stock,g=c.vend_ready,V=c.inserted_item_name,S=c.panel_open,I=c.speaker,L=c.imagelist,w;return w=[].concat(h),c.extended_inventory&&(w=[].concat(w,v)),w=w.filter(function(A){return!!A}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((s?171:89)+w.length*32,585),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!s&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:(0,e.createVNode)(1,"span",null,V,0,{style:{"text-transform":"capitalize"}}),onClick:function(){function A(){return i("eject_item",{})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!d,icon:"money-bill-wave-alt",content:d?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,d,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:d?"Dispense Change":null,textAlign:"left",onClick:function(){function A(){return i("change")}return A}()})})]}),children:p&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,p.name,0),", ",(0,e.createVNode)(1,"b",null,p.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[u,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!S&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"check":"volume-mute",selected:I,content:"Speaker",textAlign:"left",onClick:function(){function A(){return i("toggle_voice",{})}return A}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:(0,e.createComponentVNode)(2,t.Table,{children:w.map(function(A){return(0,e.createComponentVNode)(2,m,{product:A,productStock:f[A.name],productImage:L[A.path]},A.name)})})})})]})})})}return y}()},68971:function(T,r,n){"use strict";r.__esModule=!0,r.VolumeMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.VolumeMixer=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.channels;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:Math.min(95+c.length*50,565),children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:c.map(function(p,u){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:u>0&&"0.5rem",children:p.name}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:.5,children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return C("volume",{channel:p.num,volume:0})}return d}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:p.volume,onChange:function(){function d(s,l){return C("volume",{channel:p.num,volume:l})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return C("volume",{channel:p.num,volume:100})}return d}()})})})]})})],4,p.num)})})})})}return b}()},2510:function(T,r,n){"use strict";r.__esModule=!0,r.VotePanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.VotePanel=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.remaining,p=i.question,u=i.choices,d=i.user_vote,s=i.counts,l=i.show_counts;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:360,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:p,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),u.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,translucent:!0,lineHeight:3,multiLine:h,content:h+(l?" ("+(s[h]||0)+")":""),onClick:function(){function N(){return C("vote",{target:h})}return N}(),selected:h===d})},h)})]})})})}return b}()},30138:function(T,r,n){"use strict";r.__esModule=!0,r.Wires=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.Wires=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.wires||[],p=i.status||[],u=56+c.length*23+(status?0:15+p.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:u,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:d.color_name,labelColor:d.seen_color,color:d.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:d.cut?"Mend":"Cut",onClick:function(){function s(){return C("cut",{wire:d.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function s(){return C("pulse",{wire:d.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:d.attached?"Detach":"Attach",onClick:function(){function s(){return C("attach",{wire:d.color})}return s}()})],4),children:!!d.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),d.wire,(0,e.createTextVNode)(")")],0)},d.seen_color)})})})}),!!p.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:p.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:d},d)})})})]})})})}return b}()},21400:function(T,r,n){"use strict";r.__esModule=!0,r.WizardApprenticeContract=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),m=r.WizardApprenticeContract=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.used;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:555,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,e.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),c?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,e.createComponentVNode)(2,t.Section,{title:"Which school of magic is your apprentice studying?",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,e.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("fire")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,e.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("translocation")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,e.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("restoration")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,e.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("stealth")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,e.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,e.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function p(){return C("honk")}return p}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})})]})})}return b}()},49148:function(T,r,n){"use strict";r.__esModule=!0,r.AccessList=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036);function m(C,i){var c=typeof Symbol!="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(c)return(c=c.call(C)).next.bind(c);if(Array.isArray(C)||(c=b(C))||i&&C&&typeof C.length=="number"){c&&(C=c);var p=0;return function(){return p>=C.length?{done:!0}:{done:!1,value:C[p++]}}}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 b(C,i){if(C){if(typeof C=="string")return y(C,i);var c={}.toString.call(C).slice(8,-1);return c==="Object"&&C.constructor&&(c=C.constructor.name),c==="Map"||c==="Set"?Array.from(C):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?y(C,i):void 0}}function y(C,i){(i==null||i>C.length)&&(i=C.length);for(var c=0,p=Array(i);c0&&!V.includes(D.ref)&&!f.includes(D.ref),checked:f.includes(D.ref),onClick:function(){function F(){return S(D.ref)}return F}()},D.desc)})]})]})})}return C}()},26991:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosScan=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036),m=function(B,k,C,i,c){return Bi?"average":B>c?"bad":"good"},b=r.AtmosScan=function(){function y(B,k){var C=B.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(i){return i.val!=="0"||i.entry==="Pressure"||i.entry==="Temperature"})(C).map(function(i){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:i.entry,color:m(i.val,i.bad_low,i.poor_low,i.poor_high,i.bad_high),children:[i.val,i.units]},i.entry)})})})}return y}()},85870:function(T,r,n){"use strict";r.__esModule=!0,r.BeakerContents=void 0;var e=n(89005),a=n(36036),t=n(15964),o=function(y){return y+" unit"+(y===1?"":"s")},m=r.BeakerContents=function(){function b(y){var B=y.beakerLoaded,k=y.beakerContents,C=k===void 0?[]:k,i=y.buttons;return(0,e.createComponentVNode)(2,a.Stack,{vertical:!0,children:[!B&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"No beaker loaded."})||C.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),C.map(function(c,p){return(0,e.createComponentVNode)(2,a.Stack,{children:[(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",grow:!0,children:[o(c.volume)," of ",c.name]},c.name),!!i&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:i(c,p)})]},c.name)})]})}return b}();m.propTypes={beakerLoaded:t.bool,beakerContents:t.array,buttons:t.arrayOf(t.element)}},92963:function(T,r,n){"use strict";r.__esModule=!0,r.BotStatus=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.BotStatus=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.locked,c=C.noaccess,p=C.maintpanel,u=C.on,d=C.autopatrol,s=C.canhack,l=C.emagged,h=C.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",i?"unlock":"lock"," this interface."]}),(0,e.createComponentVNode)(2,t.Section,{title:"General Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:c,onClick:function(){function N(){return k("power")}return N}()})}),d!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){function N(){return k("autopatrol")}return N}()})}),!!p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Maintenance Panel",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Panel Open!"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety System",children:(0,e.createComponentVNode)(2,t.Box,{color:l?"bad":"good",children:l?"DISABLED!":"Enabled"})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:l?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function N(){return k("hack")}return N}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!h,content:"AI Remote Control",disabled:c,onClick:function(){function N(){return k("disableremote")}return N}()})})]})})],4)}return m}()},3939:function(T,r,n){"use strict";r.__esModule=!0,r.modalRegisterBodyOverride=r.modalOpen=r.modalClose=r.modalAnswer=r.ComplexModal=void 0;var e=n(89005),a=n(72253),t=n(36036),o={},m=r.modalOpen=function(){function C(i,c,p){var u=(0,a.useBackend)(i),d=u.act,s=u.data,l=Object.assign(s.modal?s.modal.args:{},p||{});d("modal_open",{id:c,arguments:JSON.stringify(l)})}return C}(),b=r.modalRegisterBodyOverride=function(){function C(i,c){o[i]=c}return C}(),y=r.modalAnswer=function(){function C(i,c,p,u){var d=(0,a.useBackend)(i),s=d.act,l=d.data;if(l.modal){var h=Object.assign(l.modal.args||{},u||{});s("modal_answer",{id:c,answer:p,arguments:JSON.stringify(h)})}}return C}(),B=r.modalClose=function(){function C(i,c){var p=(0,a.useBackend)(i),u=p.act;u("modal_close",{id:c})}return C}(),k=r.ComplexModal=function(){function C(i,c){var p=(0,a.useBackend)(c),u=p.data;if(u.modal){var d=u.modal,s=d.id,l=d.text,h=d.type,N,v=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function L(){return B(c)}return L}()}),f,g,V="auto";if(o[s])f=o[s](u.modal,c);else if(h==="input"){var S=u.modal.value;N=function(){function L(w){return y(c,s,S)}return L}(),f=(0,e.createComponentVNode)(2,t.Input,{value:u.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function L(w,A){S=A}return L}()}),g=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){function L(){return B(c)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,S)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(h==="choice"){var I=typeof u.modal.choices=="object"?Object.values(u.modal.choices):u.modal.choices;f=(0,e.createComponentVNode)(2,t.Dropdown,{options:I,selected:u.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function L(w){return y(c,s,w)}return L}()}),V="initial"}else h==="bento"?f=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:u.modal.choices.map(function(L,w){return(0,e.createComponentVNode)(2,t.Stack.Item,{flex:"1 1 auto",children:(0,e.createComponentVNode)(2,t.Button,{selected:w+1===parseInt(u.modal.value,10),onClick:function(){function A(){return y(c,s,w+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:L})})},w)})}):h==="boolean"&&(g=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:u.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function L(){return y(c,s,0)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:u.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,1)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:i.maxWidth||window.innerWidth/2+"px",maxHeight:i.maxHeight||window.innerHeight/2+"px",onEnter:N,mx:"auto",overflowY:V,"padding-bottom":"5px",children:[l&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:l}),o[s]&&v,f,g]})}}return C}()},41874:function(T,r,n){"use strict";r.__esModule=!0,r.CrewManifest=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(25328),m=n(76910),b=m.COLORS.department,y=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],B=function(p){return y.indexOf(p)!==-1?"green":"orange"},k=function(p){if(y.indexOf(p)!==-1)return!0},C=function(p){return p.length>0&&(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,color:"white",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"50%",children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"35%",children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"15%",children:"Active"})]}),p.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{color:B(u.rank),bold:k(u.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(u.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(u.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.active})]},u.name+u.rank)})]})},i=r.CrewManifest=function(){function c(p,u){var d=(0,a.useBackend)(u),s=d.act,l;if(p.data)l=p.data;else{var h=(0,a.useBackend)(u),N=h.data;l=N}var v=l,f=v.manifest,g=f.heads,V=f.sec,S=f.eng,I=f.med,L=f.sci,w=f.ser,A=f.sup,x=f.misc;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.command,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:C(g)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.security,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:C(V)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.engineering,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:C(S)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.medical,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:C(I)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.science,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:C(L)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.service,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:C(w)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.supply,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:C(A)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:C(x)})]})}return c}()},19203:function(T,r,n){"use strict";r.__esModule=!0,r.InputButtons=void 0;var e=n(89005),a=n(36036),t=n(72253),o=r.InputButtons=function(){function m(b,y){var B=(0,t.useBackend)(y),k=B.act,C=B.data,i=C.large_buttons,c=C.swapped_buttons,p=b.input,u=b.message,d=b.disabled,s=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!i,fluid:!!i,onClick:function(){function h(){return k("submit",{entry:p})}return h}(),textAlign:"center",tooltip:i&&u,disabled:d,width:!i&&6}),l=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!i,fluid:!!i,onClick:function(){function h(){return k("cancel")}return h}(),textAlign:"center",width:!i&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:l}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:l}),!i&&u&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:u})}),i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,mr:c?.5:0,ml:c?0:.5,children:s}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:s})]})}return m}()},195:function(T,r,n){"use strict";r.__esModule=!0,r.InterfaceLockNoticeBox=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.InterfaceLockNoticeBox=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=b.siliconUser,c=i===void 0?C.siliconUser:i,p=b.locked,u=p===void 0?C.locked:p,d=b.normallyLocked,s=d===void 0?C.normallyLocked:d,l=b.onLockStatusChange,h=l===void 0?function(){return k("lock")}:l,N=b.accessText,v=N===void 0?"an ID card":N;return c?(0,e.createComponentVNode)(2,t.NoticeBox,{color:c&&"grey",children:(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:"Interface lock status:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:"1"}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{m:"0",color:s?"red":"green",icon:s?"lock":"unlock",content:s?"Locked":"Unlocked",onClick:function(){function f(){h&&h(!u)}return f}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",v," to ",u?"unlock":"lock"," this interface."]})}return m}()},51057:function(T,r,n){"use strict";r.__esModule=!0,r.Loader=void 0;var e=n(89005),a=n(44879),t=n(36036),o=r.Loader=function(){function m(b){var y=b.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(y)*100+"%"}}),2)}return m}()},321:function(T,r,n){"use strict";r.__esModule=!0,r.LoginInfo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginInfo=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.loginState;if(C)return(0,e.createComponentVNode)(2,t.NoticeBox,{info:!0,children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:["Logged in as: ",i.name," (",i.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!i.id,content:"Eject ID",color:"good",onClick:function(){function c(){return k("login_eject")}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){function c(){return k("login_logout")}return c}()})]})]})})}return m}()},5485:function(T,r,n){"use strict";r.__esModule=!0,r.LoginScreen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginScreen=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.loginState,c=C.isAI,p=C.isRobot,u=C.isAdmin;return(0,e.createComponentVNode)(2,t.Section,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",align:"center",justify:"center",children:(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,e.createComponentVNode)(2,t.Box,{color:"label",my:"1rem",children:["ID:",(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:i.id?i.id:"----------",ml:"0.5rem",onClick:function(){function d(){return k("login_insert")}return d}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!i.id,content:"Login",onClick:function(){function d(){return k("login_login",{login_type:1})}return d}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function d(){return k("login_login",{login_type:2})}return d}()}),!!p&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function d(){return k("login_login",{login_type:3})}return d}()}),!!u&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function d(){return k("login_login",{login_type:4})}return d}()})]})})})}return m}()},62411:function(T,r,n){"use strict";r.__esModule=!0,r.Operating=void 0;var e=n(89005),a=n(36036),t=n(15964),o=r.Operating=function(){function m(b){var y=b.operating,B=b.name;if(y)return(0,e.createComponentVNode)(2,a.Dimmer,{children:(0,e.createComponentVNode)(2,a.Flex,{mb:"30px",children:(0,e.createComponentVNode)(2,a.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,e.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,e.createVNode)(1,"br"),"The ",B," is processing..."]})})})}return m}();o.propTypes={operating:t.bool,name:t.string}},13545:function(T,r,n){"use strict";r.__esModule=!0,r.Signaler=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=r.Signaler=function(){function b(y,B){var k=(0,t.useBackend)(B),C=k.act,i=y.data,c=i.code,p=i.frequency,u=i.minFrequency,d=i.maxFrequency;return(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:u/10,maxValue:d/10,value:p/10,format:function(){function s(l){return(0,a.toFixed)(l,1)}return s}(),width:"80px",onDrag:function(){function s(l,h){return C("freq",{freq:h})}return s}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:c,width:"80px",onDrag:function(){function s(l,h){return C("code",{code:h})}return s}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){function s(){return C("signal")}return s}()})]})}return b}()},41984:function(T,r,n){"use strict";r.__esModule=!0,r.SimpleRecords=void 0;var e=n(89005),a=n(72253),t=n(25328),o=n(64795),m=n(88510),b=n(36036),y=r.SimpleRecords=function(){function C(i,c){var p=i.data.records;return(0,e.createComponentVNode)(2,b.Box,{children:p?(0,e.createComponentVNode)(2,k,{data:i.data,recordType:i.recordType}):(0,e.createComponentVNode)(2,B,{data:i.data})})}return C}(),B=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=i.data.recordsList,s=(0,a.useLocalState)(c,"searchText",""),l=s[0],h=s[1],N=function(g,V){V===void 0&&(V="");var S=(0,t.createSearch)(V,function(I){return I.Name});return(0,o.flow)([(0,m.filter)(function(I){return I==null?void 0:I.Name}),V&&(0,m.filter)(S),(0,m.sortBy)(function(I){return I.Name})])(d)},v=N(d,l);return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function f(g,V){return h(V)}return f}()}),v.map(function(f){return(0,e.createComponentVNode)(2,b.Box,{children:(0,e.createComponentVNode)(2,b.Button,{mb:.5,content:f.Name,icon:"user",onClick:function(){function g(){return u("Records",{target:f.uid})}return g}()})},f)})]})},k=function(i,c){var p=(0,a.useBackend)(c),u=p.act,d=i.data.records,s=d.general,l=d.medical,h=d.security,N;switch(i.recordType){case"MED":N=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Medical Data",children:l?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Blood Type",children:l.blood_type}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Disabilities",children:l.mi_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.mi_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Disabilities",children:l.ma_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.ma_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Allergies",children:l.alg}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.alg_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Current Diseases",children:l.cdi}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:l.cdi_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:l.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":N=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Security Data",children:h?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Criminal Status",children:h.criminal}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Crimes",children:h.mi_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:h.mi_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Crimes",children:h.ma_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:h.ma_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:h.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Security record lost!"})});break}return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Section,{title:"General Data",children:s?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Name",children:s.name}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:s.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:s.species}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:s.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:s.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:s.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Physical Status",children:s.p_stat}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mental Status",children:s.m_stat})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"General record lost!"})}),N]})}},22091:function(T,r,n){"use strict";r.__esModule=!0,r.TemporaryNotice=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.TemporaryNotice=function(){function m(b,y){var B,k=(0,a.useBackend)(y),C=k.act,i=k.data,c=i.temp;if(c){var p=(B={},B[c.style]=!0,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},p,{children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:c.text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"times-circle",onClick:function(){function u(){return C("cleartemp")}return u}()})})]})})))}}return m}()},80818:function(T,r,n){"use strict";r.__esModule=!0,r.pai_atmosphere=void 0;var e=n(89005),a=n(72253),t=n(26991),o=r.pai_atmosphere=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:C.app_data})}return m}()},23903:function(T,r,n){"use strict";r.__esModule=!0,r.pai_bioscan=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_bioscan=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.holder,p=i.dead,u=i.health,d=i.brute,s=i.oxy,l=i.tox,h=i.burn,N=i.temp;return c?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:p?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"Dead"}):(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"green",children:"Alive"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:0,max:1,value:u/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"blue",children:s})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxin Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:h})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"red",children:d})})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Error: No biological host found."})}return m}()},64988:function(T,r,n){"use strict";r.__esModule=!0,r.pai_directives=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_directives=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.master,p=i.dna,u=i.prime,d=i.supplemental;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master",children:c?c+" ("+p+")":"None"}),c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Request DNA",children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){function s(){return k("getdna")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Prime Directive",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Supplemental Directives",children:d||"None"})]}),(0,e.createComponentVNode)(2,t.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,e.createComponentVNode)(2,t.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."})]})}return m}()},13813:function(T,r,n){"use strict";r.__esModule=!0,r.pai_doorjack=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_doorjack=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.cable,p=i.machine,u=i.inprogress,d=i.progress,s=i.aborted,l;p?l=(0,e.createComponentVNode)(2,t.Button,{selected:!0,content:"Connected"}):l=(0,e.createComponentVNode)(2,t.Button,{content:c?"Extended":"Retracted",color:c?"orange":null,onClick:function(){function N(){return k("cable")}return N}()});var h;return p&&(h=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hack",children:[(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:d,maxValue:100}),u?(0,e.createComponentVNode)(2,t.Button,{mt:1,color:"red",content:"Abort",onClick:function(){function N(){return k("cancel")}return N}()}):(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Start",onClick:function(){function N(){return k("jack")}return N}()})]})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cable",children:l}),h]})}return m}()},66025:function(T,r,n){"use strict";r.__esModule=!0,r.pai_main_menu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pai_main_menu=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data,c=i.available_software,p=i.installed_software,u=i.installed_toggles,d=i.available_ram,s=i.emotions,l=i.current_emotion,h=i.speech_verbs,N=i.current_speech_verb,v=i.available_chassises,f=i.current_chassis,g=[];return p.map(function(V){return g[V.key]=V.name}),u.map(function(V){return g[V.key]=V.name}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available RAM",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Software",children:[c.filter(function(V){return!g[V.key]}).map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name+" ("+V.cost+")",icon:V.icon,disabled:V.cost>d,onClick:function(){function S(){return k("purchaseSoftware",{key:V.key})}return S}()},V.key)}),c.filter(function(V){return!g[V.key]}).length===0&&"No software available!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Software",children:[p.filter(function(V){return V.key!=="mainmenu"}).map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,icon:V.icon,onClick:function(){function S(){return k("startSoftware",{software_key:V.key})}return S}()},V.key)}),p.length===0&&"No software installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Toggles",children:[u.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,icon:V.icon,selected:V.active,onClick:function(){function S(){return k("setToggle",{toggle_key:V.key})}return S}()},V.key)}),u.length===0&&"No toggles installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Emotion",children:s.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.id===l,onClick:function(){function S(){return k("setEmotion",{emotion:V.id})}return S}()},V.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Speaking State",children:h.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.name===N,onClick:function(){function S(){return k("setSpeechStyle",{speech_state:V.name})}return S}()},V.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Chassis Type",children:v.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.icon===f,onClick:function(){function S(){return k("setChassis",{chassis_to_change:V.icon})}return S}()},V.id)})})]})})}return m}()},2983:function(T,r,n){"use strict";r.__esModule=!0,r.pai_manifest=void 0;var e=n(89005),a=n(72253),t=n(41874),o=r.pai_manifest=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest,{data:C.app_data})}return m}()},40758:function(T,r,n){"use strict";r.__esModule=!0,r.pai_medrecords=void 0;var e=n(89005),a=n(72253),t=n(41984),o=r.pai_medrecords=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k.app_data,recordType:"MED"})}return m}()},98599:function(T,r,n){"use strict";r.__esModule=!0,r.pai_messenger=void 0;var e=n(89005),a=n(72253),t=n(77595),o=r.pai_messenger=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.app_data.active_convo;return i?(0,e.createComponentVNode)(2,t.ActiveConversation,{data:C.app_data}):(0,e.createComponentVNode)(2,t.MessengerList,{data:C.app_data})}return m}()},50775:function(T,r,n){"use strict";r.__esModule=!0,r.pai_radio=void 0;var e=n(89005),a=n(72253),t=n(44879),o=n(36036),m=r.pai_radio=function(){function b(y,B){var k=(0,a.useBackend)(B),C=k.act,i=k.data,c=i.app_data,p=c.minFrequency,u=c.maxFrequency,d=c.frequency,s=c.broadcasting;return(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:p/10,maxValue:u/10,value:d/10,format:function(){function l(h){return(0,t.toFixed)(h,1)}return l}(),onChange:function(){function l(h,N){return C("freq",{freq:N})}return l}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Reset",icon:"undo",onClick:function(){function l(){return C("freq",{freq:"145.9"})}return l}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function l(){return C("toggleBroadcast")}return l}(),selected:s,content:s?"Enabled":"Disabled"})})]})}return b}()},48623:function(T,r,n){"use strict";r.__esModule=!0,r.pai_secrecords=void 0;var e=n(89005),a=n(72253),t=n(41984),o=r.pai_secrecords=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k.app_data,recordType:"SEC"})}return m}()},47297:function(T,r,n){"use strict";r.__esModule=!0,r.pai_signaler=void 0;var e=n(89005),a=n(72253),t=n(13545),o=r.pai_signaler=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.Signaler,{data:C.app_data})}return m}()},78532:function(T,r,n){"use strict";r.__esModule=!0,r.pda_atmos_scan=void 0;var e=n(89005),a=n(72253),t=n(26991),o=r.pda_atmos_scan=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:k})}return m}()},40253:function(T,r,n){"use strict";r.__esModule=!0,r.pda_janitor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pda_janitor=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data,i=C.janitor,c=i.user_loc,p=i.mops,u=i.buckets,d=i.cleanbots,s=i.carts,l=i.janicarts;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),p&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Locations",children:p.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - ",h.status]},h)})}),u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Bucket Locations",children:u.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - [",h.volume,"/",h.max_volume,"]"]},h)})}),d&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cleanbot Locations",children:d.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - ",h.status]},h)})}),s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.dir,") - [",h.volume,"/",h.max_volume,"]"]},h)})}),l&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janicart Locations",children:l.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:[h.x,",",h.y," (",h.direction_from_user,")"]},h)})})]})}return m}()},58293:function(T,r,n){"use strict";r.__esModule=!0,r.pda_main_menu=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),m=r.pda_main_menu=function(){function b(y,B){var k=(0,t.useBackend)(B),C=k.act,i=k.data,c=i.owner,p=i.ownjob,u=i.idInserted,d=i.categories,s=i.pai,l=i.notifying;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",color:"average",children:[c,", ",p]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID",children:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){function h(){return C("UpdateInfo")}return h}()})})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Functions",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:d.map(function(h){var N=i.apps[h];return!N||!N.length?null:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:h,children:N.map(function(v){return(0,e.createComponentVNode)(2,o.Button,{icon:v.uid in l?v.notify_icon:v.icon,iconSpin:v.uid in l,color:v.uid in l?"red":"transparent",content:v.name,onClick:function(){function f(){return C("StartProgram",{program:v.uid})}return f}()},v.uid)})},h)})})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!s&&(0,e.createComponentVNode)(2,o.Section,{title:"pAI",children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){function h(){return C("pai",{option:1})}return h}()}),(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){function h(){return C("pai",{option:2})}return h}()})]})})]})}return b}()},58059:function(T,r,n){"use strict";r.__esModule=!0,r.pda_manifest=void 0;var e=n(89005),a=n(72253),t=n(41874),o=r.pda_manifest=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.act,C=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest)}return m}()},18147:function(T,r,n){"use strict";r.__esModule=!0,r.pda_medical=void 0;var e=n(89005),a=n(72253),t=n(41984),o=r.pda_medical=function(){function m(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k,recordType:"MED"})}return m}()},77595:function(T,r,n){"use strict";r.__esModule=!0,r.pda_messenger=r.MessengerList=r.ActiveConversation=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036),m=r.pda_messenger=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=c.data,d=u.active_convo;return d?(0,e.createComponentVNode)(2,b,{data:u}):(0,e.createComponentVNode)(2,y,{data:u})}return k}(),b=r.ActiveConversation=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=C.data,d=u.convo_name,s=u.convo_job,l=u.messages,h=u.active_convo,N=(0,t.useLocalState)(i,"clipboardMode",!1),v=N[0],f=N[1],g=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:v,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return f(!v)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return p("Message",{target:h})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===h})(l).map(function(V,S){return(0,e.createComponentVNode)(2,o.Box,{textAlign:V.sent?"right":"left",position:"relative",mb:1,children:[(0,e.createComponentVNode)(2,o.Icon,{fontSize:2.5,color:V.sent?"#4d9121":"#cd7a0d",position:"absolute",left:V.sent?null:"0px",right:V.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:V.sent?"scale(-1, 1)":null},name:"comment"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,backgroundColor:V.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:V.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"normal"},children:[V.sent?"You:":"Them:"," ",V.message]})]},S)})});return v&&(g=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:v,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return f(!v)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return p("Message",{target:h})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===h})(l).map(function(V,S){return(0,e.createComponentVNode)(2,o.Box,{color:V.sent?"#4d9121":"#cd7a0d",style:{"word-break":"normal"},children:[V.sent?"You:":"Them:"," ",(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:V.message})]},S)})})),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:.5,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Delete Conversations",confirmContent:"Are you sure?",icon:"trash",confirmIcon:"trash",onClick:function(){function V(){return p("Clear",{option:"Convo"})}return V}()})})})}),g]})}return k}(),y=r.MessengerList=function(){function k(C,i){var c=(0,t.useBackend)(i),p=c.act,u=C.data,d=u.convopdas,s=u.pdas,l=u.charges,h=u.silent,N=u.toff,v=u.ringtone_list,f=u.ringtone,g=(0,t.useLocalState)(i,"searchTerm",""),V=g[0],S=g[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:5,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"volume-mute":"volume-up",onClick:function(){function I(){return p("Toggle Ringer")}return I}(),children:["Ringer: ",h?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{color:N?"bad":"green",icon:"power-off",onClick:function(){function I(){return p("Toggle Messenger")}return I}(),children:["Messenger: ",N?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",color:"bad",onClick:function(){function I(){return p("Clear",{option:"All"})}return I}(),children:"Delete All Conversations"}),(0,e.createComponentVNode)(2,o.Button,{icon:"bell",onClick:function(){function I(){return p("Ringtone")}return I}(),children:"Set Custom Ringtone"}),(0,e.createComponentVNode)(2,o.Button,{children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:f,width:"100px",options:Object.keys(v),onSelected:function(){function I(L){return p("Available_Ringtones",{selected_ringtone:L})}return I}()})})]})}),!N&&(0,e.createComponentVNode)(2,o.Box,{children:[!!l&&(0,e.createComponentVNode)(2,o.Box,{mt:.5,mb:1,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cartridge Special Function",children:[l," charges left."]})})}),!d.length&&!s.length&&(0,e.createComponentVNode)(2,o.Box,{children:"No current conversations"})||(0,e.createComponentVNode)(2,o.Box,{children:["Search:"," ",(0,e.createComponentVNode)(2,o.Input,{mt:.5,value:V,onInput:function(){function I(L,w){S(w)}return I}()})]})]})||(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Messenger Offline."})]}),(0,e.createComponentVNode)(2,B,{title:"Current Conversations",data:u,pdas:d,msgAct:"Select Conversation",searchTerm:V}),(0,e.createComponentVNode)(2,B,{title:"Other PDAs",pdas:s,msgAct:"Message",data:u,searchTerm:V})]})}return k}(),B=function(C,i){var c=(0,t.useBackend)(i),p=c.act,u=C.data,d=C.pdas,s=C.title,l=C.msgAct,h=C.searchTerm,N=u.charges,v=u.plugins;return!d||!d.length?(0,e.createComponentVNode)(2,o.Section,{title:s,children:"No PDAs found."}):(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:s,children:d.filter(function(f){return f.Name.toLowerCase().includes(h.toLowerCase())}).map(function(f){return(0,e.createComponentVNode)(2,o.Stack,{m:.5,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"arrow-circle-down",content:f.Name,onClick:function(){function g(){return p(l,{target:f.uid})}return g}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!N&&v.map(function(g){return(0,e.createComponentVNode)(2,o.Button,{icon:g.icon,content:g.name,onClick:function(){function V(){return p("Messenger Plugin",{plugin:g.uid,target:f.uid})}return V}()},g.uid)})})]},f.uid)})})}},24635:function(T,r,n){"use strict";r.__esModule=!0,r.pda_mule=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pda_mule=function(){function y(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.mulebot,u=p.active;return(0,e.createComponentVNode)(2,t.Box,{children:u?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,m)})}return y}(),m=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.mulebot,u=p.bots;return u.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:d.Name,icon:"cog",onClick:function(){function s(){return i("control",{bot:d.uid})}return s}()})},d.Name)})},b=function(B,k){var C=(0,a.useBackend)(k),i=C.act,c=C.data,p=c.mulebot,u=p.botstatus,d=p.active,s=u.mode,l=u.loca,h=u.load,N=u.powr,v=u.dest,f=u.home,g=u.retn,V=u.pick,S;switch(s){case 0:S="Ready";break;case 1:S="Loading/Unloading";break;case 2:case 12:S="Navigating to delivery location";break;case 3:S="Navigating to Home";break;case 4:S="Waiting for clear path";break;case 5:case 6:S="Calculating navigation path";break;case 7:S="Unable to locate destination";break;default:S=s;break}return(0,e.createComponentVNode)(2,t.Section,{title:d,children:[s===-1&&(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:[N,"%"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Home",children:f}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:(0,e.createComponentVNode)(2,t.Button,{content:v?v+" (Set)":"None (Set)",onClick:function(){function I(){return i("target")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Load",children:(0,e.createComponentVNode)(2,t.Button,{content:h?h+" (Unload)":"None",disabled:!h,onClick:function(){function I(){return i("unload")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Pickup",children:(0,e.createComponentVNode)(2,t.Button,{content:V?"Yes":"No",selected:V,onClick:function(){function I(){return i("set_pickup_type",{autopick:V?0:1})}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Return",children:(0,e.createComponentVNode)(2,t.Button,{content:g?"Yes":"No",selected:g,onClick:function(){function I(){return i("set_auto_return",{autoret:g?0:1})}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Stop",icon:"stop",onClick:function(){function I(){return i("stop")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Proceed",icon:"play",onClick:function(){function I(){return i("start")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Return Home",icon:"home",onClick:function(){function I(){return i("home")}return I}()})]})]})]})}},23734:function(T,r,n){"use strict";r.__esModule=!0,r.pda_nanobank=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),m=r.pda_nanobank=function(){function u(d,s){var l=(0,t.useBackend)(s),h=l.act,N=l.data,v=N.logged_in,f=N.owner_name,g=N.money;return v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Name",children:f}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:["$",g]})]})}),(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y)]})],4):(0,e.createComponentVNode)(2,i)}return u}(),b=function(d,s){var l=(0,t.useBackend)(s),h=l.data,N=h.is_premium,v=(0,t.useLocalState)(s,"tabIndex",1),f=v[0],g=v[1];return(0,e.createComponentVNode)(2,o.Tabs,{mt:2,children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===1,onClick:function(){function V(){return g(1)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transfers"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===2,onClick:function(){function V(){return g(2)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Account Actions"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===3,onClick:function(){function V(){return g(3)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transaction History"]}),!!N&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:f===4,onClick:function(){function V(){return g(4)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Supply Orders"]})]})},y=function(d,s){var l=(0,t.useLocalState)(s,"tabIndex",1),h=l[0],N=(0,t.useBackend)(s),v=N.data,f=v.db_status;if(!f)return(0,e.createComponentVNode)(2,o.Box,{children:"Account Database Connection Severed"});switch(h){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);case 3:return(0,e.createComponentVNode)(2,C);case 4:return(0,e.createComponentVNode)(2,p);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},B=function(d,s){var l,h=(0,t.useBackend)(s),N=h.act,v=h.data,f=v.requests,g=v.available_accounts,V=v.money,S=(0,t.useLocalState)(s,"selectedAccount"),I=S[0],L=S[1],w=(0,t.useLocalState)(s,"transferAmount"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"searchText",""),P=E[0],j=E[1],M=[];return g.map(function(O){return M[O.name]=O.UID}),(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account",children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account name",onInput:function(){function O(D,F){return j(F)}return O}()}),(0,e.createComponentVNode)(2,o.Dropdown,{mt:.6,width:"190px",options:g.filter((0,a.createSearch)(P,function(O){return O.name})).map(function(O){return O.name}),selected:(l=g.filter(function(O){return O.UID===I})[0])==null?void 0:l.name,onSelected:function(){function O(D){return L(M[D])}return O}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Amount",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Up to 5000",onInput:function(){function O(D,F){return x(F)}return O}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:V0&&l.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["#",N.Number,' - "',N.Name,'" for "',N.OrderedBy,'"']},N)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Approved Orders",children:s>0&&d.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["#",N.Number,' - "',N.Name,'" for "',N.ApprovedBy,'"']},N)})})]})}return m}()},17617:function(T,r,n){"use strict";r.__esModule=!0,r.Layout=void 0;var e=n(89005),a=n(35840),t=n(55937),o=n(24826),m=["className","theme","children"],b=["className","scrollable","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT